Login into SQL Server using Windows Authentication.
In Object Explorer, open Security folder, open Logins folder. Right Click on SA account and go to Properties.
Change SA password, and confirm it. Click OK.
Make sure to restart the SQL Server and all its services and test new password by log into system using SA login and new password.
Reference : Pinal Dave (https://darkslategrey-bat-805937.hostingersite.com)
UPDATE : There has been discussion about restarting the SQL Server and all its services. Please read all of them before making final decision for your scenario.
262 Comments. Leave new
Thank you dude you r doing great job ………….
Thank you
Hi Pinal,
I am in between the installation, and it does not allow me pass a window, which is the database engine configuration window.
I have put mixed mode, and the password and the password to confirm, but I cant pass the hurdle of the text area which is the Specify SQL Server administrators window.
When I set a username for administrator should that person be in the domain.
should he come like domainname/username or can I put any usernames
Thanks,
AB
me…fresher and I locked out sa account..after reading this post I could resolve login issue myself.. Thanks Pinal Dave
i have tried the steps but it gives login failed :( could you help me ?
thanks for share your knowledge with us its awesome post thanks again
Hi Can you help me create a bat file reset the sa password
Hi any one suggest me on this…
In sql server authentication i forgot my pwd for uid sa..so can u tell me step by step process how to find out the pwd or else how to reset the pwd again…i dont have the sysadmin rights…With out this iam not able to connect to th e object explorer… so plz help me out in this…
thanks in Advance…
Hi ,
when i change password to sa user in sql sever 2055 express give me this TITLE: Microsoft SQL Server Management Studio Express
——————————
Change password failed for Login ‘sa’. (Microsoft.SqlServer.Express.Smo)
Cannot alter the login ‘sa’, because it does not exist or you do not have permission. (Microsoft SQL Server, Error: 15151)
What a terrible blog. Everyone is on an ego trip. The guy made a mistake years ago and you are still posting about it???
This worked great for me, thank you Dave much appreciated, Victor.
I never had any problems changing the sa password from the Windows command line. I always use the following procedure:
1.) Logon to the Windows server
2.) Open the windows prompt (cmd)
3.) Type: osql -L to get the list of MSSQL servers near you
4.) Type: osql -S servername -E (The servername includes “%hostname%instanzname”)
5.) sp_password NULL,’new_password’,’sa’
6.) go
7.) quit
8.) exit
Try the new password by login MSSQL with sa
Note: The new password should work even without restarting the MSSQL server. Of course you can restart the server to be on the safer side.
Hi can you help with creating a bat file with script
Type: osql -S servername -E (The servername includes “%hostname%\instanzname”)
1.) sp_password NULL,’new_password’,’sa’
2.) go
greg the devil has drawn a line for bothering sql community… hahahhahahaa
Its really beneficial for me thank u
Hi,
After changing the password for sa account and then restarting the visual server 2008 I am getting following error message .Please help me to resolve this.
TITLE: Connect to Server
——————————
Cannot connect to HOME-D9119BCA1C.
——————————
ADDITIONAL INFORMATION:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 – No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)
For help, click:
——————————
BUTTONS:
OK
——————————
Hi Sapan, did you get any solution for this?
hi Pinal sir,
Is there any way to set sequrity ID 0x01 for a user in sqlserver 2005 express edition ??
Actually I want to disable sa and want to create a user as super User such as sa but dont want to rename sa.
Hi Pinal Sir,
Is there any way to restrict for login to SQLSERVER but not Database, I mean it I want to grant access database remotly from windows form application but dont want to grant for connect using Management Studio.
Actually I have 3 several Client application and there is given connection string with 3 several user. there are more than 100 unknown person is accessing database via those application remotely.
but i am was helpless when i decode my client application which were create by me using .Net Reflector, the connection string is very open. so if any person decode the application he will get the connection string and he can access via management studio or sqlcmd or ms access that i dont want.
i want to grant access from only those 3 application and those 3 user and nothing else. but I have 2 another application for those Database with another 2 user with some extra permissions.
thats why i am unable to create Logon Trigger.
I am declaring some information about the structure:
Database : 1. ABCD 2. EFGH
User For ABCD:
1. “Client” with no delete permission and with insert,Update,Select Permission.
2. “Moderator” With Select,Insert,Delete,Update Permission (With column Restriction)
3. “Admin” With All Permission but this user will not create any problem because he is the owner of the project.
For EFGH is same.
From “Client” or “Moderator” User’s connection string can create problem from other application but not my client application.
Please help me
Dear Pinal Sir,
You have not replied me.
Please help me sir
You may have forgotten the most important thing.
If you manage to login using integrated login, and managed to set the ‘sa’ password, you must also make sure that the SQL Server is running in mixed mode. In my case, I installed SQL 2008 Developer edition, paying great attention that I chose mixed mode, and provided a password for ‘sa’, but then I installed Visual Studio Professional 2010 with all features, and if you are not paying attention during setup, SQL Express is installed and configured to use Integrated Authentication only. Right-click the server after you have successfully logged in in integrated mode and change the setting of the server to mixed mode.
hello sir we can find the password of sql authentication mode using Query
hello sir we can find the password of sql authentication mode using Query
Mehedi Hasan
Date:20th Dec,2012
I want to give password for a particular database. The SQL server may have 10 databases and i want to give individual password for individual database. The reason for that nobidy can enter into that particular database without knowing that particular password for that particular database.Please help me if anyone knows that thing…..