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.
| Author |
Topic |
|
harshal_in
Aged Yak Warrior
633 Posts |
Posted - 2002-11-29 : 08:06:33
|
| when I create a new login using the following syntax :exec sp_addlogin 'harshal','password','testing_test','us_english'exec spit gives me the following error:can not open user default database login failedwhat can be the possible cause?thnxsharshal |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-11-29 : 08:12:39
|
| I take it this is when the user tries to log in.You also need to give the user access to a database (probably his default).See sp_adduser.==========================================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. |
 |
|
|
harshal_in
Aged Yak Warrior
633 Posts |
Posted - 2002-11-29 : 08:29:28
|
quote: I take it this is when the user tries to log in.You also need to give the user access to a database (probably his default).See sp_adduser.==========================================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.
ya i have done it using the following statement:EXEC sp_grantdbaccess N'test_user', N'testing'it still fails. |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-11-29 : 08:36:29
|
| Did sp_grantdbaccess work?How is test_user trying to log in.Try it in query analyser on the server.I assume you first created the test_user login before granting access.This will be a sql server account not nt so he will have to use the name and password to log on.To give access to an nt account you will have to use the domain\username==========================================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. |
 |
|
|
harshal_in
Aged Yak Warrior
633 Posts |
Posted - 2002-11-29 : 23:27:26
|
quote: Did sp_grantdbaccess work?How is test_user trying to log in.Try it in query analyser on the server.I assume you first created the test_user login before granting access.This will be a sql server account not nt so he will have to use the name and password to log on.To give access to an nt account you will have to use the domain\username==========================================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.
sp_grantdbaccess worked without any errors.I try to login through query analyser only but it says cannot open default database .login failed for the user. |
 |
|
|
Andraax
Aged Yak Warrior
790 Posts |
Posted - 2002-11-30 : 09:17:17
|
| Well he has to have access to his default database, which is 'testing_test' according to your sp_addlogin statement. You have to give him access to that database. |
 |
|
|
|
|
|