I locked myself out of a development database once by setting my "default" database to a newly created database and then later deleting it - the system wouldn't let me login. Since then I've made it a point to have at least two Admin accounts into my SQL Server database.
It's been a while since I installed a new Server Instance so I had to relearn the steps taken (which are far easier with SQL Server 2005) - they follow:
-
Launch SQL Server Management Studio
-
Click on Security | Logins
-
Right click on SA select Properties
-
Select "Status" page
-
Select Login of "Enabled" (radio button)
-
Select "General" page
-
type in new password
if you attempt to login as "SA" with your new password you will be greated with the following message:
Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection (Microsoft SQL Server, Error: 18452)
To resolve this comply with the following steps:
-
Right click on the "Server" (not the database)
-
Select Properties
-
Select Security page
-
Change Server Authentication to "SQL Server and Windows Authentication mode"
-
Right click on the "Server"
-
Select "Restart"
You'll now be able to login to your server as SA
Tags:
sql server
Categories: