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

Executing a script from SQL Server Expand / Collapse
Author
Message
Posted Sunday, September 23, 2001 12:00 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 7:12 AM
Points: 31,284, Visits: 15,746
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/sjones/scriptscheduling.asp






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1089
Posted Wednesday, October 17, 2001 1:06 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, July 31, 2007 8:20 AM
Points: 885, Visits: 1
Good article steve. Perhaps worth while mentioning how you can load up sql*server tables from the results of a external command being executed? I cant remember the exact syntax as its 2am and i had a screaming baby in my ear :) but its a nice trick that i used when having to unzip a heap of files from a dir within t-sql.




Chris Kempster
www.chriskempster.com
Author of "SQL Server Backup, Recovery & Troubleshooting"
Author of "SQL Server 2k for the Oracle DBA"
Post #21744
Posted Thursday, October 18, 2001 9:27 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 7:12 AM
Points: 31,284, Visits: 15,746
I avoid putting the actual SQL in the steps because it creates a point of maintenance. I'd rather create a stored proc and change that if needed.

ckempste:
Not sure what you mean? Is this a BULK INSERT variation?


Steve Jones
steve@dkranch.net







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #21745
Posted Sunday, November 25, 2001 5:10 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, July 31, 2007 8:20 AM
Points: 885, Visits: 1
Steve

Hi Steve, I ment something like this:

truncate table infile_list

set @v_commandline = 'dir /B ' + @v_processeddest + '*.unl'


insert into infile_list
exec @result = master..xp_cmdshell @v_commandline


Where ive sent the output of the xp_cmdshell to a table for later processing.

Cheers

Chris






Chris Kempster
www.chriskempster.com
Author of "SQL Server Backup, Recovery & Troubleshooting"
Author of "SQL Server 2k for the Oracle DBA"
Post #21746
Posted Monday, November 26, 2001 8:41 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 7:12 AM
Points: 31,284, Visits: 15,746
That makes sense. I usually pipe to a file and then grep or findstr for any errors.

Steve Jones
steve@dkranch.net







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #21747
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse