Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to Schedule a Job in SQL Server Database Creation Script Expand / Collapse
Author
Message
Posted Sunday, May 15, 2011 1:22 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, July 21, 2011 8:30 AM
Points: 1, Visits: 7
I want to create a Job scheduler in SQL Server 2008 that should be create a log in text file and stored in some other drive automatically. So for that I think I must need some script. So may be you can give me the right suggestion to resolve my issue.

Thanks.
Post #1108871
Posted Sunday, May 15, 2011 5:31 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 12:06 AM
Points: 7,040, Visits: 12,958
You could use a WINDOWS scheduled task calling a bcp out command with a trusted connection.
Regarding details for bcp please see BOL (BooksOnLine, the SQL Server help syste usually installed together with SQL Server).
Another option would be using a SQL Server job and xp_cmdshell but that should require additiona lsteps to avoid making xp_cmdshell available for every user (which would open a security hole of unknown depth).
A third solution would be a SSIS package called.

I, personally, would use either the first or the second option.




Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Post #1108888
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse