Quantcast
Channel: SQLServerCentral » SQL Server 2008 » Working with Oracle » Latest topics
Viewing all 214 articles
Browse latest View live

Oracle Failover from Primary to Secondary Server (SSIS)

$
0
0
I have some packages that have Oracle as their Data Source.I'm not clear as to what I do and\or not need to do.The primary Server has been failing so I added entries into the 32 and 64 bit tnsnames.ora file to point to the secondary server.I also created a ODBC Connections and Linked Servers.I want to failover to the secondary sever as transparent as possible.I don't recall where you define which Oracle Instance that you are referring to in the SSIS Package?Any advise would be greatly appreciated.

SSMA to migrate data from oracle to sqlserver

$
0
0
We migrated data from oracle to sqlserver using SSMA but when we see data of sqlserver on .NET GUI, formatting is different than oracle data display on .NET GUI.For an example we are able to see data of oracle on .NET GUI of a spectific column of grid :[b]HelloHow are you ?[/b]But in sql server all data is displaying in single line like :[b]Hello How are you ?[/b]We executed below command on sql server but still able to see data in single row : update table_name set column_name =replace(column_name,'',char(13)+char(10))Can you please provide us solution as soon as possible ?I had already checked , it is not an application issue.we are using collation as Latin1_General_Bin in sqlserver. Is it the cause ?When we run query of oracle in sql developer and paste the output of specific column in notepad++, it shows the LF character butsame out put of sqlserver does not show LF character in notepad++.Still I am not able to find out the root cause why LF character is not shown in sqlserver, we migrated the data using SSMA from oracle to sqlserver .Will we have to do some setting change in SSMA while migrating data of varchar column ?

Error while executing queries using Linked server to Oracle

$
0
0
OLE DB provider 'MSDAORA' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.

Weird error when selecting from view.

$
0
0
I'll start this off by saying that this has worked for months, and just started failing with no changes on either the Oracle (11g) or SQL Server (2008 R2 CU5) side. What is weird is that it works depending on the current DB selected.This statement:[code="sql"]USE LIBRARIES;GOSELECT TOP 1 EXTRACT_DATE FROM EOracle.dbo.clm_edit_wq_clmGO[/code]returns this error:Msg 7356, Level 16, State 1, Line 1The OLE DB provider "OraOLEDB.Oracle" for linked server "EOracleSrv" supplied inconsistent metadata for a column. The column "EXTRACT_DATE" (compile-time ordinal 2) of object "Select * from CLEAR.CLM_EDIT_WQ_CLM" was reported to have a "DBCOLUMNFLAGS_ISFIXEDLENGTH" of 16 at compile time and 16 at run time.But this:[code="sql"]USE EOracle;GOSELECT TOP 1 EXTRACT_DATE FROM EOracle.dbo.clm_edit_wq_clmGO[/code]works just fine. EOracle.dbo.clm_edit_wq_clm is a view that either uses the <linked server>..<schema>.<object> or OPENQUERY method to select data from the linked Oracle server.I have no idea why it suddenly stopped working, why it thinks 16 is a change from 16, or why the default database for the connection matters.Any ideas?

execute procedure/function on linked Oracle server from MS SQL - message “ORA-01008: not all variables bound”

$
0
0
I linked Oracle server on MS SQL. Simple function (and procedure) is created on Oracle - only to return number. I am trying to cal this function(procedure) from MSSQL. When I try to execute function (or procedure)DECLARE @outputpar intEXECUTE ('BEGIN ? := BP_PUSH_F(?); END;', @outputpar OUTPUT) at ERPi receive message:OLE DB provider "OraOLEDB.Oracle" for linked server "ERP" returned message "ORA-01008: not all variables bound".Msg 7215, Level 17, State 1, Line 18 Could not execute statement on remote server 'ERP'.ERP is the name of the linked Oracle server.Function on Oracle server is:create or replace FUNCTION BP_PUSH_F RETURN numeric ASv_id numeric;BEGINv_id := 111;RETURN(v_id);END BP_PUSH_F;and normaly works on Oracle. Can anybody help? Thanks in advance.

XML,CLOB and BLOB datatype

$
0
0
Hi,How to access the XML, CLOB and BLOB Oracle data through linked server from SQL Server 2012?I want to retrieve XML, CLOB and BLOB data from SQL Server 2012 through Oracle Linked server .

Error when selecting top N records from oracle

$
0
0
I am writing a large select statement in MS SQL to select data from linked Oracle 11g server.Started with thise.g.Select top 100 * from table1 left outer join table2 on table1.id = table2.idleft outer join table3 on table1.id = table3.idI get the following error OraOLEDB.Oracle" for linked server "BIS" returned message "ORA-01403: no data foundif i remove one table or if i remove the "top 100" clause it works.since i am building a rather large select with many left outer joins i'd like to limit the data i retrieve.Does anyone know what is causing the top 100 to behave like this and what the workaround is ?

Oracle Linked Server query error - unable to read certain data

$
0
0
We have a problem with a query from a SQL Server 2008R2 - 64bit to an Oracle Linked Server.We use the Oracle 64-bit driver for Windows.When we query a certain table we get the following error:Msg 7347, Level 16, State 1, Line 1 OLE DB provider 'OraOLEDB.Oracle' for linked server 'SERV_VISION2' returned data that does not match expected data length for column '[SERV_VISION2]..[VISION].[INV_M001].CUS_NM'. The (maximum) expected data length is 30, while the returned data length is 24.The problem seems to be the data in the CUS_NM column. In the rows where he gives this error the data is like this:¿¿¿ So like a question mark but upside down. There doesn't seem to be a problem with the length of the column, for one reason he can't handle this data I guess.Could it be a collation problem?Did anyone experience this problem? Anyone a clue how to solve this?Thanks in advance for your answers!Best regards,Koen

Function to Convert Current Date to SQL Sever Date format.

$
0
0
Does anyone have a function to Convert Current Date to SQL Sever Date format?

The OLE DB provider "OraOLDB.Oracle" has not been registered. Linked Server

$
0
0
I was using the Microsoft Provider for Oracle but I determined that it was not reliable.I query using an open query and I get one record. I query Oracle and I get 30 records.The code is listed below.So I created another Linked Server with the OraOLDB.Oracle Provider. When I select providors it is listed. But when I attempt to expand the tables not I get the error:[code="sql"]The OLE DB provider "OraOLDB.Oracle" has not been registered.[/code]Any help would be greatly appreciated.:-)[code="plain"]-- Declare VariablesDECLARE @CurrentDate AS datetime2DECLARE @StrSQL AS NVARCHAR(2000)SET @CurrentDate = getdate() --SET @CurrentDate = '2014-09-04 08:23:06.7930000'-- Print out DatePRINT @CurrentDateSET @StrSQL = N'SELECT *FROM OPENQUERY(LS_RDB_DWH_Oracle_POLICY52,''SELECT count(*) FROM RDB_DWH_POLICY.STG_BATCH_STATUS WHERE SBS_Batch_Date >= TO_DATE(''''' + CAST(@CurrentDate as nvarchar(10)) + ''''',''''YYYY.MM.DD'''') AND SBS_JOB_NAME = ''''RDB Policy''''''' + ')' PRINT @StrSQL EXECUTE sp_executesql @StrSQL;[/code]

SQL Server 2008 SP2 R2 trying to connect ORACLE 11.2.0.3 on UNIX

$
0
0
1. Setup is done, connection test => Pass2. Select statement from SSMS to oracle linkserver errors 7399 or 7330Thank you in advance!

How to install Search.collatorDSO in SQL Server 2008 SP2 R2?

$
0
0
We are trying to connect ORACLE 11.2.0.3 from SQL Server 2008 SP2 R2. We have installed ODAC 64 to get the ORACLE provider, we would like to see if installing Search.collatorDSO makes connection to ORACLE (SQL Server 2012 has Search.collatorDSO and we are able to connect to ORACLE).

Month and Year Difference in oracle.

$
0
0
Think I have Date as SysDate Minus 20101101.I should Trunc SysDate & Given date to YYYYMM Now I shoud do minus given date.EX:- 201409-201011It should only calculate Months not Days.I tried Month_Between but is giving wrong answer.Please help.

SSIS queries runnins slow with Oracle

$
0
0
Hello,I created an SSIS package that extracts data from an Oracle database. While the query runs quickly in Sql Developer and the explain plan appears to be minimal it just seems to hang. I have used ado.net and Oledb data sources and have not seen any improvements. I have noticed that the performance degrades significantly when I have unions in the query. I am wondering if the drivers are attempting to recreate the queries and if that may be other Oracle drivers available that could help improve performance. Do you have any suggestions? Thanks Hector

Any Body Can Explain me Indexes and Types With Exmaple?

$
0
0
Hi Friends, I m learning in oracle myself i can understand the indexes and syntax but i cant understand there types and when to use scenario?Kindly any guide me

Doubts in Sequqnces ?

$
0
0
Hi Friends, i ve the doubts in sequenece1) When i m trying to create sequence likeS-1:create sequence a_sequence min value 1 max value 25 cycle ;Error ll occur.so i chance theS-2: create sequence a_sequence min value 1 max value 25 cycle Nocache;its working fine ,my question what was wrong in my S-1:2) After creating the sequences when i see Select * from User_sequences;i can see the column name of CACHE 20 MB whats is these?whats is the use also ? how it ll be created?3)is it possible to alter the max value size like for example:--------------1) i m created sequences with maxvalue of 50 again i m tried to reduce the max value 45 but it wont accepted why?Thanks Rocky

ORA-00932: inconsistent datatypes: expected FILE got BINARY when Initializing SQL 2k8R2 Publication to Oracle 12c Sub

$
0
0
I'm attempting to setup a Non-SQL subscriber (Oracle 12c) on a SQL 2k8R2 instance. Once I setup the subscriber and the agent attempts to start replicating between the SQL and 12c server, I get the ORA-00932: inconsistent datatypes: expected FILE got BINARY error. The agent will create the MSREPL7 table on the Oracle instance so I know there connection is good and the credentials being used have permission to the Oracle instance. I've tried changing the data type on the MSREPL7 table on the Oracle server to RAW for anything that was BFILE as a shot in the dark (new to Oracle) but that didn't help. Just flipped the expected/got error. Has anyone here run into this issue? What am I missing?SQL Version - Microsoft SQL Server 2008 R2 (SP1) - 10.50.2550.0 (X64) Jun 11 2012 16:41:53 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) Oracle version - -------------------------------------------------------------------------------- ----------Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production 0 PL/SQL Release 12.1.0.1.0 - Production 0 CORE 12.1.0.1.0 Production 0 TNS for 64-bit Windows: Version 12.1.0.1.0 - Production 0 NLSRTL Version 12.1.0.1.0 - Production

Connecting to Oracle 9 through SSIS (vs 2012)

$
0
0
I have to connect to an instance of oracle 9 on an old server.I am running windows 7, vs2012.I have had no luck with this despite fighting it for over a day now. Id appreciate any help that you guys have to offer:Some issues:-I cant find just the oracle client install files online. All i can find is the full blown versions of oracle.-oledb connection not appearing despite oledb connector being installed ( using udl file to test).Appreciate any help.Thanks!

Oracle Connector doesn't work

$
0
0
I've been asked to edit an existing SSIS job importing Data from Oracle 11g to SQL 2012. When I try to connect to the Oracle Connection Manager, I get ORA-12154 (which I read is a very generic connection error) TNS:could not resolve the connect identifier specified.The Oracle people here tell me my TNS file is correct, but they don't know enough about SSIS to help me beyond that. I can also make a successful connection to Orcacle in ODBC. They suggesting I uninstall & reinstall Oracle client, which I've done with their help. Now I'm back at the same place - same error!What next?

Query with linked server works until where clause added

$
0
0
I have a query:select a.* b.descriptionfrom sqlservertable a left outer join oracleparttable b on a.partid = b.partid;This runs with no problems but when I add a where clause it breaks.select a.* b.descriptionfrom sqlservertable a left outer join oracleparttable b on a.partid = b.partidwhere a.date = '2014-12-18';Error Message: OLE DB provider "OraOLEDB.Oracle" for linked server "XXXORACLE" returned message "ORA-01403: no data found".Msg 7346, Level 16, State 2, Line 1Cannot get the data of the row from the OLE DB provider "OraOLEDB.Oracle" for linked server "XXXORACLE". If I run the query without the linked server but include the where clause it works.select *from sqlservertablewhere date = '2014-12-18';Any ideas what might be causing my problem?
Viewing all 214 articles
Browse latest View live