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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL 7 Security Permission problem with attached DB user

Status
Not open for further replies.

lsgko

Programmer
Joined
Sep 9, 2002
Messages
111
Location
US
After installing windows 2000 fresh (NT got corrupted). I installed SQL Server 7 and was able to attach the databases from before NT got corrupt.

I was able to create the user used by our ODBC program, but when I try to access it I get the following error message:

From the program:
[Microsoft] [ODBC SQL Server Driver] [SQL Server] Cannot open database request in login DB. Login fails.

From Query Analyzer:
Server: Msg 916, Level 14, State 1
Server User X is not a valid user in database DB

I then used sp_dropuser to remove the user from the DB and then added the user back (I don't know if this corrupts data or anything, I've got a backup if I need it) and was able to select the database in query analyzer but now I don't have permission to run a select (or likely any other command).

I tried a grant all to X as sa but that didn't work.

Any ideas?
 
Duplicate post - see programming

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top