About 735,000 results
Open links in new tab
  1. How to I run a single sql command from the sqlcmd prompt?

    The answer above uses lowercase -q, which will run the command but leave the sqlcmd prompt open and running. Depending on what you want, the case of the -Q/-q argument matters.

  2. Invoke-Sqlcmd doesn't allow TrustServerCertificate - Stack Overflow

    Nov 9, 2023 · 25 Fundamentally - unfortunately - there are two - technically distinct - Invoke-SqlCmd cmdlets: The obsolete Invoke-SqlCmd command from the obsolete SQLPS module. …

  3. How do I call a stored procedure with arguments using sqlcmd.exe?

    Jun 19, 2011 · I need to call a stored procedure and pass arguments in from Powershell. I think the best option is to use sqlcmd.exe but I'm not sure how to pass arguments to the stored proc …

  4. How to connect to SQL Server from command prompt with …

    Mar 21, 2014 · Sqlcmd -u username -p password assumes a username & password for the SQL Server already setup Alternatively how can I setup a user account from command prompt? I've …

  5. ODBC Driver 18 for SQL Server]SSL Provider: [error:1416F086]

    Mar 31, 2022 · sqlcmd -S localhost -U sa -P 'YourPassword' -C Or as mentioned in Microsoft Docs: Try using the IP address 127.0.0.1 instead. It's possible that localhost isn't properly …

  6. How to execute sqlcmd from powershell? - Stack Overflow

    I have a string in powershell, which contains a native sqlcmd command. The command itself can be executed successfully in cmd.exe. I have difficulty in executing them in powershell. Anyone …

  7. How to connect Sqlcmd to the server? - Stack Overflow

    Jan 7, 2013 · Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books …

  8. sql server 2005 - Sqlcmd to generate file without dashed line …

    sqlcmd -S . -d MyDb -E -s, -W -Q "select account,rptmonth, thename from theTable" | findstr /v /c:"-" /b > "c:\dataExport.csv" & exit 0 What this does is it intercepts all console output and …

  9. trying to run sqlcmd fails, unable to establish connection?

    Oct 25, 2010 · When I try to run sqlcmd (from the cmd prompt) I get the following error: HResult 0x2, Level 16, State 1 Named Pipes Provider: Could not open a connection to SQL Server [2]. …

  10. how to add a user to local sql server when one has only windows …

    Dec 11, 2020 · Run the following command to start SQL Server in single user mode. As SQLCMD is being specified, only one SQLCMD connection can be made (from another command …