Tools: String Manipulations Find Dupes My IP Json Formatter Lorem Ipsum More...
Discussion Options
ajax animation

Change SQL Server Default Database for a User

7/19/2016 5:55:38 PM by: CodeLocker

In SQL Server, if you have a default database set for a user and that database gets deleted, you may not be able to login (so completely stupid Microsoft). To change the default password, do the following.

View Copy: Content Copied
From the RUN command or a command prompt
1) sqlcmd -E -S "MyComputerName\MyInstanceName" -d master

1>ALTER LOGIN [MyDomain\jdoe] WITH DEFAULT_DATABASE =master
2>Go
Copy: Content Copied
ajax animation
×

Get Coding

Store your first code or add more code to your collection.
You must login to report abuse. ×