Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How can I find default UserName and Password?

Author  Topic 

grandhi
Starting Member

31 Posts

Posted - 2013-05-19 : 03:36:29
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

1974 Posts

Posted - 2013-05-19 : 04:20:43
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 - 2013-05-19 : 04:30:35
@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

1974 Posts

Posted - 2013-05-19 : 04:50:07
You can use sp_addsrvrolemember (Deprecated in 2012)
or
ALTER SERVER ROLE <role> ADD MEMBER [Mary5]

-Chad
Go to Top of Page
   

- Advertisement -