DTS runs but Job dont

  • I build a DTS to delete and copy a database, so the DTS runs good, when I schedule it the job always failed

    saying the database does not exist .

    I tried run this:

    master..xp_cmdshell 'DTSRUN /s "mirsql01" /U "user" /P "password" /N "Temp_bill_from_foxpro"'

    and

    I gotta the same message Database does not exist

       Error string:  [Microsoft][ODBC Visual FoxPro Driver]File 'temp_billable.dbf' does not exist.

    I run the DTS and it runs good again no problems,

    any ideas why the job failed?

    thanks

    Nelson

  • When you run the job interactively the task will impersonate you and have your credentials when looking for the file.

    When the sql server agent executes the job it will on have the permissions associated with the SQL Server agent login if the owner is a member of the sysadmin fixd role; or the permissions of the job owner if the user is a windows user; or as the proxy account if the owner is a SQL Server user login. 

    Most likely the case is you are a sysadmin and the job owner default to sysadmin in your case so the sql server login cannot find the file because of the differing permissions.

    Peter Evans (__PETER Peter_)

  • xp_'s all run in context of the agent account.

    Peter Evans (__PETER Peter_)

  • I'm running it as 'sa'

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply