Monday, March 12, 2012

Permissions and access to AdventureWorks

I have downloaded the Express Edition of SQL Server 2005 to try to learn the software to take the MCTS test for certification. I have installed the software and the SMS. I have downloaded the AdventureWorks database files and installed everything as directed. I use Windows authentication to log in (it's my own home PC). I have followed the instructions to attach the database to the instance I am using.

The problem I'm having is in trying to run examples from the book I'm using on the database. For example, I'm trying to run a simple query like "SELECT * FROM dbo.DatabaseLog;" When I click execute, I keep getting this message:

"

Msg 208, Level 16, State 1, Line 1

Invalid object name 'dbo.DatabaseLog'.

"

When I look at the Object Explorer pane, I can clearly see the table and see that I am spelling it correctly.

I have set my login up as the owner of the database and when I try to set up permissions on the table, I only see the roles [user] and [guest]. I tried setting up permissions for both, but that didn't help.

What am I doing wrong?

Thank you.

Eric S. Bauman

Be sure to be under the specific Northwind database context if you start the query. There is a dropdown in SSMS where you can change the context through the GUI. YOu can also change the context through the USE command e.g. USE Northwind or directly during connection time specifying Initital Catalog=Northwind in the connectionstring (you did not mention where you tried to execute the query)

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||Thank you, Jens. That did it. I opened up a new query window in SMS, typed in the USE command then typed in the query and it worked like a champ.

Thanks again for your help!

Eric Bauman

No comments:

Post a Comment