Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table permissions, "invalid object name"

Status
Not open for further replies.

plook

IS-IT--Management
Apr 1, 2000
33
0
0
Hi all,

on MSL SQL server 7, I have 2 different users. One is for me and I had this account for a few years, and recently, I asked my hosting company to create me a second user. However, I cannot get this user to "see" any tables in the database. It always says "invalid object name" when I specify a simple query like "SELECT * FROM table1".

The first try, this new user had only a few roles "public" and "db_datareader". In Entreprise Manager, when I verify the table permissions for this user by selecting "List only objects with permissions of this user", I get a list of 4 tables. 3 of these tables have "select" checked, and the fourth one has "SELECT, INSERT, UPDATE, DELETE" checked. To me, It meant that this user could access these 4 tables. But it's not the case.

The second try, I added some roles to this user to give him
"public, db_owner, db_accessadmin,db_securityadmin,db_ddladmin,db_backupoperator,db_datareader and datawriter". So, pretty much everything, except the 2 "deny" ones. But it did not change anything. I still get that message "invalid object name".

So I wrote my hosting company's tech support, hoping they can give me some hints. And here is their answer

"I tested the DSN's, created new logins and passwords to test with and your database will not accept any logins other than "your_first_account". It appears to be a permissions issue related to the settings you gave the database tables when you created them. Perhaps the sql knowledgebase may help you"

I'm a real newbie in terms of databases, so I would like to know if that person can be right or he's only lazy to look for a better explanation? Personnally, I find it very strange that because I created the tables in my database one way, I cannot change anything to give somebody else access. Secondly, please correct me if I'm wrong, there are not many ways in Entreprise Manager to create tables. I looked everything in Entreprise Manager, trying to create a temporary table to see how I could put permissions on a table at the creation level, but I have yet to find anything.

So, any hints or help would be greatly appreciated.

Thank you all and have yourself a wonderful day !

Plook
 
Hi All !

Nevermind, I think I found my answer...

It looks like all I needed to do is to put the owner of the table in front of the table...

so.. SELECT * FROM owner.table1 works perfectly !

Thank you !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top