Home > Archive > SQL server exams > September 2002 > Coco's question of the Week #7





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Coco's question of the Week #7
cocolocopolo

2002-09-17, 12:11 am

RE: sp_who and sp_who2

what difference in between?

Also, how can we use T-SQL and system stored procedure to create the new logins?

example: sp_addlogin anita (and then what ?)
2lazybutsmart

2002-09-17, 7:13 am

A1- Well i've never seen sp_who2. But I've had quite and aquaintence with sp_who. sp_who stored proc provides information about current SQL Server users and processes.

A2- sp_addlogin takes 6 parameters, but only 3 are important. i.e loginname, password, and default database. You have to specify the loginname parameter. password parameter will default to NULL, and defdb parameter will default to master, if not specified otherwise.

Examples,

1- (Only login name, password = NULL, defdb=master)
EXEC sp_addlogin cocolocopolo
----------------------------------
2- (Login name and password, defdb=master)
EXEC sp_addlogin cocolocopolo, 'coco'
-------------------------------------
3- (Login name and password and defdb)
EXEC sp_addlogin cocolocopolo, 'coco',
CocoDB
---------------------------------------

cheers,
2lazybutsmart
cocolocopolo

2002-09-20, 12:20 am

Thanks 2lazybutsmart
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net