linked-server

How to use a SQL2000 Linked Server to query an Oracle 11G table

こ雲淡風輕ζ 提交于 2019-12-06 09:51:47
Can someone help me construct the SQL that I need to query the Projects_dim table using the Linked Server "idwd"? To test the connection, I ran a sample query using the linked server name. To access the tables on the linked server, I used a four-part naming syntax: linked_server_name.catalog_ name.schema_name.table_name. replacing the values, you get: idwd.idwd.wimr.PROJECTS_DIM of should it be the following? idwd..wimr.PROJECTS_DIM The database name is "idw" but the grid below shows a blank value under "catalog", which is one source of my confusion, though I believe that the more likely

Excel Get External data from Sql Server: Excel Column order rearranged

爷,独闯天下 提交于 2019-12-06 04:58:52
I created a views on sql server with the following column order: Below are orders of the column when I select the view vwTable Shift_id | Client_ip | Machine_Center but when I'm going to select the views using get external data from the excel: SELECT * FROM vwTable The order of the column on EXCEL is not the same, the output is: Machine_Center | Client_ip | Shift_id Screenshots: from SSMS: Select * from vwTable from excel: get external data Select * from vwTable My problem is that the column order must be the same on views Finally found the solution: right click EXCEL column header go to table

SQL Server Linked Server to Microsoft Access

醉酒当歌 提交于 2019-12-05 18:08:40
I have tried to make use of linked servers in SQL Server 2008 by doing the following to access a Microsoft Access 2003 Table. EXEC sp_addlinkedserver access1t, 'OLE DB Provider for Jet', 'Microsoft.Jet.OLEDB.4.0', 'C:\tester.mdb' EXEC sp_addlinkedsrvlogin access1t, FALSE, Null, Admin, Null GO CREATE VIEW TI001APCE1265 AS SELECT * FROM access1t...Table1 However, I get the error: OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "access1t" returned message "Unspecified error". Msg 7303, Level 16, State 1, Procedure TI001APCE1265, Line 1 Cannot initialize the data source object of OLE

Creating a Linked Server and Database Alias

怎甘沉沦 提交于 2019-12-05 08:08:44
I have two servers Server1 and Server2 On both servers i have a Database called QAI is there a way that i can create a linked server with an alias from Server2 to Server1 but instead of Server1.QAI.dbo.tbBlah Have it aliased as QAI.dbo.tbBlah This is needed due to the QAI DB on server2 failing and needing to fall back to the Server1 instance while it is fixed Thanks Julle This works. Tested on a SQL2012 http://alexpinsker.blogspot.se/2007/08/how-to-give-alias-to-sql-linked-server.html There are no problems to add SQL linked server to the specific host running it. But what if you need to give

How to properly trigger an insert to a linked sql server?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 06:27:52
问题 I have the same table in two different sql servers (one is SqlServer 2000 and the other 2008). I'm using sql server management studio. I want that each time an insert is made on a table in the SqlServer 2000 table (Table_1) a trigger occurs and the record would also be inserted to the same table in the SqlServer 2008 table (also Table_1). the sql server 2008 is defined as a linked server, and it is possible to run queries and perform inserts on the 2008 db from the 2000 db connection using

Having trouble adding a linked SQL server

安稳与你 提交于 2019-12-05 02:08:39
I'm trying to pull in data from a remote SQL Server. I can access the remote server using SQL authentication; I haven't had any luck using the same credentials with sp_addlinkedserver. I'm trying something like this: Exec sp_dropserver 'Remote', 'droplogins' go EXEC sp_addlinkedserver @server='Remote', @srvproduct='', @provider='SQLNCLI', @datasrc='0.0.0.0' EXEC sp_addlinkedsrvlogin @useself='FALSE', @rmtsrvname='Remote', @rmtuser='User', @rmtpassword='Secret' Select Top 10 * from Remote.DatabaseName.dbo.TableName Here's what I get: OLE DB provider "SQLNCLI" for linked server "Remote" returned

Run a Query from Linked Server (Oracle) in SQL Server2008 R2

筅森魡賤 提交于 2019-12-05 01:53:24
问题 I have the linked server set up in SQL Server 2008. But I could not run any query against the linked server. I tried to run this simple command but it's not working SELECT * FROM MYSERVER..ALANH.TEMP_UPDATE1 This is the error I got when I run the above command. Msg 7399, Level 16, State 1, Line 1 The OLE DB provider "OraOLEDB.Oracle" for linked server "MYSERVER" reported an error. The provider did not give any information about the error. Msg 7312, Level 16, State 1, Line 1 Invalid use of

There is insufficient system memory in resource pool 'internal'

落花浮王杯 提交于 2019-12-04 23:35:12
SQL Server 2008 Linked Server and ad-hoc INSERTs cause a rapid memory leak which eventually causes the server to become non-responsive and ends with the following error: Msg 701, Level 17, State 123, Server BRECK-PC\SQLEXPRESS, Line 2 There is insufficient system memory in resource pool 'internal' to run this query. Location: qxcntxt.cpp:1052 Expression: cref == 0 SPID: 51 Process ID: 1880 The server remains non-responsive until SQL Server is restarted. Software in use: Windows Vista Ultimate 64 bit build 6001 SP1 Microsoft SQL Server 2008 (SP1) - 10.0.2734.0 (X64) Sep 11 2009 14:30:58

Exec SP on Linked server and put that in temp table

僤鯓⒐⒋嵵緔 提交于 2019-12-04 21:16:16
问题 Need some help on the below issue: Case 1 : stored procedure is on server 1 - call is from server1 declare @tempCountry table (countryname char(50)) insert into @tempCountry exec [database1_server1].[dbo].[getcountrylist] Select * from @tempCountry Result: successful execution Case2 : iIf this same stored procedure is being called from a different server using linked server like this : declare @tempCountry table (countryname char(50)) insert into @tempCountry exec [database2_server2].

How to test linkedserver's connectivity in TSQL

北城余情 提交于 2019-12-04 13:38:31
问题 I need to write a procedure to collect data from several remote servers, I use linkedservers and OPENQUERY to gather data from servers, but sometimes I lose connection to some servers or I simply can't connect them (e.g. remote server is offline)- and OPENQUERY results in time-outs in these cases. So I wanted to check linkedservers connectivity first and then if it's successful run the query, if not just move on to next the remote server. I tried to put OPENQUERY in TRY - CATCH but it still