Update Data On SQL2005 Linked Servers To DB2

Oct 25, 2007

Hi all.

I need your help.

I create a linked server on SQL 2005 server using IBMDA400 as provider.

I create a VBscript to update some data on DB2, and issue begin trans and commit trans. Kindly refer to below code.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Set oKCDat = CreateObject("KCDAT.kcdatapi")
Set objConnection = oKCDat.OpenConnection_SQL(strDataSource,strDB, strUserID, strPassword)

Set rs = CreateObject("ADODB.Recordset")

strName = "TEST1"

strTemp1 = "2"
strTemp2 = "3"
intTemp1 = 199

strSQLStatement = "SELECT * FROM QS36F.TEST WHERE PRACNM = ''" & strName & "''"
strUpdSQL = "TEST1 = '" & strTemp1 & "', TEST2 = '" & strTemp2 & "', TEST3 = " & intTemp1

strSQL = "UPDATE OPENQUERY(TESTDB2," & "'" & strSQLStatement & "')" & " SET " & strUpdSQL & ";"


objConnection.BeginTrans

objConnection.Execute(strSQL)

objConnection.CommitTrans


objConnection.Close


Set rs = Nothing
Set oKCDat = Nothing
Set objConnection = Nothing

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------


When i run above script, it prompt me an error message;
"Microsoft OLE DB Provider for SQL Server
The requested operation could not be performed because OLE DB provider "IBMDA400" for linked server "TESTDB2" does not support the required transaction interface."

If i run it without "begintrans" and "committrans", it update the data successfully.

Does anyone know about it?

Highly appreciated for above matters.


Regards

View 3 Replies


ADVERTISEMENT

SQL2005 Linked Servers To DB2

Feb 7, 2007

I'm currently using the IBMDA400 client access drivers for DB2 to create linked servers on SQL2005 Std.
The DB2 server version is: V5R4M0.

The error that I receive when I issue a select query using the linked server is shown below. The query works fine within SQL 2000 Std.

Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "IBMDA400" for linked server "LNKDSRVR" reported an error. Access denied.
Msg 7301, Level 16, State 2, Line 1
Cannot obtain the required interface ("IID_IDBCreateCommand") from OLE DB provider "IBMDA400" for linked server "LNKDSRVR".

I think this is a common error seen on most attempts to a DB2 linked server. I also confirmed that using the built-in "LocalSystem" account would make it work. Since we also want our SSIS packages to access different server "shares" we would like to continue using our domain account.

Does anyone know if there is a fix / workaround for this? or is this by design??

Thanks.

View 1 Replies View Related

Transfer Data Between Linked Servers

Nov 12, 2004

Hello to all,

my problem is about the slow execution of a query.

I have two database located in two different servers. The servers are linked with the linked server connection made with the enterprice manager.

The databases structure is the same and I copy some data from a database to the other with the following query:

INSERT INTO DATASERVER.RESULTS.dbo.Tab_Tests SELECT * FROM LINESERVER.WIP.dbo.Tab_Tests WHERE ID_Result = '{76271FC1-9470-4EF7-A403-000CF75C2215}' OR ID_Result = '{08C8EEB9-CD22-4CF9-8269-8C1CC58C752B}' OR ID_Result = '{B7B7EED1-36E4-48FA-9636-ABBE62AAE04D}' OR ID_Result = '{8F7BA69E-D2CE-4EB2-BBC4-AFFA165CE0CE}' OR ID_Result = '{273CB805-945F-4EFA-AE20-BC4E0898A19F}'

Everything works till the database grows up more than 400 MB.

Also if I select one result, that consist of some records, the query is very slow and the CPU is working over the 75 %.

I ask you if my working way is corret or if you have some solution or some explanation for me.

Thank you

View 1 Replies View Related

Getting Meta-data For Linked Servers

Oct 25, 2006

My customer has a .NET application that reads meta data from SQL Server, Oracle, DB2, and several propritary databases. Because each DBMS stores the meta data using various techniques, they have written custom code for each DBMS. They are working on a generic ODBC/OLEDB suppport, but in the interim I was trying to use SQL Server to link to an Access database. The Access linked server works fine for queries in Query Analyzer, but I would like to be able to programatically read the metadata for an Access DB (tables, columns, types, etc) via the linked server. SQL Server's usual mechanism for storing meta-data in the Master database aparently is not used for Linked Servers.

Does SQL Server expose Linked Server meta data?
How would one retrieve this meta data if it is exposed?

Thanks,

Ben

View 3 Replies View Related

How To Create Linked Servers For Multi Data Source

May 6, 2008

I have a report my business users need from from two data sources, which are on two different servers (both are oracle DBs). I have a common Primary key between both. I've read through a ton of posts and it looks like there is no way to join the data using Datasets, that you need to do something called Linked Servers.
but what I couldn't find is where do I go to create a Linked Server and how. I'm new to SS, so I need help and details.

the more step by step details the better.

Thanks

View 4 Replies View Related

Replication :: Populating Local Database Daily With Data From Linked Servers?

Jul 29, 2015

I have multiple web databases for storefront orders as linked servers on SQL Server 2008 R2. I need to organize the data for these orders into a structure that can be imported into my ERP application db frequently either on demand or periodically during the day. We are essentially trying to make the manual order entry process automated. My thought was to get the data into views that resemble the schema of the order table in my application db and then schedule a stored procedure with sql jobs or a load routine from within the ERP application that would insert data from the view into the order table.

View 2 Replies View Related

Combine Tables From 2 SQL Servers With Different Schemas And Update As New Data Is Entered

Mar 28, 2008

I have 2 SQL server 2000 machines, I need to take a table from each one and combine them together based on a date time stamp. The first machine has a database that records information based on an event it is given a timestamp the value of variable is stored and a few other fields are stored in Table A. The second machine Table B has test data entered in a lab scenario. This is a manufacturing facility so the Table A data is recorded by means of a third party software. Whenever a sample is taken in the plant the event for Table A is triggered and recorded in the table. The test data may be entered on that sample in Table B several hours later the lab technician records the time that the sample was taken in Table B but it is not exact to match with the timestamp in Table A. I need to combine each of these tables into a new SQL server 2005 database on a new machine. After combining the tables which I am assuming I can based on a query that looks at the timestamp on both Tables A & B and match the rows up based on the closest timestamp. I need to continuously update these tables with the new data as it comes in. I havent worked with SQL for a couple of years and have looked at several ways to complete this task but havent had much luck. I have researched linked servers, SSIS, etc Any help would be greatly appreciated.

View 10 Replies View Related

Update Field Using Value From Linked 2000 Sql Data

Jul 11, 2007

I'm trying to update a field (tmpRequestID) in a SQL Express table (tblTSubRequest) using a value in a SQL 2000 database field (fldtmpRequestID) in the dbo.NewPurchase table.

The procedure I thought would work is:
USE [tempPurchase]
GO
/****** Object: StoredProcedure [dbo].[UpdateSubfldRequestID] Script Date: 07/11/2007 15:01:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[UpdateSubfldRequestID]
AS
BEGIN
-- Insert statements for procedure here
UPDATE tblTSubRequest
SET tmpRequestID = tblRequest.fldRequestID
FROM tblTSubRequest INNER JOIN
[NGTXA4-RSMSZ-01].NewPurchase.dbo.tblRequest ON tblTSubRequest.fldRequestID = tblRequest.fldRequestID
WHERE (tblRequest.fldUpdateCode = 99)
END

It appears that the procedure cannot read the field value on the 2000 server and the 2000 server is linked to the 2005 express edition.

View 2 Replies View Related

Development Servers, Auto-update Live Servers

Aug 21, 2001

can anyone tell me if they know of a way to automate the update process from development servers to live server, with little interference from an administrator

I have a development team that are constantly updating their databases along with their ASP code, and want to publish changes an a weekly basis. They have asked me for a way to take their new structures, tables, procedures etc, and copy them to the live servers, but NOT to interfere with existing customer data.

Funny I know – and I hate the idea btw :(

Any references, contacts, 3rd party tool recommendations welcome,

Thanx,

Darren

View 1 Replies View Related

SQl2005 - Linked Server

Jul 16, 2007

Help pl.


I need to access object from Oracle 9i. I've installed O9i client on sql server and create linked server to O9i db. but when executing

exec sp_tables_ex N'SUN920' ---> list of all table appear

and when selecting from a prticular table -- got below msg

Msg 7314, Level 16, State 1, Line 2
The OLE DB provider "OraOLEDB.Oracle" for linked server "sun920" does not contain the table ""shm"."x"". The table either does not exist or the current user does not have permissions on that table.

how to resolve this issue

View 2 Replies View Related

Linked Server From SQL2005 To SQL2000

Jan 7, 2007

Linked server from SQL2005 to SQL2000
Hi
I use the following SQL statements to create a link server. RemoteServerName is an SQL2000 and I am executing this in another machine which is SQL2005.
 
Though the link server is created successfully, I am not able to se the tables under it so could not query anything.
 
----
 
USE [master]
EXEC master.dbo.sp_addlinkedserver @server = N'RemoteServerNameInstanceName', @srvproduct=N'SQL Server'
EXEC master.dbo.sp_serveroption @server=N'RemoteServerNameInstanceName', @optname=N'collation compatible', @optvalue=N'false'
EXEC master.dbo.sp_serveroption @server=N'RemoteServerNameInstanceName', @optname=N'data access', @optvalue=N'true'
EXEC master.dbo.sp_serveroption @server=N'RemoteServerNameInstanceName', @optname=N'rpc',@optvalue=N'false'
EXEC master.dbo.sp_serveroption @server=N'RemoteServerNameInstanceName', @optname=N'rpc out', @optvalue=N'false'
EXEC master.dbo.sp_serveroption @server=N'RemoteServerNameInstanceName', @optname=N'connect timeout', @optvalue=N'0'
EXEC master.dbo.sp_serveroption @server=N'RemoteServerNameInstanceName', @optname=N'collation name', @optvalue=null
EXEC master.dbo.sp_serveroption @server=N'RemoteServerNameInstanceName', @optname=N'query timeout', @optvalue=N'0'
EXEC master.dbo.sp_serveroption @server=N'RemoteServerNameInstanceName', @optname=N'use remote collation', @optvalue=N'true'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname = N'RemoteServerNameInstanceName', @locallogin = NULL , @useself = N'False', @rmtuser = N'remoteUser', @rmtpassword = N'remotePassword'

View 5 Replies View Related

Linked Servers

Aug 17, 2006

Is it possible to link to an SQL 2005 server db from a SQL 2000 server? Is there a driver for this?

View 1 Replies View Related

What Are Linked Servers And What R Its Uses

Apr 5, 2008

can anybody tell me about Linked Servers and their uses and how to add a linked server to my Sql Server 2005.
 any help on this would be highly appreciated.

View 3 Replies View Related

Linked Servers

Jun 10, 2004

Hello All,

I have been trying to Link two sql servers on two different machines over the Internet without any luck. Can someone point me to information about doing this with good examples?

Thanks

View 2 Replies View Related

LINKED SERVERS

Jan 22, 2002

I currently have a main SQL Server which had a column on the majority of the tables. This column also had a check contraint on it. I dropped the column and the constraint and I now get the following message when trying to query the tables through a linked server 'OLE DB provider 'SQLOLEDB' supplied inconsistent metadata. An extra column was supplied during execution that was not found at compile time.'.

Can anyone help

View 1 Replies View Related

Linked Servers.....

May 10, 2001

Hi All,
I have successfully linked a server and had SQL queries running
OK for a few weeks, but today I get the following message....

"OLE DB provider 'SQLOLEDB' supplied inconsistent metadata. An extra column was supplied during execution that was not found at compile time."
(Server: Msg 7353, Level 16, State 1, Line 1)

I've dropped the link and recreated it but I still get the same error
message. Can anyone help???

Thanks
David.

View 2 Replies View Related

Linked Servers In DTS...

Jun 25, 2001

Hi,

I'm using SQL Server 7.0 SP1.

I have a DTS package that requires me to link 2 servers
and query both in order to get my set of records that I
want to Transform. My query runs fine in QA. I copy and
paste it into the SQL Query window of the transformation.
I click Preview and all that happens is a quick flicker of
the DTS window. When I go to Transformations, there are
no source columns.

Here is a copy of my code that I'm trying to use:
-------------------------------------------------------
declare@start_dteas datetime,
@end_dteas datetime

SELECT@start_dte = date_data_range_start_dte,
@END_DTE = date_data_range_END_dte
FROMSIDDEV.SID_DEVELOPMENT.DBO.T901_RUN
WHERERUN_ID = (selectmax(run_id)
from
SIDDEV.SID_DEVELOPMENT.DBO.t901_run
whererun_type_cd = 'M')


SELECTRUN_ID
INTO#RUNS
FROMCRMDEV02.MDCORE.DBO.T901_RUN
WHEREDATE_DATA_RANGE_START_DTE >= @START_DTE
ANDDATE_DATA_RANGE_END_DTE <= @END_DTE

SELECTT70.*
FROM
CRMDEV02.MDCORE.DBO.T70_MD_UNIVERSE_RELATIONSHIP_M A
NGT AS T70 JOIN #RUNS
ONT70.RUN_ID = #RUNS.RUN_ID

DROP TABLE #RUNS
------------------------------------------------------
Is there an issue with Linked Servers and DTS?
Any help would be greatly appreciated.

Thanks in advance,
Darrin

View 1 Replies View Related

LINKED SERVERS

Aug 7, 2001

FOLKS
I GET THE FOLLOWING ERROR WHEN I RUN A SELECT FROM THE LINKED SERVER
THE LINKSERVER EXISTS AND THERE IS A RECORD IN SYSSERVERS TOO.

Could not initialize data source object of OLE DB provider 'Microsoft.Jet.OLEDB.4.0'

I AM NOT SURE WHERE TO GO FROM HERE.

REGARDS

GIRISH

View 1 Replies View Related

Linked Servers

Aug 10, 2001

Hi Gurus,
I am looking for literature to find out Pros and Cons of Using DTS Verses
Linked Servers in SQL 7.0.

My requirement can be done by either DTS or Linked servers. But I would like to know more about resorce utilisation of these tecniques before making a decission.

Can somebody suggest where to look for.

Thanks
sekhar

View 1 Replies View Related

Linked Servers

Sep 18, 2001

When I create linked server using integrated security and <they will be impersonated> option I get this:
Server: Msg 18456, Level 14, State 1, Line 1 Login failed for user ''
MS Technet says that SQL Server 7 doesn't allow double hops and to use mappings to standard security login to work around. @#%%~~@@#@#&^%@#
Impersonating to version 6.5 works fine.
Is there any way to link servers using ONLY integrated security?
Any help would be much appreciated.
Thanks

View 1 Replies View Related

Linked Servers

Jul 18, 2000

I have setup a linked Informix server in SQL7.0 and I am trying to create a
simple View with the following SQL statement

SELECT doc_code
FROM FOURSITE.foursite.informix.watdoc
WHERE (order_no = [PV01963B ])


I am getting the following error:

---------------------------
SQL Server Enterprise Manager
---------------------------
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid use of schema and/or
catalog for OLE DB provider 'MSDASQL'. A four-part name was supplied, but
the provider does not expose the necessary interfaces to use a catalog
and/or schema.
---------------------------
OK Help
---------------------------

Can any one tell me how to correct this problem?

Thanks

Peter
pczurak@bigfoot.com

View 5 Replies View Related

Linked Servers

Apr 17, 2000

Is it possible to add a 6.5 database as a linked server to a 7.0 database and query from it ?

View 6 Replies View Related

About Linked Servers

Nov 3, 2000

Hi.
I'm working with SQL Server 7.0 and I've been reading about the linked server option. My question is, if it's possible to link a server with a SQLBase database 7.01.

I have download some drivers to my computer, the odbc driver for sqlbase and the sqlbase ole db driver as well, but when I try to add a new linked server in the enterprise, in the provider name option I can not see any provider name addressing to Centura or Sql base driver.

Has anybody an idea how to make this connection then? or the right way for doing it??

Thanks for any help can be offered.
Regards, Elvia.
:)

View 2 Replies View Related

LINKED SERVERS

Feb 10, 2000

I have two 7.0 servers and I want to run a distributed query.

I did sp_addlinkedserver to link server B to server A
and I did sp_addlinkedsrvlogin for a specific login.
After adding login when I try to access a table on server B it
says login failed

All the logins are NT authenticated (in both the servers, So
both servers have same logins.)



but it is not working.

View 1 Replies View Related

Linked Servers

Sep 1, 2000

Hi all
I try to configure Linked Servers from the query analyze , and have some troubles.
My steps are :
1. from the enterprise mennenger , add 2 new servers : srv1 , srv2 (both SQL7)
2. from the query analyzer of srv1.master: "sp_addlinkedserver 'srv2'"
3. from the query analyzer of srv1.master:
"sp_addlinkedsrvlogin 'srv2',false,null,'sa','myPass'"
4. select * from srv2.pubs.srv2Table
5. I get the next error :"error 6 : Specified SQL srever not found."

What do I do wrong ?
Eyal

View 2 Replies View Related

Linked Servers

Apr 19, 2000

Anyone out there use linked servers? I just tried this SQL7 feature and am very impressed. Are there any pitfalls to watch out for? Comments?

Thanks in advance.

Steve

View 1 Replies View Related

Linked Servers

Feb 14, 2002

I have created link servers a few time within SQL2000 and pulled data from Oracle. How would an Oracle Server or Application pull / See from SQL?

Anyone have any experience?

Thanks,
David

View 1 Replies View Related

Linked Servers

May 11, 2002

How to determine by means of T-SQL
if a linked server is available(for processing with its tables)?

View 1 Replies View Related

Linked Servers

Jun 26, 2002

This is my problem I have a Server A and Server B. There is a master table in Table A. I link Server A and Server B. When I look in Under Linked Server tables of B I can only C tables in Server A not the Server B 's Tables. Dpn't know what is happening. Could SOmebody help

View 1 Replies View Related

Linked Servers

Nov 1, 2004

We are creating a newServer grabbing data from an extrnal data source.

We need to perform regular audits to verify the record counts (for now) are the same.


We have 2 physically separate SQL servers 1 with old 1 with new.

I have created a linked server but when i do a query on the linked server the performace is pathetic (2mins 12 secs) to do a simple count.

Is there a better way, or can improv the perf?

Thanks
Greg C

View 3 Replies View Related

Linked Servers

Jan 5, 2006

I have two servers and they are linked servers. When I query a table on ON Box2 from Box1
The distributed query works fine but when I tried the oppisite it says 'SQL Server does not exist or access denied.'
What could be the reason.

Thanks.

View 2 Replies View Related

Linked Servers

Feb 27, 2006

Recently, I had Microsoft review why our SQL Db was unexpectedly terminating. They pointed to our Oracle Linked servers. They recommended that we try to uncheck the enable allow in process option on the ODBC driver. We are currently using the Microsoft OLE Db provider for our Oracle connnections as we were unable to get the Oracle ones to work with a linked server. When we unchecked this allow in process option near the end of the day our website began getting out memory errors from ODBC. It appeared to have been because of this change. Does anyone have any insight as to why changing this option could have caused this?

View 1 Replies View Related

Linked Servers

Sep 29, 2006

Hello,


Is there any limit to the number of linked servers i can add via EM?. where can i find more info on adding/configuring linked servers in MSSQL2k and the limitations/drawbacks if any?


Thanks in advance..

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved