Page 1 of 1

Direct Mode

Posted: Tue 02 Dec 2014 08:42
by Romano
Hi,
is any help for Direct Mode settings? I try to connect to my local SQL Server and I cannot - connection refused.
I have named instance of MS SQL Server 2014 - 'MyComputer\SQL2014' and I have enabled the TCP/IP protocol...

Thanks
Roman Krupicka

Re: Direct Mode

Posted: Tue 02 Dec 2014 14:51
by feamster
Try using tcpip which means an ip address (which is working for me) or maybe something that dns can resolve. I think using named instances is a higher level of access and involves the operating system.

Re: Direct Mode

Posted: Wed 03 Dec 2014 07:57
by Romano
But I have 3 local SQL Servers, each is named instance: "MyComputer\SQL2008R2", "MyComputer\SQL2012", "MyComputer\SQL2014"...

Re: Direct Mode

Posted: Wed 03 Dec 2014 12:56
by azyk
To solve the problem, before establishing connection, try to connect the TMSConnection.Port option to 0. For example:

Code: Select all

  MSConnection.Port := 0;

Re: Direct Mode

Posted: Thu 04 Dec 2014 08:07
by Romano
Hi,
I still get error message:
Cannot connect to server on host 'MyComputer':
Socket Error Code: 10061($274D)

Re: Direct Mode

Posted: Fri 05 Dec 2014 09:33
by azyk
Please check whether a successful connection can be established to the specified instances ("MyComputer\SQL2008R2", "MyComputer\SQL2012", "MyComputer\SQL2014") using SQL Server Management Studio. At this, use SQL Server Authentication and the credentials of the user you used in the Direct mode.

Note: the reason for this problem can be incorrect network or SQL Server configuration. Please look at the 10061 error code description at MSDN: http://msdn.microsoft.com/en-us/library ... s.85).aspx

Re: Direct Mode

Posted: Thu 11 Dec 2014 07:29
by Romano
I can connect to all my instances using SQl Server Management Studio. I can connect also with my application with NativeClient. I have TCP/IP protocol enabled.
I run SQL2014 only, SQL2008R2 and SQL2012 is off.

Re: Direct Mode

Posted: Thu 18 Dec 2014 10:06
by azyk
Please make sure you are using TCP/IP protocol for connection using SQL Server Management Studio. For this, go to File->New->Database Engine Query, in the appeared dialog in the Server name field enter "MyComputer\SQL2014", select Authentication - SQL Server Authentication, fill in user login and password. Then press the Options button, on the Connection Properties tab in the Network protocol combobox select the TCP/IP value, and press Connect. Please let us know the results.