use DBNAME
go

DECLARE @sid BINARY(16)
SELECT @sid=sid FROM sysusers WHERE name='USERNAME' and islogin=1

exec sp_addlogin @loginame = 'USERNAME',@sid = @sid
http://wangzw.wordpress.com/
个性化台历、日历制作
http://shop33697570.taobao.com/