Please anybody suggest me how to write a script which compares the jobs on the primary and the secondary server.
Thanks, Venk
Red-Gate SQL Compare will compare and script all (or at least most?) objects between two SQL Servers.
They also offer an API that lets you write .NET code to programatically compare and sync objects.