MSDTC on server 'MSERVER1-PC\SQLEXPRESS' is unavailable - sql

I have 2 linked SQL servers, Both are SQL Server 2012 Express Edition.
I was executing insert statement into a table of connected SQL Server and it was working perfect until now. I have changed nothing. but now it gives me the following error message.
MSDTC on server 'MSERVER1-PC\SQLEXPRESS' is unavailable.
I have "Distributed Transaction Coordinator" service enabled. have tried restarting it and tried all options but all in vein.
In Component Services under Distributed Transaction Coordinator, In Local DTC, I have enabled Network DTC Access. Allow Inbound and Allow Outbound are checked. Network DTC Access is checked.
Have tried almost everything but all in vein.
Any idea...

To enable MSDTC on the business management server that is running on Windows Server 2008 click Start, Run, type dcomcnfg and then click OK to open Component Services.
In the console tree, click to expand Component Services, click to expand
Computers, click to expand My Computer, and click to expand Distributed Transaction Coordinator.
Right click Local DTC, and click Properties to display the Local DTC Properties dialog box.
Switch to the Security tab.
In the Security Settings section, click Network DTC Access.
In the Client and Administration section, select Allow Remote Clients and Allow Remote Administration.
In the Transaction Manager Communication section, select Allow Inbound and Allow Outbound.
In the Transaction Manager Communication section, select Mutual Authentication Required (if all remote machines are running Windows Server 2003 SP1 or Windows XP SP2 or higher), select Incoming Caller Authentication Required (if running MSDTC in a cluster), or select No Authentication Required if some of the remote machines are pre-Windows Server 2003 SP1 or pre-Windows XP SP2. No Authentication Required is the recommended selection.
Select Enable XA Transactions, and then click OK.
Repeat steps 1 through 9 on the other Web servers.
Use DTCPing.exe to validate the connection between the Web server and the computer that is running SQL Server or an SQL cluster depending on your configuration. To obtain the DTCPing.exe tool, see http://go.microsoft.com/fwlink/?LinkId=72166.
For more information about how to troubleshoot

I also tried all the above settings to no avail. But the good old engineering principle works for me "If something is broken try restarting the machine".

In my case the problem was not MSDTC server either. I had to disable "Enable Promotion of Distributed Transaction" option under Linked Server properties -> Server Options.

Related

Unable to connect my RDS SQL Server DB. Microsoft SQL Server, Error: 10060

I am getting below error while trying to connect my instance.
An error has occurred while establishing a connection to the server. When connecting to SQL Server, this failure may be caused by the fact that under the default settings SQL Server does not 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.) (Microsoft SQL Server, Error: 10060)`
I am using Microsoft SQL Server 2008 R2.
Thanks in advance.
To configure SQL Server 2005 to allow remote connections, you must complete these steps:
Enable remote connections on the instance of SQL Server that you
want to connect to from a remote computer.
List item Turn on the SQL Server Browser service.
Configure the firewall to allow network traffic that is related to SQL Server and to the SQL Server Browser service.
You have to enable remote connections for each instance of SQL Server 2005 that you want to connect to from a remote computer. To do this, follow these steps:
Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Surface Area Configuration.
On the SQL Server 2005 Surface Area Configuration page, click Surface Area Configuration for Services and Connections.
On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply.
Note Click OK when you receive the following message:
Changes to Connection Settings will not take effect until you restart the Database Engine service.
On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Service, click Stop, wait until the MSSQLSERVER service stops, and then click Start to restart the MSSQLSERVER service.
Perhaps..
The server is powered off
Sqlserver is not running
Sqlserver is running on a different port to the default
Sqlserver is not configured to accept tcp connections (see tripuri's answer)
An interim firewall, or windows firewall is blocking the connection
There is an interim network failure between your machine and the server
You're running it locally and your recent version of windows is prohibiting loopback connections
The other answers seem to ignore the fact that this is on RDS. A couple of items to check.
Is the security group opened to allow traffic to the RDS instance?
Where is the client that you're trying to connect from?
Have you ever been able to connect to it?
Please provide details of your network and VPC configuration.
I suspect the issue is in the security group and/or issues with the VPC configuration.

Unable to start the Transact-SQL debugger, could not connect to the database engine instance

I have been trying to run debugging within SQl server management studio and for some reason the debugger has just stopped working.
This is the message I get:
Unable to start the Transact-SQL debugger, could not connect to the
database engine instance 'server-sql'. Make sure you have enabled the
debugging firewall exceptions and are using a login that is a member
of the sysadmin fixed server role. The RPC server is unavailable.
Before this I get two messages, one requesting firewall permissions and the next says 'usage' with some text that makes little sense.
I have looked at the other similar answers on there for the same message which suggest adding the login as a sysadmin but that is already set. I also tried adding sysadmin to another account but that also didn't work.
In the end I was able to start it by right clicking and selecting run as administrator.
I encountered this issue while connected to SQL using a SQL Server Authenticated user. Once I tried using a Windows Authenticated user I was able to debug without issue. That user must also be assigned the sysadmin role.
This happened to me and I could not find the resolution anywhere. My firewall is disabled so I knew that couldn't be the issue.
According to Microsoft: Configure firewall rules before running the TSQL Debugger:
The server needs to communicate back to the client via RPC. The
account under which SQL Server service is running should have
authenticate permissions to the client.
We had a group policy that was preventing this:
Deny access to this computer from the network (Local account, Guests)
In order to resolve the issue, I had to add the SQL Server service account to the local group "Remote Desktop Users" on my desktop. Hope this helps someone else resolve this frustrating issue.
I try with the following steps, but it did not work (maybe because I'm on a PC in a office and I don't have control of the firewall). But you can try the following.
Check the users role:
IF IS_SRVROLEMEMBER ('sysadmin') = 1
print 'Current user''s login is a member of the sysadmin role'
Follow these instructions:
configure the transact-SQL Debugger
Run SQL Server Management Standard Edition 64 bits (with SQL Server Account)
In my case, I received this error message:
Unable to start the Transact-SQL debugger, could not connect to the computer "local".
I end up close the existing connection, then reconnect to my local SQL server using IP 127.0.0.1 and it works.
What helped me, was from here:
SQL Server Management Studio must be running under a Windows account that is a member of the sysadmin fixed server roll.
The Database Engine Query Editor window must be connected by using
either a Windows Authentication or SQL Server Authentication login
that is a member of the sysadmin fixed server role.
So, I've added sysadmin role to my windows account and run ssms as administrator. Debugger started working normally.
In addition to above works, what make our 2 computers remote debug able, was running: (right click on Window's Start button)
System--> Advanced System Properties-->Computer Name-->Click on Network ID... button
and running that wizard to join workgroup on both computers.
I found this solution by looking at my Windows' Event Viewer and looking for a solution to errors with NetBT Source, that is related to workgroup and computer Name.
Update: after some days, it stop working again.
I had the same problem and double checked al recommended settings. At some point I disabled the firewall on the database server and it worked like a charm. By enabling and checking the Firewall log I noticed this entry:
2019-10-31 16:07:50 DROP TCP 192.168.xxx.xxx 192.168.xxx.xxx 65231 61214 52 S 56576751 0 8192 - - - RECEIVE
When I allowed TCP port 61214 (Inbound rule) and switched the firewall back on, it worked. I don't know why this port is needed, maybe some here on SO?
Anyway, maybe the firewall log can be of help too.
Struggled through many hours and got the answer
You can do the configuration through this doc
https://learn.microsoft.com/en-us/sql/ssms/scripting/configure-firewall-rules-before-running-the-tsql-debugger?view=sql-server-ver15
(1) 2 settings need to done on the remote server where Sql server is installed
(2) 1 setting at client computer (i.e) our computer

SQL Server (running/stopped) Status in SSMS

In the attached image below, I show my SQL Server as seen from SSMS on my PC (left) compared to the same as seen from the server (right) ... could someone advise why the view from my PC does not show the status indicator (running/stopped) for the server and for the SQL Server Agent items?
Also, when you right-click on either of the options, the selection for START|STOP|RESTART are all greyed out....?
For these screenshots, I am connected from my PC with a user account that should have maximum access; under the security settings for this account EVERYTHING is checked.
Access to a remote Service Control Manager (SCM) is subject to OS privileges. W/o SCM privileges you cannot know what services are running, nor can you start or stop any. The required privileges are listed at Access Rights for the Service Control Manager.
None of the above is in any way at all related to SQL Server security. Services are controlled by SCM, not SQL Server.

Reporting Services Configuration Manager is not connecting, it is integrated in SharePoint 2010

I have a sharepoint 2010 portal with some dashboards and reports. No I have a permission problem, because I cannot view these reports.
I would like to have a look in Reporting Services Configuration Manager, but I cannot connect to the server where sharepoint and SQL server is installed. I enter the server name and press on find. It gives me the following error:
Unable to connect to the Report Server MYSERVERNAME.
By the way, I try to fix this problem:
AccessDeniedException: The permissions granted to user
'Mydomain\MyUserAccount' are insufficient for performing this
operation.
First off, you probably want to be using SharePoint Central Administration, not RS Configuration Manager. Also, RS Configuration Manager isn't where you'd manage access to report objects.
That said:
Try remoting into the host machine and running the tool locally on the server.
Ensure the proper ports are open for you to be connecting remotely (and that they SHOULD be open - there are very valid security reasons to block them)
Are you 100% certain you're connecting to the right address? Is it possible the SSRS service itself is on a different machine than the Sharepoint service and the SQL server?

Problems with simultaneous ODBC connection to web server hosting pages

I have an issue with a SQL Server Express install. I have a test server set up called ASPDEMO running server03, IIS6, SSEE08R2. MgmtStudio installed.
When I access the web site from a computer on the LAN all is well, I can login to the site and hit the db with no problem.
If I try to set up an ODBC connection to ASPDEMO I can connect and link to tables from Access for example, no problem.
But I can't do both at the same time.
Any ideas?
In Management Studio, connect to the database and right-click on the instance. Choose Properties. When the Server Properties window pops up, Click Connections in the list on the left and check the maximum number of connections allowed. Maybe it is set to 1.