Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Unable to see table contents and structure

Author  Topic 

NijelJ22
Starting Member

18 Posts

Posted - 2008-09-01 : 05:07:33
I am working on a database. Got stuck at one place. I have few tables where in it shows the owner name as "DBADMIN" instead of "DBO". I am unable to see the table structure or contents of the aforesaid tables. I logged in as "sa"(System Admin). DBADMIN is another user with admin priviledges.

When i am trying to use Select statement i am getting an error invalid object name. However, tables resides in the same databse with multiples records in it.

Any suggestion ? How to see those tables in query analyzer as I have to use it in some reports.

I am able to see the table structure in Enterprize manager.

Pls help ?

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-09-01 : 05:12:45
Reason being is that the tables were created by DBADMIN and instead of using [dbo].[Your_table_name] he used [Your_table_name] or
[DBADMIN].[Your_table_name]

Its best you rename the tables or recreate them as dbo.

On the interim to view them, login with the acct DBADMIN

Hope this helps

Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-09-01 : 05:13:43
To see them in the select statement use select [DBADMIN].[Your_Table_name]
Go to Top of Page

NijelJ22
Starting Member

18 Posts

Posted - 2008-09-01 : 05:16:09
Thanks for the help Africa ...

Before posting that post I have already tried the suggestions menstioned by you. Issue is I don't have the password for DBADMIN. I have to use those tables in my report. Any other suggestion ?

Thanks in Advance for any help you may provide.
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-09-01 : 06:14:40
Do you have the password for the sa account ?
Go to Top of Page

NijelJ22
Starting Member

18 Posts

Posted - 2008-09-01 : 06:22:44
Thats done ...

I used dbadmin.table name

Thanks
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-09-01 : 07:19:01
glad2help
Go to Top of Page
   

- Advertisement -