Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-36689

Windows Power Shell - Trying to execute SQL server Query using Windows Power shell Plugin and its throwing error as

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • powershell-plugin
    • None

      This has been assigned a sblocker because we have jenkins POC at ORG Level on wednesday and need to sort out before that

      Trying to execute SQL query using windows power shell plugin which is working fine in cmd but when i paste the same in Jenkin Windows power shell plugin its displaying below eeror

      SQLCMD -S DBINSTANCE -Q "Select Count from DBTABLE with (nolock);"

      Started by user anonymous
      Building in workspace C:\Program Files (x86)\Jenkins\jobs\WindowsPowerShell\workspace
      [workspace] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 'C:\WINDOWS\TEMP\hudson4262101233229977039.ps1'"
      The term 'SQLCMD' is not recognized as the name of a cmdlet, function, script f
      ile, or operable program. Check the spelling of the name, or if a path was incl
      uded, verify that the path is correct and try again.
      At C:\WINDOWS\TEMP\hudson4262101233229977039.ps1:1 char:7
      + SQLCMD <<<< -S DBINSTANCE -Q "Select Count from DBTABLE with (nolock);"
      + CategoryInfo : ObjectNotFound: (SQLCMD:String) [], CommandNotFo
      undException
      + FullyQualifiedErrorId : CommandNotFoundException

            froque Filipe Roque
            vmaradana Vamsi Kalyan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: