April 3, 2016 at 11:24 pm
When i try to mirror database i am getting following error.I checked database exist and permission.
Database exists and sa is the owner of that database.
following is the error i am seeing in sqlserver error log
Error: 18456, Severity: 14, State: 38.
Message
Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'MIRROR'. [CLIENT: <local machine>]
Thanks,
Padmakumar
April 4, 2016 at 3:11 am
What state is the database in? (Online, recovering, restoring, ...)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 4, 2016 at 5:55 am
DB state is Restoring
Thanks,
Padmakumar
April 4, 2016 at 5:59 am
That's why you got the error logging in then. You can't open a DB that's in RESTORING, it's not accessible.
Either change the sa login's default database to master, or don't explicitly specify a database name in the login/connection string.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 4, 2016 at 9:22 am
I checked default database for sa. It is master.Mirror database is in restoring state.
but still i am getting same error.
Thanks,
Padmakumar
April 4, 2016 at 9:27 am
GilaMonster (4/4/2016)
Either change the sa login's default database to master, or don't explicitly specify a database name in the login/connection string.
If the default DB is master, then to get that error message, the connection string is explicitly specifying the name of the mirror DB. Doing so won't work, the mirror DB can't be opened.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 4, 2016 at 9:48 am
I am not using any application.I am trying to configure Database mirroring.
following is the error massage i am getting at that time .Previous error i mentioned was in Sqlserver error log.
TITLE: Database Properties
------------------------------
An error occurred while starting mirroring.
------------------------------
ADDITIONAL INFORMATION:
Alter failed for Database 'Mirror'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=13.0.11000.48+((SSMS_Main).160122-0651)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Alter+Database&LinkId=20476
------------------------------
Failed to connect to server (local). (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Cannot open database "MIRROR" requested by the login. The login failed.
Login failed for user 'sa'. (Microsoft SQL Server, Error: 4060)
April 4, 2016 at 9:53 am
Open a T-SQL query window, make sure that the database context is NOT the database Mirror, and then use T-SQL to do the config.
The connection that you're using for the mirroring wizard is trying to specify the mirror DB as the database to connect to, which can't happen because the DB is recoverying.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply