linked-server

Login failed when querying linked server

别等时光非礼了梦想. 提交于 2019-12-04 12:27:20
I am trying to create a linked server in SQL Server: --Create the link to server "uranium" EXEC master.dbo.sp_addlinkedserver @server = N'uranium', @srvproduct=N'', @provider=N'SQLNCLI' --Add the catch-all login with SQL Server authentication EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'uranium', @useself=N'False', @locallogin=NULL, @rmtuser=N'BatteryStaple', @rmtpassword='Horsecorrect' And it creates fine. But any attempt to query the linked server, e.g.: SELECT * FROM uranium.Periodic.dbo.Users results in Msg 18456, Level 14, State 1, Line 1 Login failed for user 'BatteryStaple'.

Cannot initialize the data source object of OLE DB provider “Microsoft.ACE.OLEDB.12.0” for linked server

被刻印的时光 ゝ 提交于 2019-12-04 05:27:43
问题 I'm trying to establish a linked server from SQL Server 2008 R2 to an Access database . The Access database is not password protected. As I have seen in other posts (specifically this one), this is usually due to the current user not having access to the Temp folder inside the NetworkService folder. Since we are running this in Windows Server 2008 , the directory structure is quite different than what most are eluding to. I have allowed access to every temp folder in the "root:\Documents and

Linked Server In SQL Server Express

爱⌒轻易说出口 提交于 2019-12-04 04:37:08
I am developing an app where i have a local database in SQL Server Express. During work in local database, we need to execute a query on another SQL Server / live server and its return a value and with this value we execute a query in local server. It is OK when executing this query against 2 or 3 queries, but i have around 5000 records on which I need to execute same process. I have done with above style but its take too much time. I've found that we can run a query on multiple servers. Can i run a query on SQL Server Express and server at same time and and run my whole queries in this style?

In SQL server, how can I query an Oracle Timestamp column over a Linked server connection?

亡梦爱人 提交于 2019-12-04 03:43:26
问题 The query I have made in oracle does not work with linked server with sql server 2008. The OLE DB provider "MSDAORA" for linked server "ORACLE" supplied invalid metadata for column "DATETIME_INS". The data type is not supported. The query: select * from ORACLE..U_GERAN.CELLSTATS4 What are the modification that must be done to execute the query. 回答1: Try, SELECT * FROM OPENQUERY(ORACLE, 'select cast(DATETIME_INS as DATE) from U_GERAN.CELLSTATS4') You can add the other columns to the query once

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

落爺英雄遲暮 提交于 2019-12-03 16:19:08
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 schema or catalog for OLE DB provider "OraOLEDB.Oracle" for linked server "MYSERVER". A four-part name was

Cross-server SQL

£可爱£侵袭症+ 提交于 2019-12-03 06:34:13
问题 I want to port data from one server's database to another server's database. The databases are both on a different mssql 2005 server. Replication is probably not an option since the destination database is generated from scratch on a [time interval] basis. Preferebly I would do something like insert * from db1/table1 into db2/table2 where rule1 = true It's obvious that connection credentials would go in somehwere in this script. 回答1: I think what you want to do is create a linked server as

“Cannot create an instance of OLE DB provider” error as Windows Authentication user

烂漫一生 提交于 2019-12-03 03:47:07
问题 I am trying to run openrowset from MS SQL Server on an Oracle server. When i execute the following command: select * from OPENROWSET('OraOLEDB.Oracle','srv';'user';'pass', 'select * from table') the following error occurs Msg 7302, Level 16, State 1, Line 1 Cannot create an instance of OLE DB provider "OraOLEDB.Oracle" for linked server "(null)". Can anyone tell me how I can use openrowset with OraOLEDB.Oracle ? I am using 64 bit version of MS SQL Server and Oracle OLEDB driver. Edit I have

Linked server dynamic catalog for executing MDX through OpenQuery

允我心安 提交于 2019-12-02 15:43:26
问题 I have multiple OLAP databases in my project, so is it possible to dynamically decide the catalog for executing this MDX query? SELECT * FROM OpenQuery(OLAP_SERVER, 'WITH MEMBER measures.X AS dimensions.count SELECT Measures.X ON 0 FROM MyCube') as X I don't want to create a separate linked server for each of the OLAP database. Both the relational and cube databases reside on the same physical machine. My linked server configuration are: EXEC master.dbo.sp_addlinkedserver @server = N'OLAP

Possible with multiple database connections

巧了我就是萌 提交于 2019-12-02 07:49:16
New to the tSQLt world (great tool set) and encountered a minor issue with a stored procedure I am setting up a test for. If I for some reason have a stored procedure which connects to mutiple databases or even multiple SQL servers (Linked Servers). Is it possible to do unit tests with tSQLt in such a scenario? I commented already, but I would like to add some more. So as I said already, that you can do anything that fits into the single transaction. But for your case I would suggest to create synonyms for every cross database/instance object and then use synonyms everywhere. I've created

Passing string parameters to linked Oracle Server procedures from SQL Server

早过忘川 提交于 2019-12-02 06:52:27
问题 I have an Oracle procedure called P_CREATE_USER . It takes a single varchar2 parameter: create or replace PROCEDURE P_CREATE_USER (P_USERID varchar2) ... I can run this from Oracle as EXEC P_CREATE_USER('MyUserId') We have the Oracle server linked to our SQL Server. I've tried: EXECUTE('P_CREATE_USER(''MyUserId'')') AT ORACLE_SERVER For my trouble, I get: OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLE_SERVER" returned message "ORA-00900: invalid SQL statement". Msg 7215, Level 17