I have code for automating the scripting of SQL jobs. The code finds all the jobs and writes a file per job to a local drive (D:) - The code works on my local dev box. However, the code does not work when executed on another SQL Server on the LAN. The code comes back with successful execution, but no file gets written to the local drive (D:)
When you say the local D drive, do you mean on the database server or your local box? When code is run from a job, it runs on the database sever and not your local dev box.
The local drive refers to the the drive on each machine - D: exists on both. BUT, I think that I have figured out that the SQL Management objects have not be installed on the 'remote' SQL Server. I checked the registries of each and SMO is missing. I am also going to wrap my code in TRY...CATCH blocks to see if any 'silent' errors exist.
I have a 2 node cluster with 2 instances of SQL Server 2008R2 running on each node. I need the SQL Management Objects library installed across all instances. I RDP'd into virtual cluster name and installed Client Tools SDK from the SQL Installation, but I still do not show SMO installed in the registry.