SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How can I find default UserName and Password?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

grandhi
Starting Member

31 Posts

Posted - 05/19/2013 :  03:36:29  Show Profile  Reply with Quote
Hi All,

I am using Ms SQLSERVER 2012.I created new database name as LoginTesting.specifically I didn't mention any Login details.
Know I want to connect this Db Through Wolfram mathematica.for that purpose it needs UserName,Password.so I want know the default userName and password of the MS SQLSERVER 2012.

If I use default names and passwords,I will sent my database to any one,again they will also not needed for creating login details because in their systems also same default userNames and passwords.so for my testing time I want to use default names and passwords.

I hope,you understood what my problem.

If you know any tutorials about this,send me that links I will read.

Fell free,If you want to edit my question

Thank you

chadmat
The Chadinator

USA
1974 Posts

Posted - 05/19/2013 :  04:20:43  Show Profile  Visit chadmat's Homepage  Reply with Quote
There Is no such thing as default username and password. You need to create a login for the SQL Server, and grant it access to the Database.

-Chad
Go to Top of Page

grandhi
Starting Member

31 Posts

Posted - 05/19/2013 :  04:30:35  Show Profile  Reply with Quote
@chadmat I created new login and also mention default database name.the correponding code is following below.

/*Following code corresponds to the creating the new login and password*/
CREATE LOGIN Mary5 WITH PASSWORD = 'enterStrongPasswordHere'
/*Following code cporresponds to the mentioning default database name*/
	  ALTER LOGIN [Mary5] WITH DEFAULT_DATABASE=[LoginTesting]


Know I want to add permissions like sysadmin and also I want to map my database to username.

How can I do this through query format.not in GUI.
Go to Top of Page

chadmat
The Chadinator

USA
1974 Posts

Posted - 05/19/2013 :  04:50:07  Show Profile  Visit chadmat's Homepage  Reply with Quote
You can use sp_addsrvrolemember (Deprecated in 2012)
or
ALTER SERVER ROLE <role> ADD MEMBER [Mary5]

-Chad
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000