Showing posts with label management. Show all posts
Showing posts with label management. Show all posts

Monday, March 26, 2012

Mirror database is not accessible when Mirroring is stopped.

Hi,

I've a very basic doubt about database mirroring. I did setup a database mirroring session with the help of SQL Server Management Studio between the server A (db1) and B(db1). When is stop database mirroring by using the command button "Stop Mirroring" available in the mirroring page of SQL Server Management Studio , the mirror database{ B(db1) } goes to state "Restoring...". After stopping the mirroring i'm not able to access the mirror database.

Can you please tell me how to bring mirror database B(db1) to operation mode so that we can start working with that database?

Regards,

Gopi

Hi Gopi. Hitting the 'Stop Mirroring' Button will in effect remove the database mirroring session for that particular database, not cause a failover...not sure if that's what you are trying to do, or if you really do mean to stop mirroring alltogether.

To simply bring the mirror copy into an operational state at the point you are at now, simply run something like the following on the mirror instance:

restore database <mirror database name> with recovery

This is very similar to as if you were restoring t-log backups to a particular database and wanted to recover it after applying the last one.

However, bear in mind that following the procedure you followed above is not what you'd want to do if you are in fact trying to 'failover' to the mirror copy of the database. For information on what you'd want to do there, click the 'Help' button from the mirroring dialog you were on above and see the topic titled 'Failover'.

HTH,

Monday, March 12, 2012

Mimic SQL Server Management Studio behavior inside RS Report

I want to know how to mimic the SSMS behavior inside an Reporting Services report when querying an XML field.

In SSMS, a field that is XML shows up as a link, and when the use clicks on the XML, it opens then entire XML document in a new window. I need this exact behavior in RS, but can't accomplish it.

Any smart people out there who can do this?

You would need to use a drillthrough or hyperlink action in the report. You could pass the value of the XML to the target URL.|||

Brian, thats the part that I dont understand. The target isn't in a file- it's in a field in the database. So, with one hyperlink action how do I extract the data, and present it in another IE window, formatted as XML (i.e. indentation, Expand/collapse nodes functionality, etc. like in IE or SSMS)

You say "pass the value of the XML". How do I construnct the hyperlink to do that? Just assign the field to the Drill to URL action? That seems to easy, but I'll give it a shot...

-Kory

|||

I didn't realize you were trying to get an interactive representation of the XML. You can't really accomplish what you want in a report as we don't deal with XML data hierarchically - the XML data extension will flatten it and the binding it into a textbox will simply display the string. (Native XML support is in the long term plans)

So, if you want an interactive view, I would create an ASPX page that took the XML data as a parameter and displayed the HTML then create a URL action to point to the page.