Showing posts with label mirroring. Show all posts
Showing posts with label mirroring. Show all posts

Thursday, March 8, 2012

"Launch Database Mirroring Monitor" is not an option

Good morning all...

I would like use the "Database Mirroring Monitor" to track what's going on.

All three of my servers have SQL Server 2005 x64 edition installed with SP1.

Server A is mirroring to Server C

Server B is mirroring to Server C

Following the instructions at http://msdn2.microsoft.com/en-us/library/ms365786(d=ide).aspx:

On Server A and C, "Launch Database Mirroring Monitor" appears.

On Server B, "Launch Database Mirroring Monitor" does NOT appear.

Is there something I have to do to get this tool installed on the machine, or it is an automatic thing?

Thanks!

Forch

It is installed automatically.

Here's my suggestion. Are you sure that you have installed SP1 on machine B?

I don't know what else to suggest. I'm following up with some of the testers.

Thanks,

Mark

|||

Hi...

Yes... SP1 was installed on all three machines. The version displayed for all machines is 9.0.2047.

Thanks,

Forch

|||

I have no idea why you can't see the Database Mirroring Monitor on your server.

Go ahead and run "sqlmonitor.exe" from \tools\binn, and then select "go" and then "dbm monitor"

That should at least allow you to get the monitor up and running.

Thanks,

Mark

|||

I came across this thread when looking for answers to exactly this question, but when I go run the sqlmonitor.exe mentioned in the previous post I just get a replication monitor up that doesn't give me any options to do anything...

What am I missing?

Thanks

Ed

|||

I suspect that by now you've figured this out but, in case it helps others....

When I connect from a WS using SSMS to the instance of the server hosting the mirror I do not see Database Mirroring Monitor as described by others above. However, if I TermServe into the server and connect to the instance using SSMS the option is there.

As cool as mirroring is, it looks like it might still have a few rough edges. Hope that helps.

-D

|||

I just terminalled into the db server but alas, no Database Mirroring Monitor.

oh well....thanks anyway

ed

|||

What do you see when you look at the Primary in SSMS? ...And the Partner?

For me, I see:

Primary: TRACKIT(Principal, Synchronized)

Partner: TRACKIT(Mirror, Synchronized/Restoring...)

Again, when I'm using SSMS from my WS and I right click the Primary=>Tasks I see:

--

Mirror...

Ship Transaction Logs...

-

But when I TS into the actual DB server and right click the Primary=>Tasks I see:

--

Mirror...

Launch Database Mirroring Monitor...

Ship Transaction Logs...

-

And like wow, I just realized that the server has spk1 and my WS doesn't....oops :)

-Derik

"Launch Database Mirroring Monitor" is not an option

Good morning all...

I would like use the "Database Mirroring Monitor" to track what's going on.

All three of my servers have SQL Server 2005 x64 edition installed with SP1.

Server A is mirroring to Server C

Server B is mirroring to Server C

Following the instructions at http://msdn2.microsoft.com/en-us/library/ms365786(d=ide).aspx:

On Server A and C, "Launch Database Mirroring Monitor" appears.

On Server B, "Launch Database Mirroring Monitor" does NOT appear.

Is there something I have to do to get this tool installed on the machine, or it is an automatic thing?

Thanks!

Forch

It is installed automatically.

Here's my suggestion. Are you sure that you have installed SP1 on machine B?

I don't know what else to suggest. I'm following up with some of the testers.

Thanks,

Mark

|||

Hi...

Yes... SP1 was installed on all three machines. The version displayed for all machines is 9.0.2047.

Thanks,

Forch

|||

I have no idea why you can't see the Database Mirroring Monitor on your server.

Go ahead and run "sqlmonitor.exe" from \tools\binn, and then select "go" and then "dbm monitor"

That should at least allow you to get the monitor up and running.

Thanks,

Mark

|||

I came across this thread when looking for answers to exactly this question, but when I go run the sqlmonitor.exe mentioned in the previous post I just get a replication monitor up that doesn't give me any options to do anything...

What am I missing?

Thanks

Ed

|||

I suspect that by now you've figured this out but, in case it helps others....

When I connect from a WS using SSMS to the instance of the server hosting the mirror I do not see Database Mirroring Monitor as described by others above. However, if I TermServe into the server and connect to the instance using SSMS the option is there.

As cool as mirroring is, it looks like it might still have a few rough edges. Hope that helps.

-D

|||

I just terminalled into the db server but alas, no Database Mirroring Monitor.

oh well....thanks anyway

ed

|||

What do you see when you look at the Primary in SSMS? ...And the Partner?

For me, I see:

Primary: TRACKIT(Principal, Synchronized)

Partner: TRACKIT(Mirror, Synchronized/Restoring...)

Again, when I'm using SSMS from my WS and I right click the Primary=>Tasks I see:

--

Mirror...

Ship Transaction Logs...

-

But when I TS into the actual DB server and right click the Primary=>Tasks I see:

--

Mirror...

Launch Database Mirroring Monitor...

Ship Transaction Logs...

-

And like wow, I just realized that the server has spk1 and my WS doesn't....oops :)

-Derik

"Incorrect syntax" exception when prefacing SP names with "dbo." and named p

We're currently trying to evaluate SQLJDBC 2005 1.1 June CTP's support for database mirroring automatic failover. Unfortunately we're getting unexpected exceptions for calls that work fine w/ jtds that our blocking our ability to perform these evaluations without us making substantial changes to our codebase.

The first issue is with the name used when calling a stored procedure -- SP names that start with "dbo." give us the following error:

com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '.'. src:{call dbo.xyz(?,?,?,?,?,?,?,?)}

The call will work if we change the SQL statement to {call xyz(...)}. I don't understand why we would need to do this, especially given that the documentation for the driver shows call statements with the "dbo." prefix.

We're also having problems using named parameters with stored procedures (for both in and out parametes). Our code has parameter names of the form "@.param" as is standard with TSQL (and is required when using jtds). However, this won't work with SQLJDBC -- it only seems to accept parameter names w/o the leading "@.". Why is this so?

Finally, we were able to cause a NullPointerException within the driver due to an incorrectly built Properties object that contained an Integer for loginTimeout instead of a String:

java.lang.NullPointerException

at java.util.Hashtable.put(Hashtable.java:396)

at java.util.Properties.setProperty(Properties.java:128)

at com.microsoft.sqlserver.jdbc.SQLServerDriver.fixupProperties(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerDriver.mergeURLAndSuppliedProperties(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)

While this was due to a bug in our code I would think that such common errors would be better handled.

Hi,

I am not able to reproduce the error that you are seeing with executing a stored procedure with the dbo prefix. What you have provided there looks like it should work fine. Could you provide a code sample that demonstrates the error?

Thank you,

--David Olix

JDBC Development

|||

We're using the Spring JDBC template helper classes in this instance :

JdbcTemplate t = getJdbcTemplate();

Object result = t.execute("{call dbo.SP(?, ?, ?, ?, ?, ?, ?)}",
new CallableStatementCallback() {
public Object doInCallableStatement(CallableStatement cs) throws SQLException, DataAccessException {
cs.registerOutParameter( "@.pParam1", Types.INTEGER );
cs.registerOutParameter( "@.pParam2", Types.DATE );
cs.registerOutParameter( "@.pParam3", Types.DATE );
cs.registerOutParameter( "@.pParam4", Types.DATE );
cs.registerOutParameter( "@.pParam5", Types.INTEGER );
cs.setInt("@.pParam6", i)
cs.setString( "@.pParam7", s1);
cs.setString( "@.pParam8", s2);
cs.execute();

return result; // object created based on out params

}

The template is basically doing a "connection.prepareCall()" with the passed in SQL string, and then calling doInCallableStatement from within a try/catch block that translates

exceptions.

Were you able to reproduce the issue with "@." not being accepted for named params? That problem is effectively impossible for us to workaround, as we would need

to alter large sections of code when switching between jtds and sqljdbc.

|||

Ok, I was able to track down the cause of the Incorrect syntax exception by running a DB trace. The core problem appears to be the use of named parameters -- the call to registerOutParameter resulted in the following being executed on the server:

exec sp_sproc_columns dbo.SP, @.ODBCVer=3

This statement is incorrect -- it needs to be exec sp_sproc_columns [dbo.SP], @.ODBCVer=3

|||

Yes, that's it. If you'd like to submit a bug so that you can track progress on the fix, you may do so through the MSDN Product Feedback center at http://msdn.microsoft.com/feedback . You may have to jump through one small hoop (search for a resolution to your problem) before being taken to the "submit feedback" button that goes to the bug submission form.

I am still researching the "@." issue and will get back to you when I have an answer there.

Thank you,

--David Olix

JDBC Development

"Incorrect syntax" exception when prefacing SP names with "dbo." and nam

We're currently trying to evaluate SQLJDBC 2005 1.1 June CTP's support for database mirroring automatic failover. Unfortunately we're getting unexpected exceptions for calls that work fine w/ jtds that our blocking our ability to perform these evaluations without us making substantial changes to our codebase.

The first issue is with the name used when calling a stored procedure -- SP names that start with "dbo." give us the following error:

com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '.'. src:{call dbo.xyz(?,?,?,?,?,?,?,?)}

The call will work if we change the SQL statement to {call xyz(...)}. I don't understand why we would need to do this, especially given that the documentation for the driver shows call statements with the "dbo." prefix.

We're also having problems using named parameters with stored procedures (for both in and out parametes). Our code has parameter names of the form "@.param" as is standard with TSQL (and is required when using jtds). However, this won't work with SQLJDBC -- it only seems to accept parameter names w/o the leading "@.". Why is this so?

Finally, we were able to cause a NullPointerException within the driver due to an incorrectly built Properties object that contained an Integer for loginTimeout instead of a String:

java.lang.NullPointerException

at java.util.Hashtable.put(Hashtable.java:396)

at java.util.Properties.setProperty(Properties.java:128)

at com.microsoft.sqlserver.jdbc.SQLServerDriver.fixupProperties(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerDriver.mergeURLAndSuppliedProperties(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)

While this was due to a bug in our code I would think that such common errors would be better handled.

Hi,

I am not able to reproduce the error that you are seeing with executing a stored procedure with the dbo prefix. What you have provided there looks like it should work fine. Could you provide a code sample that demonstrates the error?

Thank you,

--David Olix

JDBC Development

|||

We're using the Spring JDBC template helper classes in this instance :

JdbcTemplate t = getJdbcTemplate();

Object result = t.execute("{call dbo.SP(?, ?, ?, ?, ?, ?, ?)}",
new CallableStatementCallback() {
public Object doInCallableStatement(CallableStatement cs) throws SQLException, DataAccessException {
cs.registerOutParameter( "@.pParam1", Types.INTEGER );
cs.registerOutParameter( "@.pParam2", Types.DATE );
cs.registerOutParameter( "@.pParam3", Types.DATE );
cs.registerOutParameter( "@.pParam4", Types.DATE );
cs.registerOutParameter( "@.pParam5", Types.INTEGER );
cs.setInt("@.pParam6", i)
cs.setString( "@.pParam7", s1);
cs.setString( "@.pParam8", s2);
cs.execute();

return result; // object created based on out params

}

The template is basically doing a "connection.prepareCall()" with the passed in SQL string, and then calling doInCallableStatement from within a try/catch block that translates

exceptions.

Were you able to reproduce the issue with "@." not being accepted for named params? That problem is effectively impossible for us to workaround, as we would need

to alter large sections of code when switching between jtds and sqljdbc.

|||

Ok, I was able to track down the cause of the Incorrect syntax exception by running a DB trace. The core problem appears to be the use of named parameters -- the call to registerOutParameter resulted in the following being executed on the server:

exec sp_sproc_columns dbo.SP, @.ODBCVer=3

This statement is incorrect -- it needs to be exec sp_sproc_columns [dbo.SP], @.ODBCVer=3

|||

Yes, that's it. If you'd like to submit a bug so that you can track progress on the fix, you may do so through the MSDN Product Feedback center at http://msdn.microsoft.com/feedback . You may have to jump through one small hoop (search for a resolution to your problem) before being taken to the "submit feedback" button that goes to the bug submission form.

I am still researching the "@." issue and will get back to you when I have an answer there.

Thank you,

--David Olix

JDBC Development

Saturday, February 25, 2012

"Certificate not yet valid"

Hi guys,

I'm having this really strange issue with mirroring.

I've followed the instructions on http://msdn2.microsoft.com/en-us/library/ms191140.aspx to the letter, leaving out the witness server part, as I don't have one.

All works OK, but when activating the mirroring on the principal server I get the usual error 1418 error. I fired up SQL Server Profiler to see what was happening, and the following error emerged.

Connection handshake failed. The certificate used by the peer is invalid due to the following reason: Certificate not yet valid. State 104.

Anyone have any ideas?

If you live in the eastern hemisphere the newly created certificate is not yet valid at creation for a number of hours equal with the time difference between you time zone and GMT.
You van specify the certificate start date explictly one day in the past or wait for the numbers of hours specified (they are probably valid by now)

HTH,
~ Remus|||

Well, I live in GMT, but it works now, so I can only presume something similar was the problem.

Cheers