Hello,
I am using Sql Server 2000 and am having problems after I tried restoring my
db today.
I had got the database backup file from another user and I was able to
restore my db successfully. But after doing so I was not able to query any
of my tables.
Any query I give like,
select * from tablename yielded Invalid object name 'tablename'
Earlier the owner of this db was not "sa" but rather "celia".
After restoring the db, I am not able to login to SQL Server Query Analyser
using celia/password.
I logged in as "sa" then and had to execute my query like
select * from celia.tablename and it worked this time.
Any idea on what went wrong? How do I get this back to working?
Thanks.
CeliaHi,
You can syncronze the login and users first. This will allow you to login
using celia user. Use the below procedure to sync the Login and user
sp_change_users_login 'update_one','celia','celia' -- (See books online for
more information)
Any idea on what went wrong? How do I get this back to working?
Since the object owner (table) is CELIA, even if you login as SA, you need
to mention table owner name (CELIA.Table_name).
This prblem will be solved once you sync. the login and user.
Incase if you want to use SA or other users to access the table with out
table owner qualifier than chnage the object owner to DBO.
This can be done using the system procedure 'sp_changeobjectowner' (See
books online for more info)
Thanks
Hari
SQL Server MVP
"msnews" <jukliukiuk@.celia.com> wrote in message
news:%23Fez80wzFHA.1968@.TK2MSFTNGP10.phx.gbl...
> Hello,
> I am using Sql Server 2000 and am having problems after I tried restoring
> my
> db today.
> I had got the database backup file from another user and I was able to
> restore my db successfully. But after doing so I was not able to query any
> of my tables.
> Any query I give like,
> select * from tablename yielded Invalid object name 'tablename'
> Earlier the owner of this db was not "sa" but rather "celia".
> After restoring the db, I am not able to login to SQL Server Query
> Analyser
> using celia/password.
> I logged in as "sa" then and had to execute my query like
> select * from celia.tablename and it worked this time.
> Any idea on what went wrong? How do I get this back to working?
> Thanks.
> Celia
>
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment