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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-04-03 : 09:57:27
|
| James writes "I'm writing a Transact-SQL script to create a database and populate its defaults for a project I'm building and I'd like to know if it is possible to automatically create a login user for my project via the Transact-SQL script?" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-04-03 : 10:05:09
|
| If you want a separate LOGIN, use sp_addlogin. If you want to map an EXISTING login to a new database user, use sp_adduser. Adding these to your database creation script will effectively automate the process for you. If you need more information on these, they are well documented in Books Online. |
 |
|
|
|
|
|