db_datareader issue and hidden table in database/SSMS

pma111
pma111 used Ask the Experts™
on
I am using SQL management studio and have been granted db_datareader database role to a number of databases on a 2008 R2 instance. I ran the query

SP_MSforeachDB 'SELECT "?" AS DB, * FROM [?].sys.tables WHERE NAME LIKE ''%LLP%'''

this showed me that the table I am after "LLP" resides in the dbcLive database.  However, when I execute:

SELECT * FROM dbcLive.LLP it says object cannot be found. Also in the SQL management studio, when I expand that DB, and expand tables, it does not show this database listed. COuld this be due to secureity permissions (despite me having db_datareader, which I assumed was complete read access to any table in that database.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Associate Principal Engineer
Top Expert 2014
Commented:
Hello,

You should try writing the query with the Database.Schema.Tablename

for example

Select * from dbcLive.dbo.LLP

Hope this would help you....

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial