locked
The current user is not an owner of the selected database RRS feed

  • Question

  • User-870465687 posted

    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?

    Tuesday, May 29, 2007 1:03 AM

Answers

  • User-1165642680 posted

     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).

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 29, 2007 3:35 AM
  • User-1136466523 posted

    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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 31, 2007 10:29 PM

All replies

  • User-1165642680 posted

     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).

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 29, 2007 3:35 AM
  • User-1136466523 posted

    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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 31, 2007 10:29 PM
  • User-870465687 posted

    Thanks for the reply.

    Friday, June 1, 2007 1:04 PM
  • User-870465687 posted

    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. 

    <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>

    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” . 

    <o:p> </o:p>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”.
    Friday, June 1, 2007 1:04 PM
  • User-19491302 posted

    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!

    Sunday, February 27, 2011 7:12 AM