Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

mirroing - Restoring Expand / Collapse
Author
Message
Posted Thursday, October 25, 2012 5:10 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 17, 2014 7:28 AM
Points: 155, Visits: 202
Hi,
We have mirroing setup for DR purposes.
i.e.
server mdr is mirroing server m

Question:
1-
When I go to the mdr machine in sql server, I see the word restoring for all the databases and so when I try to do a select query from one of the databases, it says that the database is in the middle of a restore and therefore does not return data.
How can I then chek to see if the data inside mdr is indeed correct ?

2-
in machine m, there are sql server agent jobs.
in mdr machine, I do not see the sql server agents. How do I see them.

Thanks
Post #1376925
Posted Thursday, October 25, 2012 5:22 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:35 PM
Points: 40,438, Visits: 36,895
If the mirroring is working, the data in the mirror DB will be correct. You could take a snapshot off the mirror and query that if you want.

SQL Agent jobs are not included in mirroring, mirroring is just the DB you configure, jobs are in MSDB. If you want them, you have to transfer them.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1376928
Posted Thursday, October 25, 2012 5:34 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 17, 2014 7:28 AM
Points: 155, Visits: 202
GilaMonster (10/25/2012)
If the mirroring is working, the data in the mirror DB will be correct. You could take a snapshot off the mirror and query that if you want.

SQL Agent jobs are not included in mirroring, mirroring is just the DB you configure, jobs are in MSDB. If you want them, you have to transfer them.

The applications (User screens) are pointing to the machine m (Prod server).
how do I know that if the machine m goes down, then automatically the applications are redirected to the mdr (DR database machine)?
Post #1376932
Posted Thursday, October 25, 2012 5:43 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 17, 2014 7:28 AM
Points: 155, Visits: 202
GilaMonster (10/25/2012)

SQL Agent jobs are not included in mirroring, mirroring is just the DB you configure, jobs are in MSDB. If you want them, you have to transfer them.

How can the sql server jobs appear in the mdr machine?
I mean how can they be copied so that I see them as I do in the prod management studio in sql server?
Thanks
Post #1376935
Posted Thursday, October 25, 2012 5:59 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 10:43 AM
Points: 6,641, Visits: 14,226
arkiboys (10/25/2012)
GilaMonster (10/25/2012)
If the mirroring is working, the data in the mirror DB will be correct. You could take a snapshot off the mirror and query that if you want.

SQL Agent jobs are not included in mirroring, mirroring is just the DB you configure, jobs are in MSDB. If you want them, you have to transfer them.

The applications (User screens) are pointing to the machine m (Prod server).
how do I know that if the machine m goes down, then automatically the applications are redirected to the mdr (DR database machine)?

Depending on your applications connectivity (only through ADO.NET or SQL Native client IIRC) there is a "Failover Partner =" option for the connection string which will automatically redirect to a mirror partner.

What mode is your mirroring session using, do you have a witness server?


-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1376941
Posted Thursday, October 25, 2012 6:00 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 10:43 AM
Points: 6,641, Visits: 14,226
arkiboys (10/25/2012)
GilaMonster (10/25/2012)

SQL Agent jobs are not included in mirroring, mirroring is just the DB you configure, jobs are in MSDB. If you want them, you have to transfer them.

How can the sql server jobs appear in the mdr machine?
I mean how can they be copied so that I see them as I do in the prod management studio in sql server?
Thanks

script the jobs out and copy them same as the logins too.
Either that or use an SSIS package task to transfer the objects for you


-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1376943
Posted Thursday, October 25, 2012 6:07 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:35 PM
Points: 40,438, Visits: 36,895
arkiboys (10/25/2012)
how do I know that if the machine m goes down, then automatically the applications are redirected to the mdr (DR database machine)?


Run a DR test. Fail the mirroring over and check that the apps reconnect properly. You can fail back afterwards. If you have the connection string set correctly it should work. Actually, should work even without that, read up on transparent client redirect.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1376945
Posted Thursday, October 25, 2012 8:38 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 17, 2014 7:28 AM
Points: 155, Visits: 202
Perry Whittle (10/25/2012)
arkiboys (10/25/2012)
GilaMonster (10/25/2012)

SQL Agent jobs are not included in mirroring, mirroring is just the DB you configure, jobs are in MSDB. If you want them, you have to transfer them.

How can the sql server jobs appear in the mdr machine?
I mean how can they be copied so that I see them as I do in the prod management studio in sql server?
Thanks

script the jobs out and copy them same as the logins too.
Either that or use an SSIS package task to transfer the objects for you

I can script the job in production.
In the script, I see the name for the production server.
On running this script in the mdr (mirrored server), do I change the production server name to the mirrored server name?
Post #1377041
Posted Thursday, October 25, 2012 8:46 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 10:43 AM
Points: 6,641, Visits: 14,226
arkiboys (10/25/2012)
I can script the job in production.
In the script, I see the name for the production server.
On running this script in the mdr (mirrored server), do I change the production server name to the mirrored server name?

Hmm, for a local server job you generally won't see the server name, is this a mutli server job?
Can you post the section of the script in question?


-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1377045
Posted Friday, October 26, 2012 4:41 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 17, 2014 7:28 AM
Points: 155, Visits: 202
Some of these jobs are executing ssis packages with parameters, etc...
That is fine, I just change the name of the server in the sql jobs.
Thanks
Post #1377465
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse