billyboy71
asked on
changing authentication mode and adding SA user for SQL Express 2005
Hi,
I am using SQL Express 2005. I originally had the SQL server installed in Windows Authentication and now I want to change to SQL Authentication mode. I have changed the LoginMode in the registry to 2. Now, I am following the steps to create the SA account. I have gone throught the steps in T-SQL.
1> exec sp_addlogin 'username', 'password'
2> go
And everything is fine.
However when I type:
1> exec sp_addsrvroleadmin 'username', 'sysadmin'
2> go
It tells me:
Could not find stored procedure 'sp_addsrvroleadmin'
I am using SQL Express 2005. I originally had the SQL server installed in Windows Authentication and now I want to change to SQL Authentication mode. I have changed the LoginMode in the registry to 2. Now, I am following the steps to create the SA account. I have gone throught the steps in T-SQL.
1> exec sp_addlogin 'username', 'password'
2> go
And everything is fine.
However when I type:
1> exec sp_addsrvroleadmin 'username', 'sysadmin'
2> go
It tells me:
Could not find stored procedure 'sp_addsrvroleadmin'
ASKER
Hi,
Thanks for your comment. So if want to add the 'sa' login name and the administrator role. Should I type the following:
sp_addsrvrolemember @sa='login', @administrator='role'
Thanks.
Peter
Thanks for your comment. So if want to add the 'sa' login name and the administrator role. Should I type the following:
sp_addsrvrolemember @sa='login', @administrator='role'
Thanks.
Peter
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
I think you want
sp_addsrvrolemember [ @loginame= ] 'login'
, [ @rolename = ] 'role'
Adds a login as a member of a fixed server role.