Our SQL Server 2008 PUBLISHER (Windows Server 2008 Standard SP2 64-bit) fails to replicate to our SQL Server 2008 SUBSCRIBER (Windows Server 2008R2 SP1 64-bit) when the subscriber's Public Firewall is turned On; however, when the Firewall is turned Off, replication works immediately. This Transactional Replication with a Distributor (push subscription) has been running well for three years with the subscriber's firewall off. We need to turn the firewall ON now.
Both machines are in the same LAN (same physical rack) and are up to date on Windows Updates. Subscriber's TCP Ports (80, 443, 1433, 1434, 21, 135, 139, 445) and UDP Ports(137,138,1434) are allowed to "Any". I have disabled TCP Chimney Offload and the Boost SQL Server priority is off on Subscriber.
Following is what I get from PUBLISHER's replication log when it fails to replicate:
Command attempted:
if ##trancount > 0 rollback tran
(Transaction sequence number: 0x00001E920000B5EB000100000000, Command ID: 1)
Error messages:
TCP Provider: The semaphore timeout period has expired. (Source: MSSQLServer, Error number: 0)
Get help: http://help/0
TCP Provider: The semaphore timeout period has expired. (Source: MSSQLServer, Error number: 121)
Get help: http://help/121
Communication link failure (Source: MSSQLServer, Error number: 121)
Get help: http://help/121
Communication link failure (Source: MSSQLServer, Error number: 08S01)
Get help: http://help/08S01
What am I missing? How can I fix this issue? :s
I RESOLVED this issue! I am writing to share my solution hoping it helps someone as well.
All I needed to do is leave empty (or blank out if there is a value) the property TCP Dynamic Ports, while leaving TCP Port with 1433 on the Subscribers.
That is, on Subscriber, go to SQL Server Configuration Manager > TCP/IP > IP Addresses > IP All and perform the change. After doing that change, I restart (at Subscriber still) on SQL Server Services: SQL Server, SQL Server Browser, SQL Server Agent, SQL Server Reporting Services.
Related
we have mysql-server(5.5.47)that hosted on physical server. It listen external internet interface(with restrict user access), mysql server intensively used from different places(we use different libraries to communicate with mysql). But sometimes whole mysql server(or network) stuck and stop accept connection, and a clients failed with etimedout(connect)/timeout(recv), even direct connection from server to mysql with mysql cli not working(stuck without any response — seems to be try to establish connections).
First thought was that it is related to tcp backlog, so mysql backlog was increased — but this not help at all.
Issue not repeatable, so last time when this issue happened we sniff traffic, and what we get:
http://grab.by/STwq — screenshot
*.*.27.65 — it is client
*.*.20.80 — it is mysql server
From session we can assume that tcp connection established, but server retransmit SYN/ACK to client(from dump we see that server receive ACK, why retransmit ?), but in normal case mysql must generate init packet and send to client, after connection was established.
It is only screen from 1 session, but all other sessions mostly same, SYN -> SYN/ACK -> ACK -> and server retransmit SYN/ACK up to retries_count.
After restart mysql all get normal immediately after restart. So not sure it is related to network or mysql.
Any thoughts would be appropriate.
Thank you!
I think my Microsoft SQL Server database is inaccessible because the SQL server agent is disabled and cannot be started. How can I fix this problem?
For SQL Server agent
State - stopped running
Start mode - Other(Boot,System,Disabled or unknown)
Log On As - NT AUTHORITY\NETWORK SERVICE
For SQL Server Browser
State - running
Start mode - auto
Log On As - NT AUTHORITY\LOCAL SERVICE.
For SQL Server agent
State - running
Start mode - auto
Log On As - LocalSystem
If it is disabled, go to Control Panel->Administrative Tools->Services, and look for the SQL Server Agent. Right-click, and select "Properties." From the "Startup Type" dropdown, change from "Disabled" to "Automatic".
Clarification from comments: The "SQL Server Agent" service must be differentiated from the "SQL Server" database process. The former runs jobs, performs monitoring tasks, things of that nature, but it alone should not prevent "SQL Server" from running or allowing connections. If you note the SQL Server service is running (not the "Sql Server Agent"), and cannot connect to it, something else is likely at hand, such as a firewall, or is misconfigured in some way that is preventing connections.
If you note that the SQL Server service is not running, and will not start, there is a broader configuration issue you should research in the event logs.
Recently we migrated our SQL Server 2005 database to 2008 R2. After that we are facing lots of issues
A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.) .
The timeout period elapsed prior to completion of the operation or the server is not responding
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) .
We removed all firewalls , added connect time out in connection string etc.. but issue is still pending. It will coming in randomly why this is happening? thanks
Some things to check:
Are you sure the SQL Server service is running?
If it is a named instance or on a port other than 1433, is the SQL Browser service running?
Are TCP/IP and/or named pipes enabled under Start > Programs > SQL Server > Configuration Tools > SQL Server Configuration Manager (highlight Protocols for <instance name>)?
I am trying to connect remotely to SQL Server 2008 R2 Express on a server running Windows Server 2008 R2. I receive the following error:
A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: TCP
Provider, error: 0 - A connection attempt failed because the connected
party did not properly respond after a period of time, or established
connection failed because connected host has failed to respond.)
I think the problem might be related to my connection string, because I am not sure exactly what it should be. I understand the connection string should take the form:
Data Source=123.123.123.123\InstanceName;Initial Catalog=MyDBName;user id=MyUserName;password=MyPassword;
The instance name of my SQL Server installation takes the form ComputerName\SQLEXPRESS. This is what I see when I log in to Management Studio on the server. So should the connection string begin with
Data Source=123.123.123.123\ComputerName\SQLEXPRESS
This looks wrong because of all the slashes. I have tried to omit the computer name thus:
Data Source=123.123.123.123\SQLEXPRESS
I also read somewhere that you can specify a port so I have also tried
Data Source=123.123.123.123,1433\SQLEXPRESS
because I understand that 1433 is the TCP port used by SQL Server and
Data Source=123.123.123.123,1434\SQLEXPRESS
because I understand that 1434 is the UDP port used by SQL Server browser.
I have also tried every combination of these and they all give the same error.
These are the steps I have taken to enable remote browsing on the server:
In Management Studio, right click the instance, go to Properties, Security and check SQL Server and Windows Authentication Mode. On the connections tab I have checked "Allow remote connections to this computer".
In SQL Server Configuration Manager I have enabled all four connection options (Shared Memory, Named Pipes, TCPIP and Via) under every node they occur. Under protocols for SQL Express I have tried specifying port 1433 and also leaving it blank with TCP Dynamic Ports set to 0 (which I think is meant to enable dynamic ports).
I have created firewall exceptions for TCP Port 1433, UDP Port 1434, and program exceptions for sqlservr.exe and sqlbrowser.exe.
If someone could tell me which of the four versions of the DataSource part of the connection string I should be using it would be a great help, even if it did not solve the problem. It would mean that everything I try subsequently I would only have to test once instead of four times.
Thanks in advance for any help!
Where did you enter the firewall exceptions, on your machine, on the server, or both?
The second connection string is the only really valid one. Can you telnet to the server on port 1433? Can you connect to the instance from Management Studio remotely and the problem is only from your code where the connection string is? Did you try running the same code on the server? Did you try forcing TCP/IP (vs. named pipes/shared memory etc) adding the following parameter to your connection string:
Network=DBMSSOCN;
This question comes up quite a lot and I'm sure you're hitting something that others have hit before. Have you gone through this article, "How to troubleshoot connecting to the SQL Server Database Engine"? Also there are 20+ questions on here that mention this error message and Express, according to this search result. I suggest double-checking your settings against some of the items in those answers that solved the issue for other users.
I have problem with connecting to Sql Server from my local machine.
Seems like I did everything I could, but still I'm unable to connect to it.
This is what I did:
1) Right click on Sql Server in Sql Management Studio (SMS) -> Connections -> Allow remote connections
2) Right click on Sql Server in Sql Management Studio (SMS) -> Security -> Allow remote connections -> Set Auth mode to Win and Sql auth mode (i.e. mixed mode)
3) Disabled firewall
4) Sql Server Configuration Manager -> Network Configuration -> Protocols -> Enable Shared memory, Named pipes, TCP/IP
5) Sql Server Configuration Manager -> Network Configuration -> Protocols -> TCP/IP -> Properties -> Set TCP Port to 1433, Set TCP Dynamic Port to 0. After that I restarted MainSql service in "services.msc"
6) I ran "EXEC xp_readerrorlog 1" in SMS, found this:
Server is listening on [ 'any' 1433].
Server is listening on [ 'any' 1433].
Server local connection provider is ready to accept connection on [ \.\pipe\SQLLocal\MAINSQL ].
Server named pipe provider is ready to accept connection on [ \.\pipe\MSSQL$MAINSQL\sql\query ].
Server is listening on [ ::1 64825].
Server is listening on [ 127.0.0.1 64825].
7) Tried to telnet [myip] 1433 from my home machine. Result: connecting To [myip]...Could not open connection to the host, on port 1433
: Connect failed
8) Tried to telnet [myip] 1433 from server - it worked!
Seems like this is some kind of a network issue. I have another server with Sql Server installed, I did the same on it and I was able to connect to it from my home machine, but not this one! I tried to connect to this server from the second one and it didn't work too.
Please help me, I don't know what to do. I did everything I could but it still doesn't work.
Update:
Sql Server Browser service is started on the server machine. The server is a dedicated server at a hosting, I'm trying to connect to it from my home machine and from another server witch is a dedicated server as well, from another country.
The problem was in firewall. To fix it I ran a script from here: http://support.microsoft.com/kb/968872
This is really strange because I fully disabled server's firewall. However it now works for me, thanks to cairnz and Gregory A Beamer for help.
It looks like you hit one of two most likely causes: You have set protocols. Just double check the client side to ensure the same protocols are enabled on both sides and you are done there.
The second most likely, with SQL 2005 on, is the Browser service is turned off on the server. If this is true, you will often have issues with remote calls, ala http://support.microsoft.com/kb/914277.