SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Log Shipping Jobs on Secondary not getting created


Log Shipping Jobs on Secondary not getting created

Author
Message
Al-Rahim
Al-Rahim
SSC Journeyman
SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)

Group: General Forum Members
Points: 89 Visits: 159
This script is good enough and it must create those JOBS...
Did you try to execute this script at destination server without get any has an output? sems quit perplexing
Well, then.... You should create manually each job, (copy & restore).

Copy
Naming: LSCopy_sourcesrvname,pornumber_DBSource
, step 1, type Operating system (cmdexec)

"C:\apps_srv\mssql\100\Tools\Binn\sqllogship.exe" -Copy "NRO_GUID_1" -server "destination_server_instance"

Restore
Naming: LSRestore_sourcesrvname,pornumber_DBDestination
, step 1, type Operating system (cmdexec)

"C:\apps_srv\mssql\100\Tools\Binn\sqllogship.exe" -Restore "NRO_GUID_1" -server "destination_server_instance"


NRO_GUID_1-> id in msdb.dbo.log_shipping_secondary create by some like
insert into msdb.dbo.log_shipping_secondary(NEWID(),'sourceserver,portnumber',
primary_database,
backup_source_directory,
backup_destination_directory,
file_retention_period,
copy_job_id ,--> id from select * from sysjobs create early
restore_job_id ,--> id from select * from sysjobs create early
monitor_server,
monitor_server_security_mode,
user_specified_monitor,
last_copied_file - null,
last_copied_date -null)

So, first create both jobs with "id_guid" as a text, then insert into table take guid number and edit job command as needeed... and tell us how it work.

Regards! FPB
Del Lee
Del Lee
Mr or Mrs. 500
Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)

Group: General Forum Members
Points: 555 Visits: 1337
Thanks, Al-Rahim, I may try that later. Since this is a test, I have also tried log shipping to another secondary. For those trials, the jobs get created successfully, but the copy job fails with an "Could not retrieve copy settings for secondary id '*****'. Then, I tried to log ship to this same secondary without providing a monitor. In this case, all is working.

I am continuing to research this, as I need to logship to the original secondary and I must have a monitor.



Del Lee
amitsdba
amitsdba
SSC Journeyman
SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)

Group: General Forum Members
Points: 86 Visits: 33
Good Morning Del Lee,


I too facing the same issue.Did you get the solution for this issue?.

It will be great if you share it.

Regards
Del Lee
Del Lee
Mr or Mrs. 500
Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)

Group: General Forum Members
Points: 555 Visits: 1337
Did you get the solution for this issue?


No, I was never able to get this resolved. In the end, I believe it was a network issue because the secondary was on a different network. I'm sure there is a solution for this scenario, but it was not critical in our case to pursue it beyond what I had already done. Good luck with your situation.



Del Lee
Al-Rahim
Al-Rahim
SSC Journeyman
SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)

Group: General Forum Members
Points: 89 Visits: 159
The error refers to an account entitlement error... so give properly permissions to secondary agent server account. You should have same account in both primary and secondary servers. Also see permissions at windows level (the secondary agent server account should have read permission for destination backup folder)
That will solve your issue.. Please, let us know.
Regards.
Del Lee
Del Lee
Mr or Mrs. 500
Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)Mr or Mrs. 500 (555 reputation)

Group: General Forum Members
Points: 555 Visits: 1337
Al-Rahim (7/15/2013)
The error refers to an account entitlement error... so give properly permissions to secondary agent server account. You should have same account in both primary and secondary servers. Also see permissions at windows level (the secondary agent server account should have read permission for destination backup folder)


As I recall, I did all of that and it was still unsuccessful. Note that this was over a year ago and Log Shipping was only going to be temporary solution at that time. The secondary server does not exist anymore and we have moved on to another DR solution, so there is no way to retry nor is there any need to retry using that exact scenario.

Thanks for your concern.



Del Lee
amitsdba
amitsdba
SSC Journeyman
SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)

Group: General Forum Members
Points: 86 Visits: 33
Hi,

I gave same user name and password(administrator) to both sql server agent accounts as well as sql services on both the servers.Complete read and write permissions were give to all the necessary folders.But still the same issue.

Regards
Al-Rahim
Al-Rahim
SSC Journeyman
SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)

Group: General Forum Members
Points: 89 Visits: 159
HI amitsdba... those servers live in same domain? Try this: create a group domain level, and give it permission in both servers, create a couple of account on it(one for each server o use the same it's up to you) ... that should resolve any permissions issue. If not, please post error log message.
amitsdba
amitsdba
SSC Journeyman
SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)

Group: General Forum Members
Points: 86 Visits: 33
Hi Al-Rahim/Del Lee,

I reinstalled sql server 2005 on both primary server and standby server on virtual machine and issue got resolved and log shipping started working fine.I think issue was with changing the server name after sql server installation .

Thanks for Al-Rahim & Del Lee for your time.
alan.cdes
alan.cdes
Grasshopper
Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)

Group: General Forum Members
Points: 15 Visits: 192
Yes, the problem was change the servername.

when select @@servername returns null, the jobs are not created.

I had the same issue and after i have corrected the servername the jobs were created.

@@Servername of null can happen if there is no entry in sys.servers for server_id 0. check sys.servers with this:

select * from sys.servers

steps to correct:

sp_dropserver '<servername>' -- if exist a one with the correct servername but id different from 0

sp_addserver '<servername', local

restart service:

source: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/f5405442-2ab9-4e9f-8688-2e8ce5dae853/servername-returning-null?forum=sqldatabaseengine
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search