none
check access to db

    Question

  • Hi,

    new sql server with first DB created.

    2012 Server for the app is ready. The user on App server is DB_owner.

    I would like to check if the connectivity/access to DB is functioning from prepared App server, before the vendor will come in.

    Is there a way to check it with powershell or other way?

    Thanks.


    --- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davis

    Tuesday, February 14, 2017 2:10 PM

Answers

  • Run odbc, you can find it in Control Panel, administrative tools, ODBC data sources.

    Click Add

    select one of the SQL Server drivers - towards the bottom. Click Finish. Enter a descriptive name and enter the name of your server or browse to it.


    Enter the SQL login name and password. Note if you are using Windows authentication you will need to logon to the desktop you are creating the DSN on using that account.

    select the database.

    Click finish and then click the test connection button to see if it succeeds.

    • Proposed as answer by philfactor Tuesday, February 14, 2017 3:04 PM
    • Marked as answer by pob579 Tuesday, February 14, 2017 3:20 PM
    Tuesday, February 14, 2017 2:32 PM

All replies

  • Use ODBC. Create a dsn to the server and database.

    You can always use SQLCMD as well

    SQLCMD.exe -SServerName -E -d DatabaseName -Q"select db_name()"

    Tuesday, February 14, 2017 2:15 PM
  • SQLCMD ?

    Just provide connection parameters with appropriate switches.

    HTH,


    Phil Streiff, MCDBA, MCITP, MCSA

    Tuesday, February 14, 2017 2:16 PM
  • Please step by step if possible :)

    --- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davis

    Tuesday, February 14, 2017 2:19 PM
  • Run odbc, you can find it in Control Panel, administrative tools, ODBC data sources.

    Click Add

    select one of the SQL Server drivers - towards the bottom. Click Finish. Enter a descriptive name and enter the name of your server or browse to it.


    Enter the SQL login name and password. Note if you are using Windows authentication you will need to logon to the desktop you are creating the DSN on using that account.

    select the database.

    Click finish and then click the test connection button to see if it succeeds.

    • Proposed as answer by philfactor Tuesday, February 14, 2017 3:04 PM
    • Marked as answer by pob579 Tuesday, February 14, 2017 3:20 PM
    Tuesday, February 14, 2017 2:32 PM
  • Thanks Hilary!


    --- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davis



    • Edited by pob579 Tuesday, February 14, 2017 3:23 PM
    Tuesday, February 14, 2017 3:22 PM