BCP error

  • I am running this script but I get the error below. Does someone have any idea.

    use

    tempdb

    go

    create

    view vw_bcpMasterSysobjects

    as

    select

    top 100 percent

    name

    ,

    crdate

    = convert(varchar(8),

    crdate

    , 112) ,

    crtime

    = convert(varchar(8), crdate, 108)

    from

    master..sysobjects

    order

    by crdate desc

    go

    declare

    @sql varchar(8000)

    select

    @sql = 'bcp tempdb..vw_bcpMasterSysobjects out \\tersclient\d\sysobjects.txt -c -t, -T -S' + @@servername

    exec

    master..xp_cmdshell @sql

    this is the error :------------- ---- -------------------------------------

    SQLState = S1000, NativeError = 0

    Error = [Microsoft][SQL Server Native Client 10.0]Unable to open BCP host data-file

    NULL

  • Please check if it has rights on the folder that you have specified. Or else, just use SSIS to do it.

Viewing 2 posts - 1 through 1 (of 1 total)

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