SQL Server linked server error locating server in sql server 2005 - mysql

When I execute query like this
select * from openquery(XYZ, 'select * from patient')
I create the linked server in the SQL server 2005 and connect with the MYSQL and when I execute query and display errors like..
OLE DB provider "SQLNCLI" for linked server "XYZ" returned message
"Login timeout expired".
OLE DB provider "SQLNCLI" for linked server "XYZ" returned message
"An error has occurred while establishing a
connection to the server. When connecting to SQL Server 2005, this
failure may be caused by the fact that under the default settings SQL
Server does not allow remote connections.".
Msg 53, Level 16, State 1,
Line 0 Named Pipes Provider:
Could not open a connection to SQL Server
[53].

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/
i think this will help you...

Related

How to connect from MSSQL server running on ubuntu to MySQL?

I'm trying to connect to a MySQL server instance, using a distributed query, with the folling query:
SELECT *
FROM openrowset('SQLNCLI11','server=<>,33333;uid=root;pwd=<>','SELECT * FROM mov.users')
I get the following errors:
OLE DB provider "SQLNCLI11" for linked server "(null)" returned message "Client unable to establish connection due to prelogin failure".
OLE DB provider "SQLNCLI11" for linked server "(null)" returned message "Protocol error in TDS stream".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "SQLNCLI11" for linked server "(null)".
I've tried using SSL on my MSSQL instances and nothing. I've ran the execute command for the sp_configure to enable 'ad hoc distributed queries', and nothing. I've tried to create a linked server but it doesn't seem to be a mssql on linux compatible feature.
How can I cestablish a direct connection between a MSSQL running on linux to a MySQL server?
On Linux, SQL Server does not support Linked Servers to data sources other than SQL Server. See unsupported features

Linked server from SQL Server 2014 to SQL Server 2008 giving 'NT AUTHORITY\ANONYMOUS LOGON' error

When I deployed a linked server using the sp_addlinkedserver and sp_addlinkedsrvlogin command it is giving me an error -
'Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. OLE DB provider "SQLNCLI10" for linked server "link" returned message
"Invalid connection string attribute".**
When the same linked server is deployed from SQL Server 2014 to SQL Server 2014 only, it works. What is the problem and how to resolve it? I have searched for over 3 hours on google and cannot find a to the point solution for the same.

Execute sql script using sqlcmd.exe

C:\>sqlcmd -S(local) -U(sa) -P(password) -i F:\sql.sql
HResult 0x3, Level 16, State 1 Named Pipes Provider: Could not open a
connection to SQL Server [3]. Sqlcmd: Error: Microsoft SQL Server
Native Client 10.0 : A network-related or in stance-specific error has
occurred while establishing a connection to SQL Server . Server is not
found or not accessible. Check if instance name is correct and i f SQL
Server is configured to allow remote connections. For more information
see SQL Server Books Online.. Sqlcmd: Error: Microsoft SQL Server
Native Client 10.0 : Login timeout expired.
How I resolve this problem
Execute this query on this folder window->system32, because every sql command executes in this folder..
C:\Windows\system32>sqlcmd -S(local) -U(sa) -P(password) -i F:\sql.sql

Error during deploy from visual studio to analysis server

I'm connected to analysis server:localhost\sqlr2.
I'm using windows authentication,so user name and password are all grayed out.
I'm trying to deploy a project from Visual Studio BI to SQL Server 2008R2 analysis server and get the following errors:
Error 1 Internal error: The operation terminated unsuccessfully. 0 0
Error 2 OLE DB error: OLE DB or ODBC error: Login timeout expired; HYT00; A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.; 08001; Named Pipes Provider: Could not open a connection to SQL Server [53]. ; 08001. 0 0
Error 3 Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'Max Min Manufacturing DM', Name of 'Max Min Manufacturing DM'. 0 0
It looks like your datasource is set up wrong. When you process, what server is the cube pointed at? What account does SSAS run under? How have you set up the connection string in the datasource? Are you seeing failed login attempts in the SQL Server logs?
Error 2 OLE DB error: OLE DB or ODBC error: Login timeout expired; HYT00;
A network-related or instance-specific error has occurred while establishing a
connection to SQL Server. Server is not found or not accessible.
Check if instance name is correct and if SQL Server is configured
to allow remote connections.
I'd focus on this. I assume you must be able to connect to SQL Server in Visual Studio to build your cube, so I guess Analysis Services doesn't have permissions. Check your connection strings.
You say you're using Windows Authentication, so does the service accounts that Analysis Services runs under have access to the required database?
I would like to share my experience with this error and how I discovered the solution.
Hope it helps!
http://afsawaf.blogspot.com/2013/08/ole-db-error-ole-db-or-odbc-error.html
---Thanks #kleopatra for the advice.
In my case I was connecting with a wrong provider, I was trying to connect using SQL Server Native Client 11.0 to MS SQL Server 2005 DB which caused my similar problem.
When I reverted to version 10.0, worked perfectly!

Linked Server Connection Error

I created a linked server to my machine to query from other server using this script.
EXEC sp_addlinkedserver
#server = N'serverdatabase\vtidbserver',
#provider = N'SQLOLEDB',
#datasrc = N'VTI_FIS',
#srvproduct=''
EXEC sp_addlinkedsrvlogin
#rmtsrvname=N'serverdatabase\vtidbserver',
#useself=N'False',
#locallogin=NULL,
#rmtuser=N'vtidbadmin',
#rmtpassword='vallacar#654321'
now the script successfully execute but when it try to query, this is the error message that i got:
OLE DB provider "SQLNCLI10" for linked server "serverdatabase\vtidbserver" returned message "Login timeout expired".
OLE DB provider "SQLNCLI10" for linked server "serverdatabase\vtidbserver" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
Msg 53, Level 16, State 1, Line 0
Named Pipes Provider: Could not open a connection to SQL Server [53].
But when using management studio i can connect to the server successfully.
Need to help this problem, TIA
I suppose it is another MS SQL server.
If it is, you don't have to use provider, only have to specify product.
exec master.dbo.sp_addlinkedserver #server = N'TEST', #srvproduct=N'SQL Server'
Hope that helps.