Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to create MS SQL user account?

15 views
Skip to first unread message

wenkie leong

unread,
Oct 15, 2002, 12:21:01 AM10/15/02
to
Dear all,

Can i create a user account in SQL Server without use the
Entreprise Manager? How? Use TSQL? or VB?

Thanks and regards,
Wenkie Leong

Andrew John

unread,
Oct 15, 2002, 1:01:37 AM10/15/02
to
Wenkie,

Using TSQL - suggest you look in Books Online for the following system stored procedures:

sp_addlogin
sp_grantdbaccess
sp_addrole
sp_addrolemember

Or read the whole section, which is in the contents under
<Administering SQL Server> <Managing Security> <Creating Security Accounts>

Obviously you can write your own stored procedures encapsulating these, and call it/them from VB

Regards
AJ

"wenkie leong" <wenkie...@planetone-asia.com> wrote in message news:232e01c27402$44c8eb90$37ef2ecf@TKMSFTNGXA13...

oj

unread,
Oct 15, 2002, 1:31:48 AM10/15/02
to
sp_addlogin [ @loginame = ] 'login'
[ , [ @passwd = ] 'password' ]
[ , [ @defdb = ] 'database' ]
[ , [ @deflanguage = ] 'language' ]
[ , [ @sid = ] sid ]
[ , [ @encryptopt = ] 'encryption_option' ]

look up in sql book online for more details.

--
-oj
http://www.rac4sql.net


"wenkie leong" <wenkie...@planetone-asia.com> wrote in message
news:232e01c27402$44c8eb90$37ef2ecf@TKMSFTNGXA13...

0 new messages