I have recently installed SQL 2005 I use the SQL ecpress and management studio. In the SQL server Management Studio, when I right click on the database and use the SQL Server Import and Export wizard, I can import databases from the web hosting I'm workign
with to my mycomputer, but cannot export them.
When I try to export database tables with the SQL Server Import and Export wizard
The error says:
The current user is not an owner of the selected database. This might cause some operations with this database to fail.I use sa to log into the management studio aand
creat teh database after I login. How do I create a database so that the user and owner match and will allow me to export tables and data?
I think the user name you are using to login to database(one in which you want to export data) does not have rights to write(it might be in db_datareader role only).
Please remember to click “Mark as Answer” on the post that helps you.
This can be beneficial to other community members reading the thread.
Please use "sa" account to log in your SQL2005, create a database and import the database from your web hosting ,change your data table owner into "dbo" by using sp_changeobjectowner command and then export the tables. Have a try.
Thanks for the reply.I think this will work for importing data.However, I still have the problem when exporting a database table from a database I created from the management studio after logging in as sa.
I’m thinking that one reason is that eventhough I loginto the management studio as “sa” I may not be starting sql 2005 express as “sa” .
Or maybe it’s permissions setting that I don’t know how to change.For whatever reason maybe “sa” doesn’t have rights to export databases, or eventhough I log into the Management studio as “sa” and the “owner” of the database is “sa”, there is some setting in the management studio that doesn’t consider “sa” as a “user”.
tatau
Member
61 Points
29 Posts
The current user is not an owner of the selected database
May 29, 2007 05:03 AM|LINK
I have recently installed SQL 2005 I use the SQL ecpress and management studio. In the SQL server Management Studio, when I right click on the database and use the SQL Server Import and Export wizard, I can import databases from the web hosting I'm workign with to my mycomputer, but cannot export them.
When I try to export database tables with the SQL Server Import and Export wizard
The error says: The current user is not an owner of the selected database. This might cause some operations with this database to fail.I use sa to log into the management studio aand creat teh database after I login. How do I create a database so that the user and owner match and will allow me to export tables and data?
pankajdhillo...
Member
102 Points
18 Posts
Re: The current user is not an owner of the selected database
May 29, 2007 07:35 AM|LINK
I think the user name you are using to login to database(one in which you want to export data) does not have rights to write(it might be in db_datareader role only).
This can be beneficial to other community members reading the thread.
Nai-Dong Jin...
All-Star
41630 Points
3558 Posts
Re: The current user is not an owner of the selected database
Jun 01, 2007 02:29 AM|LINK
Hi,
Please use "sa" account to log in your SQL2005, create a database and import the database from your web hosting ,change your data table owner into "dbo" by using sp_changeobjectowner command and then export the tables. Have a try.
Thanks.
tatau
Member
61 Points
29 Posts
Re: The current user is not an owner of the selected database
Jun 01, 2007 05:04 PM|LINK
Thanks for the reply.
tatau
Member
61 Points
29 Posts
Re: The current user is not an owner of the selected database
Jun 01, 2007 05:04 PM|LINK
Thanks for the reply. I think this will work for importing data. However, I still have the problem when exporting a database table from a database I created from the management studio after logging in as sa.
I’m thinking that one reason is that eventhough I loginto the management studio as “sa” I may not be starting sql 2005 express as “sa” .
Or maybe it’s permissions setting that I don’t know how to change. For whatever reason maybe “sa” doesn’t have rights to export databases, or eventhough I log into the Management studio as “sa” and the “owner” of the database is “sa”, there is some setting in the management studio that doesn’t consider “sa” as a “user”.dst101
Member
244 Points
202 Posts
Re: The current user is not an owner of the selected database
Feb 27, 2011 11:12 AM|LINK
I'm having the same issue, but when I try and login to SQL Server Management Studio using the SA account, I get 'Login failed for user sa'
I have used windows authentication method of getting in and altering the sa password, yet it still will not let me in, it's driving me nuts!
I have also tried to do it from the command line in cmd but I get network errors when trying to connect with sa.
I used windows authentication to import/export data to my live dbase but it says I'm not the owner, yet it clearly says that I am!
Any help would be gratefully appreciated!