Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Sep 2004
    Location
    Nashville, Tennessee, USA
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts
    We are upgrading from SQL2000 to SQL2008. I currently use bcp in several SQL Server Agent jobs to pull out data files to make available to other agencys. The tested job fails in SQL2008. Review of the bcp guidlines show the output file now must be enclosed in double quotes ["] however the job still fails and the error information is not helpful.

    Execution of job 'Your Abstract query' failed. See the history log for details'

    The only 'history' log I can find is the Server Manager Windows Logs under Application; where the following warning is displayed:

    "SQL Server Scheduled job 'Your Abstract query' (<long guid>)- Status: Failed - Invoked on: 2010-08-31 09:02:29 - Message: The job failed. The job was invoked by User sa. The last step to run was step 2 (Create Abstract file). The job was requested to start at step 2(Create Abstract file)."

    This bcp statement will execute using the command line:
    bcp db.dbo.AbstractOIR out "\\<server>\ftproot\Abstract.rpt" /c /S <server> /U sa /P <password>

    Any assistance would be appreciated.
    Bob

  2. #2
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,162
    Thanks
    47
    Thanked 976 Times in 906 Posts
    As the user is SA the job will most likely run using the SQL Agent credentials. Do these credentials allow file creation / write in the directory specified?

    cheers, Paul

  3. #3
    Lounger
    Join Date
    Sep 2004
    Location
    Nashville, Tennessee, USA
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by P T View Post
    As the user is SA the job will most likely run using the SQL Agent credentials. Do these credentials allow file creation / write in the directory specified?

    cheers, Paul
    Thank you Paul. The network guys did have to help us with several permission issues and it appears to have cured the problem.

    Bob

  4. #4
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,162
    Thanks
    47
    Thanked 976 Times in 906 Posts
    Network guys helping with permissions is usually a recipe for disaster!

    cheers, Paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •