Sunday, March 25, 2012
Connecting to SQL on a non default port
As part of our efforts at best practices, we recently changed the default
port of 1433 for the first instance of SQL on our SQL server another port say
8888. There is a firewall between the SQL server and the clients. The
firewall rulebase was changed to allow traffic on port 8888 between the SQL
server and the clients.
However following the change the clients could not connect to the SQL
instance. I am not a database administrator, but my understanding of SQL is
that the clients would dynamically determine the changed port number using
the SQL browser (reporting) service and attempt a connection on the new port
8888.
Any ideas on what went wrong or is my understanding of how SQL connects
fundamentally wrong......any feedback is much apreciated.
Thanks
CMSQL Server uses SQL Server Resolution Protocol (SSRP) to resolve instance
name. In SQL Server 2000 SSRP is operated by SQL Server service (and I think
that if there is no instance working on port 1433 there is no automatic name
resolution). In SQL Server 2005 there is another service called SQL Server
Browser dedicated to respond to SSRP requests. It listens on UDP1434 (so you
must open this port on your firewall).
What you can try is to connect to SQL Server not by instance name but by
machine name and TCP port number: tcp:MACHINE_NAME,port. Example:
tcp:LONDON,8888
--
Regards
Pawel Potasinski
U¿ytkownik "CP" <CP@.discussions.microsoft.com> napisa³ w wiadomo¶ci
news:5A85887A-FE89-4245-837C-E01FDEF43BAB@.microsoft.com...
> Hi Group,
> As part of our efforts at best practices, we recently changed the default
> port of 1433 for the first instance of SQL on our SQL server another port
> say
> 8888. There is a firewall between the SQL server and the clients. The
> firewall rulebase was changed to allow traffic on port 8888 between the
> SQL
> server and the clients.
> However following the change the clients could not connect to the SQL
> instance. I am not a database administrator, but my understanding of SQL
> is
> that the clients would dynamically determine the changed port number using
> the SQL browser (reporting) service and attempt a connection on the new
> port
> 8888.
> Any ideas on what went wrong or is my understanding of how SQL connects
> fundamentally wrong......any feedback is much apreciated.
> Thanks
> CM
>|||Thanks for your response, Pawel.
We have 1434 opened on the firewall. Prior to this change we had (and still
do have) other instances of SQL on the same server. My understanding is that
the SQL Server Browser, was determinining the port numbers of these other
instances. So when the port no of default instance was changed, the
reporting service would determine the new port no as well.
This was tested in QA successfully albeit without a firewall in between. Do
you still think it would be worthwhile to connect using a machine name? We
are back to QA now, without a firewall in between.
Thanks again.
CM
"Pawel Potasinski" wrote:
> SQL Server uses SQL Server Resolution Protocol (SSRP) to resolve instance
> name. In SQL Server 2000 SSRP is operated by SQL Server service (and I think
> that if there is no instance working on port 1433 there is no automatic name
> resolution). In SQL Server 2005 there is another service called SQL Server
> Browser dedicated to respond to SSRP requests. It listens on UDP1434 (so you
> must open this port on your firewall).
> What you can try is to connect to SQL Server not by instance name but by
> machine name and TCP port number: tcp:MACHINE_NAME,port. Example:
> tcp:LONDON,8888
> --
> Regards
> Pawel Potasinski
>
> U¿ytkownik "CP" <CP@.discussions.microsoft.com> napisa³ w wiadomo¶ci
> news:5A85887A-FE89-4245-837C-E01FDEF43BAB@.microsoft.com...
> > Hi Group,
> >
> > As part of our efforts at best practices, we recently changed the default
> > port of 1433 for the first instance of SQL on our SQL server another port
> > say
> > 8888. There is a firewall between the SQL server and the clients. The
> > firewall rulebase was changed to allow traffic on port 8888 between the
> > SQL
> > server and the clients.
> >
> > However following the change the clients could not connect to the SQL
> > instance. I am not a database administrator, but my understanding of SQL
> > is
> > that the clients would dynamically determine the changed port number using
> > the SQL browser (reporting) service and attempt a connection on the new
> > port
> > 8888.
> >
> > Any ideas on what went wrong or is my understanding of how SQL connects
> > fundamentally wrong......any feedback is much apreciated.
> >
> > Thanks
> >
> > CM
> >
> >
>
>
Saturday, February 25, 2012
Connecting through proxy
We are having problem with Linked Server connection through proxy in our
network. The port 1433 is open. Everything was fine before using proxy. Is
there any other configuration required?
Any help would be greatly appreciated,
Leila
Maybe: http://support.microsoft.com/kb/216415
Also, if you are using a dynamic port for SQL-Server or if you have more
than one instance of sql-server, the port 1434 and some of the following
ports must also be opened.
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Leila" <Leilas@.hotpop.com> wrote in message
news:u0$T%231YlHHA.960@.TK2MSFTNGP03.phx.gbl...
> Hi,
> We are having problem with Linked Server connection through proxy in our
> network. The port 1433 is open. Everything was fine before using proxy. Is
> there any other configuration required?
> Any help would be greatly appreciated,
> Leila
>
Connecting through proxy
We are having problem with Linked Server connection through proxy in our
network. The port 1433 is open. Everything was fine before using proxy. Is
there any other configuration required?
Any help would be greatly appreciated,
LeilaSee:
INF: TCP Ports Needed for Communication to SQL Server Through a Firewall
http://support.microsoft.com/?id=287932
--
Cheers,
Stefan Delmarco
http://www.fotia.co.uk|||Maybe: http://support.microsoft.com/kb/216415
Also, if you are using a dynamic port for SQL-Server or if you have more
than one instance of sql-server, the port 1434 and some of the following
ports must also be opened.
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Leila" <Leilas@.hotpop.com> wrote in message
news:u0$T%231YlHHA.960@.TK2MSFTNGP03.phx.gbl...
> Hi,
> We are having problem with Linked Server connection through proxy in our
> network. The port 1433 is open. Everything was fine before using proxy. Is
> there any other configuration required?
> Any help would be greatly appreciated,
> Leila
>
Connecting SQL Mgr to non-1433 port?
have been unable to get SQL Mgr to connect to it (this is even if I'm using
SM on the same machine as the SQL service).
I can connect if instead of the IP address I use ".", but trying to connect
via the IP address, no go.
Anyone have a workaround for this?
Thanks,
CC
cc wrote:
> Ok, if I change the TCP Listen port for SQL Svr to a port other than 1433, I
> have been unable to get SQL Mgr to connect to it (this is even if I'm using
> SM on the same machine as the SQL service).
> I can connect if instead of the IP address I use ".", but trying to connect
> via the IP address, no go.
> Anyone have a workaround for this?
> Thanks,
> CC
Include the port number in the hostname that you connect to, i.e.
myserver,1433
or
100.100.100.100,1433
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||Tracy:
Ah, thank you, I had been using a ':'
CC
"Tracy McKibben" wrote:
> cc wrote:
> Include the port number in the hostname that you connect to, i.e.
> myserver,1433
> or
> 100.100.100.100,1433
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>
Connecting SQL Mgr to non-1433 port?
have been unable to get SQL Mgr to connect to it (this is even if I'm using
SM on the same machine as the SQL service).
I can connect if instead of the IP address I use ".", but trying to connect
via the IP address, no go.
Anyone have a workaround for this?
Thanks,
CCcc wrote:
> Ok, if I change the TCP Listen port for SQL Svr to a port other than 1433,
I
> have been unable to get SQL Mgr to connect to it (this is even if I'm usin
g
> SM on the same machine as the SQL service).
> I can connect if instead of the IP address I use ".", but trying to connec
t
> via the IP address, no go.
> Anyone have a workaround for this?
> Thanks,
> CC
Include the port number in the hostname that you connect to, i.e.
myserver,1433
or
100.100.100.100,1433
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Tracy:
Ah, thank you, I had been using a ':'
CC
"Tracy McKibben" wrote:
> cc wrote:
> Include the port number in the hostname that you connect to, i.e.
> myserver,1433
> or
> 100.100.100.100,1433
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>
Sunday, February 19, 2012
Connecting JDBC with SQL Server
server...port 1433 is what sql server is running off of..my password
and username are correct..ive tried the ip, comp name and localhost for
server name and I cant make a connection to it...
heres the code I altered provided my microsoft to test this connection:
public class Connect{
private java.sql.Connection con = null;
private final String url = "jdbc:microsoft:sqlserver://";
private final String serverName= "192.168.1.102";
private final String portNumber = "1433";
private final String databaseName= "KB";
private final String userName = "kbuser";
private final String password = "password";
// Informs the driver to use server a side-cursor,
// which permits more than one active statement
// on a connection.
private final String selectMethod = "cursor";
// Constructor
public Connect(){}
private String getConnectionUrl(){
return
url+serverName+":"+portNumber+";databaseName="+dat abaseName+";selectMethod="+selectMethod+";";
}
private java.sql.Connection getConnection(){
try{
Class.forName("com.microsoft.jdbc.sqlserver.SQLSer verDriver");
con =
java.sql.DriverManager.getConnection(getConnection Url(),userName,password);
if(con!=null) System.out.println("Connection
Successful!");
}catch(Exception e){
e.printStackTrace();
System.out.println("Error Trace in getConnection() : " +
e.getMessage());
}
return con;
}
/*
Display the driver properties, database details
*/
public void displayDbProperties(){
java.sql.DatabaseMetaData dm = null;
java.sql.ResultSet rs = null;
try{
con= this.getConnection();
if(con!=null){
dm = con.getMetaData();
System.out.println("Driver Information");
System.out.println("\tDriver Name: "+
dm.getDriverName());
System.out.println("\tDriver Version: "+
dm.getDriverVersion ());
System.out.println("\nDatabase Information ");
System.out.println("\tDatabase Name: "+
dm.getDatabaseProductName());
System.out.println("\tDatabase Version: "+
dm.getDatabaseProductVersion());
System.out.println("Avalilable Catalogs ");
rs = dm.getCatalogs();
while(rs.next()){
System.out.println("\tcatalog: "+
rs.getString(1));
}
rs.close();
rs = null;
closeConnection();
}else System.out.println("Error: No active Connection");
}catch(Exception e){
e.printStackTrace();
}
dm=null;
}
private void closeConnection(){
try{
if(con!=null)
con.close();
con=null;
}catch(Exception e){
e.printStackTrace();
}
}
public static void main(String[] args) throws Exception
{
Connect myDbTest = new Connect();
myDbTest.displayDbProperties();
}
}
Heres the error messages:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error
establishing socket.Error Trace in getConnection() :
[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
Error: No active Connection
at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<in it>(Unknown
Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnecti on.open(Unknown
Source)
at com.microsoft.jdbc.base.BaseConnection.getNewImplC onnection(Unknown
Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknow n Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager .java:512)
at java.sql.DriverManager.getConnection(DriverManager .java:171)
at Connect.getConnection(Connect.java:36)
at Connect.displayDbProperties(Connect.java:53)
at Connect.main(Connect.java:89)
thanks
-Jim
Jim,
There could be a number of reasons why a connection can't be
established: server not running, TCP/IP not enabled on the server, a
firewall blocking the connection etc. Check all these and until "telnet
<server_host> 1433" won't connect, the JDBC driver won't connect either
(unless it used named pipes).
Alin,
The jTDS Project.
|||Yep...I could not telnet to that port and when I did a netstat sql
server wasnt listening on that port...
To fix this I upgraded from the RTM to service pack3...rebooted and was
able to connect just fine...
Thanks
-Jim
Connecting Enterprise Manager on non-standard port?
server on a non-standard port, without changing the port for ALL of
the registered servers?
I see that I can use the Client Network Utility to change the "default
port" for TCP/IP. But I have several servers registered, and only one
of them uses a non-standard port.
One would think that the port should be one of the Server Registration
Properties, but it doesn't appear to be.
I found one thread that came close to addressing this question, but it
dead-ended before getting quite to the point:
http://groups.google.com/groups?hl=e...server.clients
When registering the server, use the following format:
servername, portnumber
e.g.
sqlabc, 5500
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Allan Cady" <allancady@.yahoo.com> wrote in message
news:d563b154.0412041625.534c2b@.posting.google.com ...
> Is it possible to configure Enterprise Manager to connect to a remote
> server on a non-standard port, without changing the port for ALL of
> the registered servers?
> I see that I can use the Client Network Utility to change the "default
> port" for TCP/IP. But I have several servers registered, and only one
> of them uses a non-standard port.
> One would think that the port should be one of the Server Registration
> Properties, but it doesn't appear to be.
> I found one thread that came close to addressing this question, but it
> dead-ended before getting quite to the point:
>
http://groups.google.com/groups?hl=e...ndard%2522%26m
eta%3Dgroup%253Dmicrosoft.public.sqlserver.clients
|||Excellent, that does the trick. Thank you!
Just out of curiosity... do you happen to know if this is documented
in BOL? I don't see it.
"Mike Epprecht \(SQL MVP\)" <mike@.epprecht.net> wrote in message news:<#FO4niu2EHA.3128@.TK2MSFTNGP14.phx.gbl>...
> When registering the server, use the following format:
> servername, portnumber
> e.g.
> sqlabc, 5500
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Allan Cady" <allancady@.yahoo.com> wrote in message
> news:d563b154.0412041625.534c2b@.posting.google.com ...
> http://groups.google.com/groups?hl=e...ndard%2522%26m
> eta%3Dgroup%253Dmicrosoft.public.sqlserver.clients
|||Hi
I have found any, but EM uses the same format as you would specify for a ADO
connection.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Allan Cady" <allancady@.yahoo.com> wrote in message
news:d563b154.0412051800.2250e979@.posting.google.c om...
> Excellent, that does the trick. Thank you!
> Just out of curiosity... do you happen to know if this is documented
> in BOL? I don't see it.
>
> "Mike Epprecht \(SQL MVP\)" <mike@.epprecht.net> wrote in message
news:<#FO4niu2EHA.3128@.TK2MSFTNGP14.phx.gbl>...[vbcol=seagreen]
http://groups.google.com/groups?hl=e...ndard%2522%26m[vbcol=seagreen]
|||It occurred to me that I can also do this (specify an alternate port)
by defining an alias for the server in the Client Network Utility.
Connecting Dynamic Port from Client
I tried to connect to MSDE_SP3a using dynamic port from client machine
1.I set 0 to the port in server machine, using ServerNetworkUtility
2.I restart MSDE, and I see that port is configured new value(like 1500)
3.Now I boot isql utility from Client machine(installed SQL-DMO), and I send
'isql -S Server -U *** -P ***'
4.But that's failed!!!
I cheked:
1.I have already checked that TCP/IP is enabled in ClientNetworkUtility
2.And port number is DIFFERENT from the one coufigured in server
machine(like 1433)
3.I understand that UDP1434 negotiate with server machine about MSDE
listening port
4.So, I think that client machine may resolve port in dynamic
5.I cheked that WindowsFirewall is off
6.I cheked that UDP negotiation by Portqry.exe, and Portqry.exe returned
correct infomation
7.And I set the same port number as server machine to client machine, and
that was successful...
How can I make 'Dynamic port negotiation' successful?
and sorry for my poor English...
hi,
"Atchy" <bakedmind@.hotmail.com> ha scritto nel messaggio
news:%23snAFxKpEHA.3488@.TK2MSFTNGP12.phx.gbl
> Hi all
> I tried to connect to MSDE_SP3a using dynamic port from client machine
> 1.I set 0 to the port in server machine, using ServerNetworkUtility
> 2.I restart MSDE, and I see that port is configured new value(like
> 1500)
> 3.Now I boot isql utility from Client machine(installed SQL-DMO), and
> I send 'isql -S Server -U *** -P ***'
> 4.But that's failed!!!
> I cheked:
> 1.I have already checked that TCP/IP is enabled in
> ClientNetworkUtility
> 2.And port number is DIFFERENT from the one coufigured in server
> machine(like 1433)
> 3.I understand that UDP1434 negotiate with server machine about MSDE
> listening port
> 4.So, I think that client machine may resolve port in dynamic
> 5.I cheked that WindowsFirewall is off
> 6.I cheked that UDP negotiation by Portqry.exe, and Portqry.exe
> returned correct infomation
> 7.And I set the same port number as server machine to client machine,
> and that was successful...
> How can I make 'Dynamic port negotiation' successful?
> and sorry for my poor English...
dynamic port redirection is a feature that requires MDAC stack 2.6 at least
at the client level as well.. on the server this is not a problem as the
service pack 3a installs MDAC 2.7.1, but please check the client...
the service listening on UDP 1434 on the server (not on the clients) will
provide automatic redirection to the required port for each installed
instance, actually a small delay for named instance is due for that
overhead...
I'm not sure of the causes of your problem, but please, running regedit,
verify that the
HKLM\SOFTWARE\Microsoft\Microsoft SQL
Server\InstanceName\MSSQLServer\SuperSocketNetLib\ Tcp
TcpPort
and TcpDynamicPorts
have the same value...
if TcpDynamicPorts is blank then the port is static and not dynamic...
have you tried setting a fixed static port and creating an Alias (client
side) with Client Network Utilty (cliconfg.exe) pointing to that (fixed
port) MSDE instance?
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||> dynamic port redirection is a feature that requires MDAC stack 2.6 at
> least
> at the client level as well.. on the server this is not a problem as the
> service pack 3a installs MDAC 2.7.1, but please check the client...
> the service listening on UDP 1434 on the server (not on the clients) will
> provide automatic redirection to the required port for each installed
> instance, actually a small delay for named instance is due for that
> overhead...
> I'm not sure of the causes of your problem, but please, running regedit,
> verify that the
> HKLM\SOFTWARE\Microsoft\Microsoft SQL
> Server\InstanceName\MSSQLServer\SuperSocketNetLib\ Tcp
> TcpPort
> and TcpDynamicPorts
> have the same value...
> if TcpDynamicPorts is blank then the port is static and not dynamic...
> have you tried setting a fixed static port and creating an Alias (client
> side) with Client Network Utilty (cliconfg.exe) pointing to that (fixed
> port) MSDE instance?
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
I thank your response
I found the MS article:
823938 :How to use static and dynamic port allocation in SQL Server 2000
http://support.microsoft.com/default.aspx?kbid=823938
Dynamic port allocation
Only named instances of SQL Server can use the dynamic port allocation
process
That's mean normal instance(NOT named instance) of MSDE can not use dynamic
ports allocation?
I tried and failed in normal instance network
And I tried named instance network and that's successed...
The conclusion:
Normal instance of MSDE is not supported dymamic port allocation
That's really!?
|||hi,
"Atchy" <bakedmind@.hotmail.com> ha scritto nel messaggio
news:uMd$YBjpEHA.2636@.TK2MSFTNGP09.phx.gbl
> I found the MS article:
> 823938 :How to use static and dynamic port allocation in SQL Server
> 2000 http://support.microsoft.com/default.aspx?kbid=823938
> ----
--
> Dynamic port allocation
> Only named instances of SQL Server can use the dynamic port allocation
> process
> ----
--
> That's mean normal instance(NOT named instance) of MSDE can not use
> dynamic ports allocation?
> I tried and failed in normal instance network
> And I tried named instance network and that's successed...
> The conclusion:
> Normal instance of MSDE is not supported dymamic port allocation
> That's really!?
why should it be else?
dynamic redirection has been established as more instances (up to 16) can be
installed on the same server and, if the DEFAULT instance is listening on
TCP 1433, there should be a way to set connections without requiring an
Alias to be defined on the client side (each client) and defining a static
alternate port server side...
this is no more a viable solution on Windows XP sp2 as the Windows Firewall
requires a better security policy, so static redirection is again the way to
go, opening the desired port and defining Alias on the client side
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
Sunday, February 12, 2012
Connect to Sql Sevrer on non default?
- Can I use set multiple port for connecting to the Sql Server?
- Where/How can I set it?
- If so, i've set it, how can i connect it on a non-default port?
Thx & RegardsFrom the Microsoft KB article 307645PRB: Cannot Connect to SQL Server on Any Port Other Than 1433:
To resolve this problem, use TCP/IP protocol, and include "Server=ComputerName, PortNumber" in the connection string.
Terri|||how to user the tcp ip protocole? we must put sth on the connection string?
(ive got the same prob)
Connect to SQL Server through an cable modem client
(port 1433). All the clients conected to internet via DSL works just great,
but all the clients connected to internet via an cable ISP, just can't find
the server.
I saw some of the cable ISPs block the 1433 and 1434 ports...it's possible
the cable users connect to my sql server using a different port, and the dsl
users still using the 1433? ... or what collateral damage could happen if I
just change the current port on the remote server?
If you change the port on which the SQL instance is listening, just make sure
that you also change the port to which the clients are configured to connect.
I'm assuming that you are specifying the port number in your connection
string.
Linchi
"Ruben" wrote:
> Hi, I'm connecting some clients via Internet to a named instance of SQLServer
> (port 1433). All the clients conected to internet via DSL works just great,
> but all the clients connected to internet via an cable ISP, just can't find
> the server.
> I saw some of the cable ISPs block the 1433 and 1434 ports...it's possible
> the cable users connect to my sql server using a different port, and the dsl
> users still using the 1433? ... or what collateral damage could happen if I
> just change the current port on the remote server?
|||Hi Linchi, I'm not specifying the port in the connection string, I'm setting
a Server Alias (with the client network utility) and the port is set to
determine it dinamically ... and reading your post I assume there isn't any
problem if I change the port at the main server, right?
"Linchi Shea" wrote:
[vbcol=seagreen]
> If you change the port on which the SQL instance is listening, just make sure
> that you also change the port to which the clients are configured to connect.
> I'm assuming that you are specifying the port number in your connection
> string.
> Linchi
> "Ruben" wrote:
|||You can change the port that the SQL instance is listening on, or you can
specify the port after the server name (or the IP address) after a comma. You
can also specify the port number when you specify your alias. If the UDP port
1434 is blocked, you may not have a choice but to specify the port number on
the connection string. Note that when the SQL instance is the deafult
instance, the default port of 1433 will be tried evne if you don't specify a
port number.
Linchi
"Ruben" wrote:
[vbcol=seagreen]
> Hi Linchi, I'm not specifying the port in the connection string, I'm setting
> a Server Alias (with the client network utility) and the port is set to
> determine it dinamically ... and reading your post I assume there isn't any
> problem if I change the port at the main server, right?
> "Linchi Shea" wrote:
Connect to SQL Server through an cable modem client
r
(port 1433). All the clients conected to internet via DSL works just great,
but all the clients connected to internet via an cable ISP, just can't find
the server.
I saw some of the cable ISPs block the 1433 and 1434 ports...it's possible
the cable users connect to my sql server using a different port, and the dsl
users still using the 1433? ... or what collateral damage could happen if I
just change the current port on the remote server?If you change the port on which the SQL instance is listening, just make sur
e
that you also change the port to which the clients are configured to connect
.
I'm assuming that you are specifying the port number in your connection
string.
Linchi
"Ruben" wrote:
> Hi, I'm connecting some clients via Internet to a named instance of SQLSer
ver
> (port 1433). All the clients conected to internet via DSL works just great
,
> but all the clients connected to internet via an cable ISP, just can't fi
nd
> the server.
> I saw some of the cable ISPs block the 1433 and 1434 ports...it's possible
> the cable users connect to my sql server using a different port, and the d
sl
> users still using the 1433? ... or what collateral damage could happen if
I
> just change the current port on the remote server?|||Hi Linchi, I'm not specifying the port in the connection string, I'm setting
a Server Alias (with the client network utility) and the port is set to
determine it dinamically ... and reading your post I assume there isn't any
problem if I change the port at the main server, right?
"Linchi Shea" wrote:
[vbcol=seagreen]
> If you change the port on which the SQL instance is listening, just make s
ure
> that you also change the port to which the clients are configured to conne
ct.
> I'm assuming that you are specifying the port number in your connection
> string.
> Linchi
> "Ruben" wrote:
>|||You can change the port that the SQL instance is listening on, or you can
specify the port after the server name (or the IP address) after a comma. Yo
u
can also specify the port number when you specify your alias. If the UDP por
t
1434 is blocked, you may not have a choice but to specify the port number on
the connection string. Note that when the SQL instance is the deafult
instance, the default port of 1433 will be tried evne if you don't specify a
port number.
Linchi
"Ruben" wrote:
[vbcol=seagreen]
> Hi Linchi, I'm not specifying the port in the connection string, I'm setti
ng
> a Server Alias (with the client network utility) and the port is set to
> determine it dinamically ... and reading your post I assume there isn't an
y
> problem if I change the port at the main server, right?
> "Linchi Shea" wrote:
>
Friday, February 10, 2012
Connect to SQL Server Database with custom port
I have a SQL server database that I am trying to connect to from VS2005 in the Server Explorer.
I am not using the standard port for my SQL server listening port and I don't see where I can tell the Server Explorer to use a different port?
Can someone point me in the right direction for connecting to my database?
Thanks.
There are 3 ways to do it. Here's an article detailed all of them:http://www.databasejournal.com/features/mssql/article.php/3689846
Make sure you read carefully in section: "Connecting Clients When using Specific Part Assignments" as the first 2 methods are for client tool connection and the 3rd is specific for the ConnectionString in you config file.
Hope it helps.
|||Thank you very much. This was extremely helpful!