January 17, 2015 at 2:48 am
Hi
How to check connection to an sql server without ssms tools (Example : from web server).
January 17, 2015 at 6:35 am
First thing you can do is ping, and ping for the specific port that you have SQL Server configured for (default is 1433). After that, it really depends on what you have available. You have to have some piece of software that can make a connection to SQL Server and you have to have ADO installed and then something that can use ADO. ODBC comes immediately to mind since it's on most machines. You can try creating an ODBC connection. Or, use something else that's on the machine.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 17, 2015 at 11:08 am
I'd tend to use odbc/ado/oledb to try a connection from code and see if it works.
If you're debugging manually, copy sqlcmd.exe over there and run it.
January 17, 2015 at 1:50 pm
The easiest way (IMO) is to create an empty file with the extension ".udl"
Then double-click the UDL file and it will open a simple connection dialog that you can test the connection with.
No special tools required.
MM
select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);
January 17, 2015 at 10:58 pm
Thankyou
I try .UDL.
It is a good and fast way.
January 19, 2015 at 8:24 am
Create a file called tc.vbs with these two lines:
Set objConn = CreateObject("ADODB.Connection")
objConn.Open "PROVIDER=SQLOLEDB;DATA SOURCE=computer\instance;DATABASE=database;USER ID=usr;PASSWORD=pwd"
Then in DOS issue: cscript tc.vbs
But, I really like that udl trick...
January 22, 2015 at 2:24 pm
You can use the Windows telnet client to check if SQL is not blocked and accepting connections.
From the web server open a cmd prompt. The command is "telnet MachineName port". If you get a black screen then sql is listening on that port.
For example to check a server named Test with a default install of SQL/Server listening on port 1433: telnet Test 1433
You can also use the IP instead of the MachineName
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply