SQL Server Performance

Failed to launch 'osql'

Discussion in 'Performance Tuning for SQL Server Replication' started by marco, Sep 13, 2006.

  1. marco New Member

    I use one-way Transactional Replication on 38 servers with same configuration.
    On one server I have problem with OSQL.EXE path.

    On
    Publication properties ->
    snapshot ->
    Additional scripts ->
    Before applying the snapshot, execute this script:
    Is set preinit script (C:ReplDataReplPreInit.sql).

    On Distribution agent properties -> step "Run Agent"
    I set additional command for log problem.
    command= -Output C:ReplOutFile.txt -Outputverboselevel 2

    Here is part of ReplOutFile.txt:
    --------------------------------
    The osql command is: "C:program FilesMicrosoft SQL Server80ToolBinnosql.exe" -U"***" -P"***" -i "\STROSBBReplDatauncSTROSBB_antikor_DataCDB20060908104051ReplPreInit_0.sql" -S "BTSVR" -d "AntikorCDB" -o "C:WINNTTEMPReplPreInit_0.sql_20060912150416.log" -b -X1
    Launching osql to apply the script 'ReplPreInit_0.sql'
    [9/12/2006 3:04:16 PM]STROSBB.distributionAntikor: {call sp_MSadd_distribution_history(1, 3, ?, ?, 0, 0, 0.00, 0x00, 1, ?, 0, 0x01, 0x00)}
    Agent message code 20130. Failed to launch 'osql'
    [9/12/2006 3:04:16 PM]STROSBB.distributionAntikor: {call sp_MSadd_distribution_history(1, 6, ?, ?, 0, 0, 0.00, 0x01, 1, ?, 4, 0x01, 0x01)}
    Adding alert to msdb..sysreplicationalerts: ErrorId = 1233,
    Transaction Seqno = 00000491000618f4007000000001, Command ID = 4
    Message: Replication-Replication Distribution Subsystem: agent STROSBB-antikor-BTSVR-1 failed. Failed to launch 'osql'[9/12/2006 3:04:16 PM]STROSBB.distributionAntikor: {call sp_MSadd_repl_alert(3, 1, 1233, 14151, ?, 4, N'STROSBB', N'antikor', N'BTSVR', N'AntikorCDB', ?)}
    ErrorId = 1233, SourceTypeId = 3
    ErrorCode = '3'
    ErrorText = 'The system cannot find the path specified.
    --------------------------------

    Problem is that the path to osql command in log ReplOutFile.txt is
    C:program FilesMicrosoft SQL Server80ToolBinnbut SQL is installed on path
    C:program FilesMicrosoft SQL Server80ToolsBinn
    Diferences is between Tool vs. Tools

    I think that when server create OSQL command for preinit sql script he use STATIC path to osql.exe and there is my problem.

    Where is this path stored and can I change it?
  2. satya Moderator

    On that server can you go to command prompt and type OSQL and see.
    Ensure the system path has relevant SQL binary files path.

    Satya SKJ
    Microsoft SQL Server MVP
    Contributing Editor & Forums Moderator
    http://www.SQL-Server-Performance.Com
    This posting is provided AS IS with no rights for the sake of knowledge sharing.
  3. marco New Member

    Environment Variables -> Path is set correctly.
    OSQL work fine.
    There is no problem.

    I tested run osql command from command prompt without path and script finished seccesfuly.
    Here is tested command:
    C:eek:sql.exe -U"***" -P"***" -i "\STROSBBReplDatauncSTROSBB_antikor_DataCDB20060908104051ReplPreInit_0.sql" -S "BTSVR" -d "AntikorCDB" -o "C:WINNTTEMPReplPreInit_0.sql_20060912150416.log" -b -X1

Share This Page