Showing posts with label inside. Show all posts
Showing posts with label inside. Show all posts

Thursday, March 22, 2012

Connection over internet

I need to connect to a sql server through the internet.
Inside the LAN everything works great, but if try to connect from a pc
outside the lan over the internet I get an error message saying SQLstate
01000 and SQL state 08001 error 17.
What's wrong ?
Thank You since now to anyone can help me
Bye
Paolo
Gian,
How are you addressing the SQL Server? The external IP address should be
different to the one on your LAN. I personally would not be comfortable
with my SQL Server accessible over the internet.
1. Make sure that the correct ports are open on your firewall.
2. Check that SQL Server is listening on TCP/IP, and the port number
3. For named instances set up an alias and "hard code" the port using
the Server Network Utility.
4. Do not allow access through port 1434 on the firewall.
Take a look at this article also:
Potential causes of the "SQL Server does not exist or access denied"
error message
http://support.microsoft.com/?id=328306
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Gian Paolo Piscopo wrote:
> I need to connect to a sql server through the internet.
> Inside the LAN everything works great, but if try to connect from a pc
> outside the lan over the internet I get an error message saying SQLstate
> 01000 and SQL state 08001 error 17.
> What's wrong ?
> Thank You since now to anyone can help me
> Bye
> Paolo
>
|||Hi
There are a few things you'll have to check.
1. Have you got a route from your external PC into the SQL server.? If you
connect via an IP address, you'll have to make sure that this IP address has
a route through your FireWall. If you connect via a name, you'll have to
make sure that this name is bound to the correct IP address.
2. Have you opened the right ports in your FireWall? By default SQL server
uses port 1433, so you need to have a rule in your FireWall that allows this
traffic.
Also, it might help if you tell how you try to connect to the server - with
EM, QA or an application?
Regards
Steen
Gian Paolo Piscopo wrote:
> I need to connect to a sql server through the internet.
> Inside the LAN everything works great, but if try to connect from a pc
> outside the lan over the internet I get an error message saying
> SQLstate 01000 and SQL state 08001 error 17.
> What's wrong ?
> Thank You since now to anyone can help me
> Bye
> Paolo

Connection over internet

I need to connect to a sql server through the internet.
Inside the LAN everything works great, but if try to connect from a pc
outside the lan over the internet I get an error message saying SQLstate
01000 and SQL state 08001 error 17.
What's wrong '
Thank You since now to anyone can help me
Bye
PaoloGian,
How are you addressing the SQL Server? The external IP address should be
different to the one on your LAN. I personally would not be comfortable
with my SQL Server accessible over the internet.
1. Make sure that the correct ports are open on your firewall.
2. Check that SQL Server is listening on TCP/IP, and the port number
3. For named instances set up an alias and "hard code" the port using
the Server Network Utility.
4. Do not allow access through port 1434 on the firewall.
Take a look at this article also:
Potential causes of the "SQL Server does not exist or access denied"
error message
http://support.microsoft.com/?id=328306
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Gian Paolo Piscopo wrote:
> I need to connect to a sql server through the internet.
> Inside the LAN everything works great, but if try to connect from a pc
> outside the lan over the internet I get an error message saying SQLstate
> 01000 and SQL state 08001 error 17.
> What's wrong '
> Thank You since now to anyone can help me
> Bye
> Paolo
>|||Hi
There are a few things you'll have to check.
1. Have you got a route from your external PC into the SQL server.? If you
connect via an IP address, you'll have to make sure that this IP address has
a route through your FireWall. If you connect via a name, you'll have to
make sure that this name is bound to the correct IP address.
2. Have you opened the right ports in your FireWall? By default SQL server
uses port 1433, so you need to have a rule in your FireWall that allows this
traffic.
Also, it might help if you tell how you try to connect to the server - with
EM, QA or an application?
Regards
Steen
Gian Paolo Piscopo wrote:
> I need to connect to a sql server through the internet.
> Inside the LAN everything works great, but if try to connect from a pc
> outside the lan over the internet I get an error message saying
> SQLstate 01000 and SQL state 08001 error 17.
> What's wrong '
> Thank You since now to anyone can help me
> Bye
> Paolo

Connection over internet

I need to connect to a sql server through the internet.
Inside the LAN everything works great, but if try to connect from a pc
outside the lan over the internet I get an error message saying SQLstate
01000 and SQL state 08001 error 17.
What's wrong '
Thank You since now to anyone can help me
Bye
PaoloGian,
How are you addressing the SQL Server? The external IP address should be
different to the one on your LAN. I personally would not be comfortable
with my SQL Server accessible over the internet.
1. Make sure that the correct ports are open on your firewall.
2. Check that SQL Server is listening on TCP/IP, and the port number
3. For named instances set up an alias and "hard code" the port using
the Server Network Utility.
4. Do not allow access through port 1434 on the firewall.
Take a look at this article also:
Potential causes of the "SQL Server does not exist or access denied"
error message
http://support.microsoft.com/?id=328306
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Gian Paolo Piscopo wrote:
> I need to connect to a sql server through the internet.
> Inside the LAN everything works great, but if try to connect from a pc
> outside the lan over the internet I get an error message saying SQLstate
> 01000 and SQL state 08001 error 17.
> What's wrong '
> Thank You since now to anyone can help me
> Bye
> Paolo
>|||Hi
There are a few things you'll have to check.
1. Have you got a route from your external PC into the SQL server.? If you
connect via an IP address, you'll have to make sure that this IP address has
a route through your FireWall. If you connect via a name, you'll have to
make sure that this name is bound to the correct IP address.
2. Have you opened the right ports in your FireWall? By default SQL server
uses port 1433, so you need to have a rule in your FireWall that allows this
traffic.
Also, it might help if you tell how you try to connect to the server - with
EM, QA or an application?
Regards
Steen
Gian Paolo Piscopo wrote:
> I need to connect to a sql server through the internet.
> Inside the LAN everything works great, but if try to connect from a pc
> outside the lan over the internet I get an error message saying
> SQLstate 01000 and SQL state 08001 error 17.
> What's wrong '
> Thank You since now to anyone can help me
> Bye
> Paolo

Friday, February 24, 2012

Connection Breaks on StProc text UPDATE

Hi,
We have a simple stored procedure that has a text parameter, among others.
Inside the procedure the text parameter is assigned to a text column in a
simple SET clause of a simple UPDATE statement. We pass a 15 character
string as an argument for the parameter, and even though the string is
stored to the table, we get this error message (running in Query
Analyzer)...
*-*-*-*
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData
(CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection Broken
*-*-*-*
Any of the following make the error message go away...
1) Pass NULL as the argument
2) Comment out the assignment in the SET clause
3) Change the parameter to varchar(8000)
Anyone have any ideas?
--
Thank you,
Daniel Jameson
Children's Oncology Group
http://www.childrensoncologygroup.orgCan you show the CREATE TABLE statement and the CREATE PROCEDURE code?
Also, tell us the result of SELECT @.@.VERSION
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"danjam" <djameson@.childrensoncologygroup.org> wrote in message
news:e6y2#eMxDHA.3416@.tk2msftngp13.phx.gbl...
> Hi,
> We have a simple stored procedure that has a text parameter, among others.
> Inside the procedure the text parameter is assigned to a text column in a
> simple SET clause of a simple UPDATE statement. We pass a 15 character
> string as an argument for the parameter, and even though the string is
> stored to the table, we get this error message (running in Query
> Analyzer)...
> *-*-*-*
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData
> (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broken
> *-*-*-*
> Any of the following make the error message go away...
> 1) Pass NULL as the argument
> 2) Comment out the assignment in the SET clause
> 3) Change the parameter to varchar(8000)
> Anyone have any ideas?
> --
> Thank you,
> Daniel Jameson
> Children's Oncology Group
> http://www.childrensoncologygroup.org
>|||There are some known bugs that cause this or similar errors - it would
help to see your stored procedure. It could be an issue with UNION,
with an INSTEAD OF trigger, certain query structures, or an unknown
bug... It does sound like a bug, though.
SK
danjam wrote:
>Hi,
>We have a simple stored procedure that has a text parameter, among others.
>Inside the procedure the text parameter is assigned to a text column in a
>simple SET clause of a simple UPDATE statement. We pass a 15 character
>string as an argument for the parameter, and even though the string is
>stored to the table, we get this error message (running in Query
>Analyzer)...
>*-*-*-*
>[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData
>(CheckforData()).
>Server: Msg 11, Level 16, State 1, Line 0
>General network error. Check your network documentation.
>Connection Broken
>*-*-*-*
>Any of the following make the error message go away...
> 1) Pass NULL as the argument
> 2) Comment out the assignment in the SET clause
> 3) Change the parameter to varchar(8000)
>Anyone have any ideas?
>
>|||Steve,
Thank you for responding. I have posted additional info under Aaron's post.
I do have an INSTEAD of trigger, but there are no UNION's involved.
--
Thank you,
Daniel Jameson
Children's Oncology Group
http://www.childrensoncologygroup.org
"Steve Kass" <skass@.drew.edu> wrote in message
news:uIFJ5pMxDHA.2556@.TK2MSFTNGP10.phx.gbl...
> There are some known bugs that cause this or similar errors - it would
> help to see your stored procedure. It could be an issue with UNION,
> with an INSTEAD OF trigger, certain query structures, or an unknown
> bug... It does sound like a bug, though.
> SK
> danjam wrote:
> >Hi,
> >
> >We have a simple stored procedure that has a text parameter, among
others.
> >Inside the procedure the text parameter is assigned to a text column in a
> >simple SET clause of a simple UPDATE statement. We pass a 15 character
> >string as an argument for the parameter, and even though the string is
> >stored to the table, we get this error message (running in Query
> >Analyzer)...
> >
> >*-*-*-*
> >[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData
> >(CheckforData()).
> >Server: Msg 11, Level 16, State 1, Line 0
> >General network error. Check your network documentation.
> >
> >Connection Broken
> >*-*-*-*
> >
> >Any of the following make the error message go away...
> > 1) Pass NULL as the argument
> > 2) Comment out the assignment in the SET clause
> > 3) Change the parameter to varchar(8000)
> >
> >Anyone have any ideas?
> >
> >
> >
>

Sunday, February 12, 2012

Connecting to SQL Server through firewall

I have a simple asp page that queries a database inside our firewall. It works fine from the inside, and only uses port 1433. But if i put it out on our web server it won't connect and tries to use ports 139 and 445. Has anybody ran across this before?
Thanks,
JohnAre those ports that you see registered with the firewall to allow traffic? You can explicitly specify the port number in your app connection string.|||I have a simple asp page that queries a database inside our firewall. It works fine from the inside, and only uses port 1433. But if i put it out on our web server it won't connect and tries to use ports 139 and 445. Has anybody ran across this before?You are using Named Pipes instead of TCP/IP for the ODBC connection on the ASP server.

-PatP|||is that in the connection string like:

Data Source=172.25.24.30:1433

or is there some other syntax.

Thanks again,

John|||You are using Named Pipes instead of TCP/IP for the ODBC connection on the ASP server.

-PatP

Do you still need to do that for a nonDSN connection?

Thanks Pat,

John|||My first guess would be to go to the ASP server, run the SQL Client Configuration to change the default connection type to TCP/IP. I think that should fix you right up.

-PatP|||Thanks for all your help. It was set to named pipes. Does anyone know if that is the default setting? I always thought the machine came up with TCP/IP as default.

Thanks again.

John|||Different MDAC, SQL Tool, etc combinations have different defaults, and some applications change the default as part of their installation (for which I'd like to fry the developer that came up with that idea!). I don't know of any way to concretely identify just how this came to be, so I just fix it when it bytes me and move on...

-PatP|||I have a similar question. I have installed MSDE 2000 on a Win2k3 Server and everything is working fine with the DB. The MSSQLSERVER servoce has been running for 60 days straight with no issue. MSDE works great. However, I cannot connect to it on port 1433 through the firewall. Using netstat I cannot see that it is not listening on port 1433. I ran the CLICONFG utility and I can see that it has TCP/IP at the top of the list with Named Pipes below it. I have other servers ( Only Win2k servers) with MSDE 200 installed and configured similarily and these servers are listening on port 1433. I looked at the registry settings and they seem OK - nothing out of place.

The DB is now in a production environment and I cannot bounce the MSSQLSERVER service till the weekend during scheduled maintenance.

How can I ensure when I stop/start the MSSQLSERVER service that it is listening on port 1433? Would it be wise using CLICONFG to remove Named Pipes (IIS is the only user of the Database) ? I would prefer not to do that as I believe that NP is faster SQLServer and IIS are on the same box.

Does the version of MDAC have anything to do with this issue?

--Steve|||I can't think of any case where Named Pipes would be faster than TCP/IP that would occur in the real world (yes, I know of a way to construct one, but it would never occur naturally).

You can certainly do as you see fit, but I would recommend using TCP/IP as your default connection type.

If you've recently applied either sp3a to SQL Server, or sp2 to Server 2k3, they will automajikally block port 1433. Read up on the service packs to determine how you want to configure your machine to accomodate the access that you need.

-PatP|||I believe that the problem was that the CLICONFIG was not what I should have been using. There is a SVRNETCN.EXE utility in the C:\Program Files\Microsoft Sql Server\80\Tools\Binn directory that is the program to use. It turns out that the box had no IPC set at all. I added TCP/IP and it won't use the new options till I bounce MSQSQLSERVER service.

--Steve