Can anyone guide me around to linking a server to another in SQL Server 2008 R2? I am getting the following error when trying to do so in Management Studio.
The linked server has been created but
failed a connection test. Do you want
to keep the linked server?
ADDITIONAL INFORMATION:
An exception occurred while executing
a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
The OLE DB provider "SQLNCLI" for
linked server "CDSPM1" reported an
error. Authentication failed. Cannot
initialize the data source object of
OLE DB provider "SQLNCLI" for linked
server "CDSPM1". OLE DB provider
"SQLNCLI" for linked server "CDSPM1"
returned message "Invalid
authorization specification".
(Microsoft SQL Server, Error: 7399)
Seems like Authentication problem.
Test by creating the linked Server using "Server Type" as "Sql Server". Then go into "Security" and set your user mapping. As a test, create a SQL login on the remote system and specify that on the "Be made using this security context"
Be sure that you can PING the "Linked Server" name first. HTH
Use drop down and choose
SQL Server Native Client
instead of
SQL Server
Use below link to view the screenshots of connecting the linked server with SQL Server
To solve "Cannot initialize the data source object of OLE DB provider "SQLNCLI10" for linked server" problem
Connect MS Access to SQL server 2008 via linked server
Then use below query to get more information about the linked server
select * from openquery("owner_pc\sqlserver2008",'select * from Testing.dbo.test')
This was driving me round the bend. And the fact you can't edit a Linked server after you entered it is just bananas.
Anyway, just leave most of the boxes empty on the linked server dialogue! Use "SQL Server Native Client" like #abatishchev mentioned then..
Check Kamran's article here for the settings. Only Datasource was filled in for me as IP hostname, after I'd give the server a friendly name in "Linked server", and on the second tab didn't need to bother with any logins just radio button the bottom one and used the SA login on the remote box.
In the general page of New Linked Server, type the sql-server instance name in the [Linked Server] box. Click on the [SQL Server] check box when selecting [Server Type]. Type remote username and password atfer selecting [Be made using this security context] of Security tab.
Select top 10 * from [LINKEDSERVERNAME].[DATABASENAME].[SCHEMANAME].[TABLENAME]
Best of luck.
for more details information http://msdn.microsoft.com/en-us/library/ff772782.aspx
A possible cause, if you have clustered service , and has recently been balanced , it is likely that a connection has been blocked pointing to old resource.
Try moving again resource to another node and reopening the Management studio, try again linked server connection.
Related
Created DNS and installed ODBC Drivers followed same steps from below URL
https://snowflakecommunity.force.com/s/article/how-to-set-up-a-linked-server-from-sql-server-to-snowflake
Once creating testing connection at last step it shows error like
OLE DB provider "MSDASQL" for linked server "SNOWFLAKEDATA" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". (Microsoft SQL Server, Error: 7303)
But DNS created and used followed same way in URL. Can i know where I made mistake?
Please ensure to create the linked server to Snowflake with the following information:
Provider: This should be "Microsoft OLE DB Provider for ODBC Drivers."
Data Source: This should match the ODBC system/user DSN name that was previously configured
Under the Security Tab on left panel, make sure to add a local login (your local machine's login including your host name) associated to a remote user (snowflake username) and its matching password.
I am trying to create a connection manager in Microsoft SQL Server Data Tools for Visual Studio 2017 (SSDT) for an integration services project.
In the Connection Manager:
The Provider is set to: Native OLE DB\SQL Server Naive Client 11.0
The Server name is set to: the name of the local machine
Log on to the server is set to: Windows Authentication
Connect to a database is set to: Select or enter a database name. However no database names appear in the drop down box - the drop down box is blank. I am expecting the name of the database i am working on, including the master database etc to be present.
When I Test Connection, I get an error message which says:
'Test connection failed because of an error in initializing provider. Login timeout expired
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.
Named Pipes Provider: Could not open a connection to SQL Server [2]..'
I am using SQL Server 2017 and Microsoft SQL Server Management Studio 18.
Allow remote connections has been ticked in SSMS.
The only thing i can see is the SQL Server Agent and SQL Server Browser has stopped / is not running and the TCP/IP Protocols for SQLEXPRESS is set to disabled - I am unable to enable it without a further Access is denied (0x80070005) error.
I have tried to follow all of the guides but cannot progress. Could somebody please offer some further guidance?
I have resolved the issue. It was an extremely silly oversight! On installation, the server name in the Visual Studio 17 Connection Manager was listed as: Local MachineName only. In SQL Server, the Server Name was listed as: LocalMachineName\SQLEXPRESS. The Server Name in VS17 has to be exactly the same as SQL Server. As i said, this is a very silly oversight on my part but have documented for future reference.
SQL Server Configuration Manager ==> SQL Server Services(Left sidebar) ==> Right Click and Start all Stopped services
I have a Toshiba laptop with Windows 7 on which I have installed SQL Server 2014 for my database and use Microsoft Access 2016 to manage the data in a user-friendly way.
Everything worked perfectly fine till I tried to connect to the database from another PC on the same network, also with Windows 7.
I am able to connect to the database from the second PC using Microsoft SQL Server Management Studio and SQL Server Native Client 11.0, logging in as sa using SQL Server authentication.
However, when I open the Microsoft Access database file from the second PC, a window pops up, saying that:
See this image.
And when I press OK a second window pops:
See this image.
I have configured the database to use a specific TCP/IP = 1433
Also made new inbound rules in windows firewall for all SQL Server services.
Please note that there is no domain involved here. I don't have a Windows server and the SQL Server is installed on PC #1.
If you require more information, please tell me, I'll be happy to provide
Hope someone will be able to help!
try to use LINKSERVER
Using SQL Server Management Studio
To create a linked server to another instance of SQL Server Using SQL Server Management Studio
In SQL Server Management Studio, open Object Explorer, expand Server Objects, right-click Linked Servers, and then click New Linked Server.
On the General page, in the Linked server box, type the name of the instance of SQL Server that you area linking to.
SQL Server
Identify the linked server as an instance of Microsoft SQL Server. If you use this method of defining a SQL Server linked server, the name specified in Linked server must be the network name of the server. Also, any tables retrieved from the server are from the default database defined for the login on the linked server.
Other data source
Specify an OLE DB server type other than SQL Server. Clicking this option activates the options below it.
Provider
Select an OLE DB data source from the list box. The OLE DB provider is registered with the given PROGID in the registry.
Product name
Type the product name of the OLE DB data source to add as a linked server.
Data source
Type the name of the data source as interpreted by the OLE DB provider. If you are connecting to an instance of SQL Server, provide the instance name.
Provider string
Type the unique programmatic identifier (PROGID) of the OLE DB provider that corresponds to the data source. For examples of valid provider strings, see sp_addlinkedserver (Transact-SQL).
Location
Type the location of the database as interpreted by the OLE DB provider.
Catalog
Type the name of the catalog to use when making a connection to the OLE DB provider.
http://www.quackit.com/sql_server/sql_server_2014/tutorial/linked_servers.cfm
I have SQL server 2012 installed on a machine. I connected it successfully using Linked Server from the another machine. however when i tried to connected the same machine from another labtop which is on the same network i got the following error: please note that i have checked i can assess the sql server from SQL Server Management studio but it does not connected if i try to do it using linked server. I have checked tcp, named pipes are enable. Any suggestion
Error:
Named Pipes Provider: Could not open a connection to SQL Server [5].
OLE DB provider "SQLNCLI11" for linked server "MAL_SQL" returned message "Login timeout expired".
OLE DB provider "SQLNCLI11" for linked server "MAL_SQL" 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.". (.Net SqlClient Data Provider)
You can certainly disable Names Pipes (which I doubt you need, because this is 1990's technology that was predominantly used in IBM Token Ring networks). If you keep it enabled, just make sure that TCP/IP comes first in the order of client protocols (in the SQL Server Client Configuration Manager).
The fact that the client is even trying to use Named Pipes indicates that it could not reach your server via TCP/IP. Management Studio connects with the Native Client and not OLEDB.
Did you do what the error message says - check if your instance name is correct? You must have specified your linked server connection incorrectly.
I had exactly this problem and I got it solved by doing these steps:
1) Go to Network Connections
2) Click on Alt key and select Advanced and then Advanced Settings
3) On Adapters and Bindings tab and in the Connections section, make Ethernet the first connection
Voila!
For me, I had to do two things:
Make sure the SQL Server Browser Service was running on the target SQL Server
Allow TCP Port 1433 in the Firewall on the target SQL Server.
I have an Oracle linked server in my SQL Server database.
I log into SQL Server using local and then Windows authentication.
As the Administrator (which is the account that set up the linked server) I can query directly or embed in a stored proc and then execute the proc without a problem.
As my named user, which has full administrator rights and also has had all SQL Server Groups on the Windows security settings added, I can query my linked server just fine using either synonyms or the OpenQuery syntax. But if I try to execute one of the stored procedures, it will give me the error messages
Message 1:
The OLE DB provider "OraOLEDB.Oracle" for linked server "<server name>" reported an error. The provider did not give any information about the error.
Message 2:
Cannot execute the query "<query string>" against OLE DB provider "OraOLEDB.Oracle" for linked server "<server name>".
I have searched online and typically people see this emssage when trying to run an ad hoc query. My ad hoc query runs just fine. Still, I applied the solution selected, which was to check the "Allow inprocess" option on the OLEDB Provider. Doing that did not help.
any ideas?
Please enable "Allow in Process" option for the provider by opening up Linked Server > Providers and checking on "Allow in Process". For more detail information, please refer to the following link:
Demystifying SQL-Oracle Distributed Query Issues
http://blogs.msdn.com/b/bindeshv/archive/2008/05/21/demystifying-sql-oracle-distributed-query-issues.aspx
source:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/902f5edf-e357-4ee7-82e8-ea5760882985/cannot-fetch-a-row-from-ole-db-provider-oraoledboracle-for-linked-server-linkedservername?forum=sqldataaccess