SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 SMO code not working
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dmaxj
Posting Yak Master

164 Posts

Posted - 08/10/2012 :  14:57:11  Show Profile  Reply with Quote
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

USA
35007 Posts

Posted - 08/10/2012 :  15:14:37  Show Profile  Visit tkizer's Homepage  Reply with Quote
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

USA
35007 Posts

Posted - 08/10/2012 :  15:14:51  Show Profile  Visit tkizer's Homepage  Reply with Quote
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

164 Posts

Posted - 08/10/2012 :  15:47:32  Show Profile  Reply with Quote
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

164 Posts

Posted - 08/15/2012 :  17:26:28  Show Profile  Reply with Quote
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

164 Posts

Posted - 08/17/2012 :  10:16:16  Show Profile  Reply with Quote
So, does it sound likely that I should install Client Tools on both nodes?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000