Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 SMO code not working

Author  Topic 

dmaxj
Posting Yak Master

174 Posts

Posted - 2012-08-10 : 14:57:11
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:)

Any ideas would be appreciated - Regards.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-08-10 : 15:14:37
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.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-08-10 : 15:14:51
You can use a UNC path to get it to your local box.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

dmaxj
Posting Yak Master

174 Posts

Posted - 2012-08-10 : 15:47:32
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.

Thanks
Go to Top of Page

dmaxj
Posting Yak Master

174 Posts

Posted - 2012-08-15 : 17:26:28
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.

Is there anything else that I need to do?

Regards
Go to Top of Page

dmaxj
Posting Yak Master

174 Posts

Posted - 2012-08-17 : 10:16:16
So, does it sound likely that I should install Client Tools on both nodes?
Go to Top of Page
   

- Advertisement -