johnhardy
asked on
Usernames and passwords for MS SQL
I am using MS SQL 2008 express on my local machine XP
I can connect to MS SQL databases using windows authentication but some software I wish to use requires a username and password
server=SERVERNAME;uid=USER NAME;pwd=P ASSWORD;da tabase=DAT ABASE_NAME
Can anyone advise how I create the username and password please?
Servername and databse names are known.
Many thanks
John hardy
I can connect to MS SQL databases using windows authentication but some software I wish to use requires a username and password
server=SERVERNAME;uid=USER
Can anyone advise how I create the username and password please?
Servername and databse names are known.
Many thanks
John hardy
You can also just create that user in Management Studio (SSMS) under "Security", if you prefere the GUI approach.
Please check the following:
http://msdn.microsoft.com/en-us/library/aa337545.aspx
http://msdn.microsoft.com/en-us/library/aa337545.aspx
ASKER
ASKER
What is the password for sa?
The sa password is defined when installing MSSQL Express. It might be empty, but I don't think so.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
hi,
if you doing for your own use then below link currently wont require.
if you trying to create multiple users with different role then check out following link.
https://www.experts-exchange.com/questions/26532011/Is-there-a-way-to-create-new-user-into-sql-server.html?sfQueryTermInfo=1+10+30+brichsoft+creat+login
if you doing for your own use then below link currently wont require.
if you trying to create multiple users with different role then check out following link.
https://www.experts-exchange.com/questions/26532011/Is-there-a-way-to-create-new-user-into-sql-server.html?sfQueryTermInfo=1+10+30+brichsoft+creat+login
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
You will need to enable the sa account under Security.
This completed the puzzle so thanks for all of the help.
Many thanks
John
This completed the puzzle so thanks for all of the help.
Many thanks
John
CREATE LOGIN login_name WITH PASSWORD='password'
GO
USE DATABASE_NAME
GO
--Creating User - user_name .. Login and user_name is mostly the same --
CREATE USER user_name FROM login_name
GO
--Also you might need to grant some roles - such as dbo (db_owner), datareader (db_datareader) or datawriter (db_datawriter)--
USE DATABASE_NAME
GO
exec sp_addrolemember 'db_owner' , 'user_name'
GO