КАК узнать какой пароль на sa ?
«SQL state 28000
Native 18452
Message [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user ‘sa’.
«SQL state 28000
Native 18452
Message [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user ‘Ну тут мой логин!’.
Разберем по порядку.
1. Заходим в скуль(«Сервак») под пользователем «Юзер» с паролем «пшелнах».
2. Создаем базу «Хрень».
3. Проверяем аутентификацию в скуле — проверка силами скуля а не винды.
4. Лезем в 1С — «Администрирование|ПараметрыБазыСКЛ»
5. Заполняем Сервер — «Сервак», База данных — «Хрень», Пользователь — «Юзер», Пароль — «пшелнах».
What is the default password for SQL Server 2012 if I didn't put a password in the setup?
I installed SQL Server 2012 without putting a password .
What is the default password for SQL Authentication , where the login is sa ?
Login : sa and Password : blank , didn’t do the trick .
2 Answers 2
If you install SQL Server with Windows Authentication mode and want to change it, you need to do 2 different things:
Go to SQL Server Properties/Security tab and change the mode to SQL Server authentication mode
Go to security/logins, open SA login properties
a. Uncheck «Enforce password policy» and «Enforce password expiration» check box there if you decide to use weak password
What is the default sa password?
If I install an instance with Windows Only authentication, and then change it to Mixed Mode, if I enable the sa login, the password has already been set. What is the default? If it’s generated, how secure is it? Is the password generated? What algorithm is used for that?
January 13, 2014 at 9:17 am
When you change modes the sa password is still disabled. Here read this article:http://technet.microsoft.com/en-us/library/ms188670.aspx
If Windows Authentication mode is selected during installation, the sa login is disabled and a password is assigned by setup. If you later change authentication mode to SQL Server and Windows Authentication mode, the sa login remains disabled. To use the sa login, use the ALTER LOGIN statement to enable the sa login and assign a new password. The sa login can only connect to the server by using SQL Server Authentication.
Microsoft Certified Master — SQL Server 2008
Follow me on twitter: @keith_tate
Forum Etiquette: How to post data/code on a forum to get the best help[/url]
January 13, 2014 at 9:24 am
Thanks Keith I know that. I’m wondering how the password is generated. i.e. is it secure enough? I’m wondering if I have to set my own «good» password for security reasons. I’m trying to make a security assessment.
January 13, 2014 at 9:44 am
I would say that if you don’t need to use the SA account leave it disabled. If you need it make your own password that is secure enough. The one generated by setup doesn’t really come into play since it is disabled at first (because you picked Windows during start up) and it is still disabled after you changed authentication.
Microsoft Certified Master — SQL Server 2008
Follow me on twitter: @keith_tate
Forum Etiquette: How to post data/code on a forum to get the best help[/url]
January 13, 2014 at 5:02 pm
keymoo (1/13/2014)
If I install an instance with Windows Only authentication, and then change it to Mixed Mode, if I enable the sa login, the password has already been set. What is the default? If it’s generated, how secure is it? Is the password generated? What algorithm is used for that?
Unless someone changed it, the SA password is the one used when SQL Server was installed.
—Jeff Moden RBAR is pronounced «ree-bar» and is a «Modenism» for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
________ Stop thinking about what you want to do to a ROW. think, instead, of what you want to do to a COLUMN.
January 14, 2014 at 2:28 am
Jeff Moden (1/13/2014)
Unless someone changed it, the SA password is the one used when SQL Server was installed.
But you’re not asked to specify an SA password during setup if you select Windows authentication, are you? :unsure:
January 14, 2014 at 3:38 am
paul.knibbs (1/14/2014)
Jeff Moden (1/13/2014)
Unless someone changed it, the SA password is the one used when SQL Server was installed.
But you’re not asked to specify an SA password during setup if you select Windows authentication, are you? :unsure:
Exactly, I know the risk is small, but if the instance was placed in Mixed Mode and the sa account enabled (by mistake, or a script, or something), how secure is the password? Is it easy to reverse? Is it as secure as a SHA-256 one way hash function? Am I worrying unnecessarily about vanishingly small probabilities of edge cases?
January 14, 2014 at 3:48 am
When during the install of a new SQL server instance you choose the Windows authentication , the sa login is disabled and set to an empty string.
So when you change the authentication from Windows to SQL Server , you have to enabled the sa login , but the password is set to an empty string. I tested it with SQL Server 2008, 2008 R2 and 2012.
If during the install , you choose the SQL Server ( or Mixed ) authentication , you have to provide a not empty string ( a good novelty in 2012 ) . When you change the authentication from mixed to Windows , the sa login is «disabled» but the password is kept. So , if later on , you change the authentication from Windows to mixed , the original value ( set to the install ) is always useable.
January 14, 2014 at 7:22 am
keymoo (1/14/2014)
paul.knibbs (1/14/2014)
Jeff Moden (1/13/2014)
Unless someone changed it, the SA password is the one used when SQL Server was installed.
But you’re not asked to specify an SA password during setup if you select Windows authentication, are you? :unsure:
Exactly, I know the risk is small, but if the instance was placed in Mixed Mode and the sa account enabled (by mistake, or a script, or something), how secure is the password? Is it easy to reverse? Is it as secure as a SHA-256 one way hash function? Am I worrying unnecessarily about vanishingly small probabilities of edge cases?
It’s been a while since I’ve had to do an install so I could certainly be wrong but I’m pretty sure it always asks you for an SA password. To be sure, though, I’d always worry about the SA password and disable the SA account even after giving it a good, strong password and storing it in a safe somewhere.
—Jeff Moden RBAR is pronounced «ree-bar» and is a «Modenism» for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
________ Stop thinking about what you want to do to a ROW. think, instead, of what you want to do to a COLUMN.
Default SA password of SQL Server (edit)
You can also use the following SQL query to do the same:
[Note: 2 indicates mixed mode authentication. 1 is for windows only authentication]
Setting a password on the sa account:
- Under the SQL instance, expand Security and Logins
- Right click on sa and click on Properties
- Type the new password in the Password and Confirm Password boxes
You can also use the following SQL query to do the same:
[Note: CHECK_POLICY=OFF ensures that Windows password policies of the computer on which SQL Server is running will NOT be enforced on this login]
Enabling the sa account:
- Under the SQL instance, expand Security and Logins
- Right click on sa and click on Properties
- Click on Status on the left pane
- Click on Enabled under the Login section
You can also use the following SQL query to do the same:
Question
How to change a password for the `sa` user in MS SQL?
Answer
This can be done using the osql utility in a command prompt or using Microsoft SQL Management Studio.
1. Using the command prompt:
-
For a local MS SQL server use the following command:
osql -E -Q «exec sp_password NULL,’new_password’,’sa'»
osql -S servername_or_address -E -Q «exec sp_password NULL,’new_password’,’sa'»
2. Using Microsoft SQL Management Studio:
- Open Microsoft SQL Management Studio. It can be done from the command line by executing ssms.exe .
- Login into Microsoft SQL Management Studio with Administrator user credentials.
- Go to Security > Logins > sa > properties .
- Change the password.
Note: These actions are possible for Administrator account only.
If Windows administrator does not have permissions to reset ‘sa’ user password, follow instructions from the article: Connect to SQL Server When System Administrators Are Locked Out