SSIS error : Failed to lock variable "..." for read access ...

  • Hello,

    I want to use SSIS File System Task to copy 1 file to another folder :

    File System Task, Operation : CopyFile.

    2 variables defined :

    sourcepath : C:\111\PRODUCT.TXT

    destpath : C:\222\

    File System Task, Expression :

    Property : Source, Expression : @[User::sourcepath],

    Destination, Expression : @[User::destpath]

    IsSourcePathVariable : TRUE, IsDestinationPathVariable : TRUE

    Right-clicked File System Task and chose : Execute Task, I got the above error.

    I spent 2 days on this error but I don't know why I got this error.

    Is it a SSIS bug ? Or there was somethings wrong in my SSIS package ?

  • Have you set Expression to the variable and EvaluateAsExpression to True?

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • If I understand what you've described, you're a little confused on how to set up the task.

    If you have your file paths already specified in SSIS variables (specifically, in "sourcepath" and "destpath" variables), then you should NOT be using property expressions on the File System Task.

    You need to remove those expressions.

    All you should have to do after you've removed the expressions on the File System Task's properties is to set the IsSourcePathVariable property to true, and pull down the SourceVariable list to pick your "sourcepath" variable. Then, change the IsDestinationPathVariable to true, and pull down the DestinationVariable list to pick your "destpath" variable.

    Todd McDermid - SQL Server MVP, MCSD.Net, MCTS (SQL08BI)
    Find great SSIS extensions - most are open source - at SSIS Community Tasks and Components[/url]
    Are you doing Data Warehouse ETL with SSIS? Don't use the slow SCD Wizard, use the Kimball Method SCD component instead.

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

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