January 8, 2016 at 7:43 am
Yes, to start the process off you supply '1' for the initialize parameter, it then uses the full backup and all logs.
Subsequently, later after more log backups were taken, you supply '0' to just restore the new log backups.
Cheers
January 8, 2016 at 8:49 am
Here's the interesting thing while i tested with Log shipping option set to 1, it is throwing an error:
PS C:\> C:\Automate\TEST\Restore\ps_RestoreGene_v4.0.ps1 -LogShippingInitialize "1"
cmdlet ps_RestoreGene_v4.0.ps1 at command pipeline position 1
Supply values for the following parameters:
RestoreLog: -DBName "BaselineData" `
PrimaryServer: -PrimaryServer "XXX" `
StandbyServer: -StandbyServer "ZER" `
DBName: -FromFileFullUNC "\\XXXF\Prod_Backups\XXX\BaselineData\FULL\" `
-PrimaryServer "XXX" `
Error : Connection to Primary server cannot be established
At C:\Automate\TEST\Restore\ps_RestoreGene_v4.0.ps1:101 char:5
+ throw "Error : Connection to Primary server cannot be established"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Error : Connect... be established:String)
+ FullyQualifiedErrorId : Error : Connection to Primary server cannot be established
Also, i checked to query the primary server from standby and it was success , but not with PSrestoregene.
Any help would be appreciated?
January 8, 2016 at 9:01 am
Are there any login failures in the SQL server error log on the primary?
Is the tcp-ip protocol enabled on the primary?
Regards
January 8, 2016 at 9:13 am
No login failure messages on primary and I checked TCP IP is enabled on primary as well.
January 8, 2016 at 9:42 am
You might need this installed on the server you are running powershell from - http://www.microsoft.com/en-gb/download/details.aspx?id=11829
Regards
January 13, 2020 at 10:00 am
Thanks Paul for the wonderful script.
I have a requirement where the Primary and Secondary are in totally different domain. Now I am moving files through FTP. Can you help me in syncing the Primary and Secondary in Stand by mode. This is for a reporting application.
Thanks In Advance.
Viewing 6 posts - 31 through 36 (of 36 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy