Re: SQLAgent 2005 SP1 failed to run .bat file.



Amber (guxiaobo1982@xxxxxxxxx) writes:
Following is our test steps.
1. Create directory E:\firefly in E:.
2. Create a test file a.txt in E:\firefly.
3. Create E:\firefly\test.bat file with the following commands:
cd E:\firefly
copy a.txt b.txt

Where is SQL Server installed? If it's installed on C:, the CD command
which change the default directory on the E drive, but it will not
change the drive. You need to add this line to the file:

E:

5. Save the job and run it, Management Studio tells the job faild, but
did not tell an error message.

Find the job under SQL Server Agent, right-click and select View History.
For each job execution there is a cross, click on this to expand the
job steps. The read the output for the individual steps.



--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: 3 Simple Security SQL Statements
    ... If you run the SELECT in a query window, it generates the list of commands ... There is procedure called sp_executesql that will take a string and execute ... Kalen Delaney, SQL Server MVP ... Builds a list of text commands. ...
    (microsoft.public.sqlserver.security)
  • Re: 3 Simple Security SQL Statements
    ... Builds a list of text commands. ... You could also use a DDL trigger to grant rights to WebUserRole ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.security)
  • Re: newbie problem: updating an access db
    ... modifying the code to use SQL Server it still exhibited the same ... changed the path to the supplied access .mdb file in the web.config ... the delete and update commands, so now they just test whether Adnum= ?. ... get this code to work, I don't want to start modifying it to use MSSQL, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: A desperate plea for help....
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... app in which collects data from a wedge scanner via barcodes. ... I have created the sql connection, data adapter, and data set as ... and DELETE commands with the text strings. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Too Many SET Options
    ... By default its creating lot of 'SET' commands. ... the script to work with an indexed view or an indexed computed column. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)