Cannot connect to AWS RDS instance that is not in VPC - mysql

In our company we use few AWS RDS MySQL instances while few of those aren't in any VPC (we have created those 3 years ago).
I need to connect to such an instance using Microsoft SQL Server Management Studio but when I'm trying to do so I'm getting following error after few seconds:
TITLE: Connect to Server
Cannot connect to host_path.amazonaws.com.
------------------------------ ADDITIONAL INFORMATION:
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)
(Microsoft SQL Server, Error: 53)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=53&LinkId=20476
The network path was not found
If I add the port after the host path like described there
I'm getting different error:
TITLE: Connect to Server
Cannot connect to host_path.amazonaws.com,3306.
------------------------------ ADDITIONAL INFORMATION:
Internal connection fatal error. Error state: 18 (System.Data)
The thing is that the link above they are talking about DB instance that is within VPC but our isn't.
Did anyone of you stuck with similar issue earlier and maybe know how to resolve that or at least can point me out to the correct way?
I've Googled a lot regarding this issue but every forum or FAQ says about DB instance within VPC which isn't my case.
In screenshot below
you can see the connection window within the program, all sensitive data has been painted over.
Thank you in advance.

Pretty sure you cant directly connect from SSMS to a MySQL database. I think you can setup a "Linked Server" (basically an ODBC driver/datasource, then connect to your localhost, which in turn talks to MySQL).
See: https://learn.microsoft.com/en-us/sql/relational-databases/linked-servers/create-linked-servers-sql-server-database-engine?view=sql-server-2017
I'm assuming your requirement for SSMS is that you plan to reference data from both SQL Server and MySQL? If so, it should work, but its performance wont be great.

Related

SQL Server Mgmt Studio 2014 ; Error 40

I just installed MS SQL SERVER MANAGEMENT STUDIO 2014 , but when I open it I have to add a server name to connect it but it is showing me following error when I enter server name.
TITLE: Connect to Server
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) (Microsoft SQL Server, Error: 2) The system cannot find the file specified
I don't know what to do now, help me out please.
Thanks
Error
Here's mine, if it helps. See if you should have more to it, like SQLEXPRESSPC in my case.
You need to provide an instance name.
Instance Name has been provided during the installation process of SQL Server.
Inside the Server name combobox, you should type something like : .\SQLEXPRESS or .\MSSQLEXPRESS depending on your version of SQLServer.
The .\ refer to your local machine.

MVC4 publishing website on Arvixe giving error

I have published the website on Arvixe system pointing to MySQL database.
When i try to access the website, its working fine, but somehow after some page accessing, it start giving the error as:
Server Error in '/' Application. 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: SQL Network Interfaces, error: 26
- Error Locating Server/Instance Specified)
I have pointed my website to MySQL database, but it is giving the error of SQl server.
For a check, when i run the website pointing to arxixe database from my local machine, its working absolutely perfect.
I have hosted the MySQL database onto Arvixe server itself.
Any help on this would be highly appreciated.
You will want to check 2 things:
1.You are using "localhost" or "127.0.0.1" in the connection string for the script on the server.
2.There may be another connection string in the code, that is connecting to the MSSQL server.
There is a 3rd option:
Contact Arvixe's support as they will have exact details of what would be happening.
Good luck!

Issue with Azure Emulator and SQLLOCALDB

When in try to start azure storage emulator i get the following error.
Caught exception while probing for SQL endpoint. 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) Number of Sql Errors Reported: 1 Sql Error: System.Data.SqlClient.SqlError: 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
All the Components have been correctly installed .
Kindly Help
Thanx
I managed to fix it by deleting and creating my LocalDb instance. In my case it happened because I installed Azure SDK 2.2 over version 2.1.
The step-by-step to fix it:
Run sqllocaldb i to get your instance name:
C:\Users\myUser>sqllocaldb i
v11.0
Stop LocalDB instance:
C:\Users\myUser>sqllocaldb p v11.0
LocalDB instance "v11.0" stopped.
Delete your LocalDB instance:
C:\Users\myUser>sqllocaldb d v11.0
LocalDB instance "v11.0" deleted.
Create your LocalDB instance with the same name:
C:\Users\myUser>sqllocaldb c v11.0
LocalDB instance "v11.0" created with version 11.0.
Delete database files to allow emulator to recreate db files
C:\Users\myUser\DevelopmentStorageDb22.mdf
C:\Users\myUser\DevelopmentStorageDb22_log.ldf
That should fix your issues.
It looks like your windows account under which you logged in is not sysadmin in sqlexpress instance. Normally emulator uses database within sqlexpress with windows authentication.
The first time you run the Windows Azure storage emulator, an initialization process runs to configure the environment. By default, the initialization process creates a database in SQL Express LocalDB. So, please make sure that your SQLExpress service is running and your login have sufficient rights to use the database within SQLExpress.
If you want to make use of a local instance of an SQL Server to be used by Storage Emulator follow steps listed at http://msdn.microsoft.com/en-us/library/windowsazure/gg433134.aspx.
HTH
Sameer
What i am suspecting is that your LocalDB configuration with emulator is somehow corrupted or misconfigured.
Please follow the blog below to see if you can verify LocalDB instance is ready/working and it is used by Emulator:
http://blogs.msdn.com/b/avkashchauhan/archive/2012/07/10/windows-azure-sdk-1-7-storage-emulator-and-localdb.aspx
If you still have problem the easiest method would be to uninstall SDK 1.7 completely and re-install which will fix any issue with your configuration rather the finding the problem and try to fix which could take longer.
I was getting a similar message:
Probing SQL Instance: 'localhost\SQLExpress'.
Caught exception while probing for SQL endpoint. 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Number of SqlErrors Reported: 1
SqlError: System.Data.SqlClient.SqlError: 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
No available SQL Instance was found.
One or more initialization actions have failed. Resolve these errors before attempting to run the storage emulator again.
Error: No available SQL Instance was found.
For me the problem was due to the fact that I was not running with administrator privileges.
Might be a little late to the party here, but I've seen this happen if you clear out or remove items in your "C:\Users[USER_NAME]\AppData\Local\Temp" folder.
At the time of writing this, Azurite is the replacement for "azure storage emulator". In my case, I was able to simply follow the steps here https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite?tabs=npm#install-azurite to get it installed, and you should be good to go after that.

Can't access SQL Server 2008 via windows service

I have an application which connects to SQL Server 2008 via windows service.Basically,windows service pics up a configuration file to get connection details like instance name , user name & password.Currently this windows service is failing to start with following error message :-
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)
Application server and DB server are different machines.I can connect to SQL Server via SSMS from application server without any issue. Also I created a UDL on app server and it also connected fine to DB server. Any help here is much appreciated.
Check the account under witch windows service is running- most possible that account is not allowed to make connections to other computers.

SQL Server Express - Remote Connection continues to fail

I have been unable to configure my SQL Server 2008 Express to allow remote connections. I followed the instructions from this guide: http://www.linglom.com/2009/03/28/enable-remote-connection-on-sql-server-2008-express/ .
I am still getting the following error:
Cannot connect to 00.00.00.000
Additional information:
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) ( Microsoft SQL Server, Error: 3)
I also configured the firewall as defined in http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/ . As a test I even turned off the firewall, but nothing changed, so it is not the issue.
Update under server name, it only says the IP address. Do I need something more?
In the Server name field of Connect to Server, I had myipaddress. I changed it to myipaddress\SQLEXPRESS and it works.
In addition, once this was working without the firewall I applied settings as defined in http://www.sevenforums.com/system-security/58817-remote-access-sql-server-express-2008-windows-7-a.html to make the connection work with the firewall turned on.
Do you have sysadmin rights in sql express? It may be that your user account doesn't have the necessary permissions. There is a script on codeplex that will add you logged on account as a sysadmin.