Cari Blog Ini

23 Mei 2012

Create Login in SQL Server Using sp_addlogin

1. Create New Login with Blank Password
-----code:start
EXEC sp_addlogin 'user_test_1'
-----code:end


2. Create New Login with Password
-----code:start
EXEC sp_addlogin 'user_test_2', '123456'
-----code:end






3. Check availability of New Login
-----code:start
select loginname, [password], * from dbo.syslogins
-----code:end





Source:
http://msdn.microsoft.com/en-us/library/aa259567(SQL.80).aspx