Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    David Engel
    @account0123 Did you install it locally? What options did you specify during installation? Did you configure an sa account and password? If yes, username = sa and password = the password you specified. If you did not configure an sa account, you can try integrated authentication (I'm assuming you are on Windows) by removing the lines setting the UserID and Password properties and add one that sets builder.IntegratedSecurity = true;
    Hi all, I am getting an incorrect syntax in my sqlcmd code to connect to sql server. I put "sqlcmd -S localhost -U sa -P mypassword". The error I'm getting is "Msg 102, Level 15, State 1, Server MyServerName, Line 1 Incorrect syntax near 'S'". Can someone please tell me what I am doing wrong. I have connected to sql server many times with no issue.
    I want to ask something
    @Tracey-Davis Follow this>>>>> https://www.microsoft.com/en-us/sql-server/developer-get-started, @David-Engel may have more simpler suggestion for you later.
    David Engel

    @Tracey-Davis If you can post a screenshot of what you are doing for context, that might help.

    @sandeep11823 Go ahead and ask.


    I have written a code in node.js code that is connected to MS-SQL server. It's working perfectly fine. Now i want to deploy it on my LIVE IIS server .

    Need a guidance in this regard
    I have "https://github.com/tjanczuk/iisnode" but its not working and i am not in intention to do any more experiments on live server.

    Anybody plesae help me. i am bady stuck ...
    need help ---> muhammadikhan@live.com

    David Engel
    @muhammadikhan You might want to try an IIS-specific forum. You'll find people much more experienced with IIS there. I recommend https://forums.iis.net/

    @David-Engel thanks for your help and response. No doubt this is a unique task and i have leant a new thing which is not common.

    I did my task from the help of below-mentioned link.


    If anyone need help regarding IIS or any .net framework, node.js integration with .net. please do me a query.

    many thanks
    have peace and stay blessed.

    Gerard Naughton
    Is there any good MS C++ api for SQL server? I can see that MS has an ODBC example but sqlapi looks easier to use.
    gitte lindgren
    after pasting the first block of code I end up with 5 errors. I do not knoe what to update: builder.DataSource = "localhost"; // update me
    builder.UserID = "sa"; // update me
    builder.Password = "your_password"; // update me
    builder.InitialCatalog = "master"; with vere do I get these information from?

    Hello! I need some help, first time with docker and I made a little console program with docker for MAC. And everything is working on my Mac, but when I try to open my program on another Mac I get error A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 35 - An internal exception was caught).

    What have I missed or what do I Need to do?

    Thanks in advance for the help! :)
    David Engel

    @naughtong The ODBC standard has been around for a long time and is likely the most popular for C++ apps. I'm not familiar with sqlapi.

    @gittewebmus_twitter You get those values from the database you configured for use with your application.

    @isabelpebaque That depends on where your program is trying to connect to the database. Both Macs will need a database installed if you have specified "localhost" for your server. If you have a separate database server, you can point your program to that specific server name and the program can work from either machine (assuming they have appropriate network access to each other).

    What is the proper protocol for logging a possible bug within SQL Server 2019? ( I have some T-SQL which shows a problem with @@ROWCOUNT within a user function called while iterating thru a cursor. This T-SQL produces correct results within SQL Server 2017 or when Compatibility Level is set to SQL Server 2017 and prior within SQL Server 2019 ) TIA
    David Engel
    @jclausius-sg The best/recommended route would be through Microsoft Support (https://support.microsoft.com/). They can more quickly help you find out if it's an actual bug or an expected behavior change. If you do not have a support contract with Microsoft, you can submit SQL feedback here: http://aka.ms/sqlfeedback But that's not going to be a fast way of getting an answer or getting it fixed.
    @David-Engel, I'll take a look at those resources. TY!
    Int Class
    I'm trying to install with docker on windows 10
    I'm getting the following error:
    Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Named Pipes Provider: Could not open a connection to SQL Server [2]. .
    Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
    Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. 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 Online..
    Could you please advice ?
    Hello, I am trying to install a sql server on my ubuntu 18.04 I followed the installation procedure but every time I load a .php file I get the following message : PHP Warning: PHP Startup: Unable to load dynamic library 'sqlsrv.so' (tried: /usr/lib/php/20190902/sqlsrv.so (/usr/lib/php/20190902/sqlsrv.so: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/sqlsrv.so.so (/usr/lib/php/20190902/sqlsrv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library 'ssdeep.so' (tried: /usr/lib/php/20190902/ssdeep.so (/usr/lib/php/20190902/ssdeep.so: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/ssdeep.so.so (/usr/lib/php/20190902/ssdeep.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlsrv.so' (tried: /usr/lib/php/20190902/pdo_sqlsrv.so (/usr/lib/php/20190902/pdo_sqlsrv.so: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/pdo_sqlsrv.so.so (/usr/lib/php/20190902/pdo_sqlsrv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    Configuration File (php.ini) Path => /etc/php/7.4/cli
    Loaded Configuration File => /etc/php/7.4/cli/php.ini
    Scan this dir for additional .ini files => /etc/php/7.4/cli/conf.d
    Additional .ini files parsed => /etc/php/7.4/cli/conf.d/10-mysqlnd.ini,
    David Engel

    @intclassproject Ensure SQL Server is installed and configured correctly for network access. If you are running SQL Server in a docker image on Windows, either the docker image is not running, or you did not map the network port Windows to the docker image. Here's a reference doc for a Linux docker container:

    I recommend these forums over this one for quicker community responses:
    SQL Server on Microsoft Q&A
    DBA Stack Exchange

    @Mixage51 It sounds like your PHP configuration is incorrect. Assuming you have followed the instructions on the docs site, the test script at the end (https://docs.microsoft.com/en-us/sql/connect/php/installation-tutorial-linux-mac?view=sql-server-ver15#testing-your-installation) should help identify problems. If you can't figure it out, try PHP-specific forums (https://www.php-forum.com/phpforum/, https://forums.phpfreaks.com/), or, if you can't get help there, file an issue in the PHP drivers for SQL Server repo: https://github.com/microsoft/msphpsql/issues.

    혹시 한국분
    I am a little confused. I have taken 3 courses in HTML5/CSS3, a javascript course, a python course, 2 PHP/MySQL courses and now 2 SQL server courses. I heard that SQL Server is only used with VB.net and ASP.net. Then I also heard that there is a SQL Server Web Edition. I just want to know if there is a way to connect to SQL Server through courses I have taken, or whether it needs node.js or something else to make the connection.
    alfredo ortega
    Hi guys, please help!!, Im installing sql on archlinux, but when i mssql-conf, i get message "aborted, core dump".
    David Engel
    @danielbhearn1 SQL Server is a database and can be used with any software to store data. It is not limited to VB.NET and ASP.NET. You can use PHP, C++, Python, JavaScript/NodeJS, C#, Java, Go, Ruby, etc. You just need to use the appropriate driver/connector for your language. If you walk through the getting started guides on http://aka.ms/sqldev or the numerous quick starts for Azure SQL Database, like https://docs.microsoft.com/en-us/azure/azure-sql/database/connect-query-dotnet-visual-studio , they should hep you get started.
    David Engel
    @fm4lch3mist_twitter I'm not sure this will be the best forum to troubleshoot your issue. You might want to try one of these Get Help resources: https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-troubleshooting-guide?view=sql-server-ver15#-get-help
    Germo Görtz
    https://www.microsoft.com/en-us/sql-server/developer-get-started/go/windows/step/2.html has some wrong code examples. where can I post / open issues?
    David Engel
    @aisbergde You can share here and I’ll make sure they get fixed.
    Germo Görtz

    in line to the link to GORM should be corrected: https://gorm.io/
    in the first code window this code doesn't work

    go install github.com/denisenkom/go-mssqldb

    go install: version is required when current directory is not in a module
    Try 'go install github.com/denisenkom/go-mssqldb@latest' to install the latest version

    But even if this code is used it doesn't work
    Maybe something has changed in golang. I know that this works because I found one working open-source-golang-project working with mssql. And that's why I wanted to follow these instructions. But the first code produces some errors and it would be a good idea to provide some code working "out-of-the-box" fo golang newbies like me :-)

    David Engel
    @aisbergde Yeah, looks like there were significant changes a few months ago. I'll try and get the basic examples correct again. Thanks for the heads up!
    On the sql server/python/ubuntu/step 3 page, it should be µs not ms. It's pretty funny to be off by three orders of magnitude on a page that's all about measuring query speed. You actually make yourselves look a thousand times slower than you are.
    I'm trying to get a developer edition of SQL 2019. I understand it has restrictions, which are obviously fine during development. But all I can find is a 180 day trial. Help
    David Engel
    @BostonChuckDuncan If you are downloading from this page: https://www.microsoft.com/en-us/sql-server/sql-server-downloads
    Scroll down a little to the "Or, download a free specialized edition" and download the developer edition.
    please am looking for MYSQL MS generic driver to integrate Splunk.
    Where to find 'sqlsrv' module for php 7.1 to install on Ubuntu? New version requires >7.3, but I can't upgrade php to newer version
    David Engel
    @iceten2011 This forum is for MS SQL Server, mot MySQL. I recommend asking in a MySQL forum.
    @abik50000 Version 5.6 will be the newest one you can use with PHP 7.1. You can find downloads here: https://docs.microsoft.com/en-us/sql/connect/php/release-notes-php-sql-driver?view=sql-server-ver15#561
    Be sure to check the support matrix to see if your version of Ubuntu is supported, too: https://docs.microsoft.com/en-us/sql/connect/php/microsoft-php-drivers-for-sql-server-support-matrix?view=sql-server-ver15

    hey, having problems on installing pdo_sqlsrv on big sur with pecl,
    getting: /private/tmp/pear/install/sqlsrv/shared/xplat.h:30:10: fatal error: 'sql.h' file not found

    include <sql.h>

    any ideas? would really appreciate cause loosing my sanity here...

    sql.h file can be found via symlink here:
    $PATH variable is set to: /opt/homebrew/opt/php@7.4/sbin:/opt/homebrew/opt/php@7.4/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
    Cheena Malhotra
    @much-rebel Instructions are here: https://docs.microsoft.com/en-ca/sql/connect/php/installation-tutorial-linux-mac?view=sql-server-ver15#installing-on-macos
    If you still face issues, you can reach out to https://github.com/Microsoft/msphpsql for additional support.