Loading a SQL Server table
Hi allI develop a right source - target interface table of sql server in a sql server table. When executing the interface, I get an error - message
"Cannot insert an explicit value for identity in the 'xxx' table column when IDENTITY_INSERT is set to OFF."
After investigation, it appears that I need to run-
SET IDENTITY_INSERT ON of xxx
GO
This performance is specific session, that is to say, I have to run this statement every time ODI inserts into the target table. Is it possible that I can have the tool run this statement?
TIA
MN
Version of the ODI - 11 g
Source - SQL Server 2008 R2
Target - SQL Server 2008 R2
Not exactly the IKM XML, but change in the designer required used IKM.
for security reason provide a duplication of your IKM (right-click - duplicate) and to make the necessary changes to this copy, so that, even if something goes wrong. you will not alter the original.
hope that I have answered your question.
Tags: Business Intelligence
Similar Questions
-
Question: insertion of several lines in the MS Sql Server table using the DB adapter
Hi all
I managed to insert a single row in a table of MS SQL Server via the adapter DB to my process BPEL, but when I tried to insert in mutiple lines in the same table of MS SQL server, I encounter the error below.
I use a DB SQL XA connection to connect to the server.
Kindly help me to solve the problem. Thanks in advance.
Error:
" < bpelFault > < faultType > 0 < / faultType > < remoteFault xmlns =" http://schemas.Oracle.com/BPEL/extension "> < a name ="summary"part > < summary > exemption is is produced when the binding was used." Exception occurred during invocation of the JCA binding: "JCA binding run 'merge' reference operations have to: DBWriteInteractionSpec Execute Failed Exception." the merger failed. The descriptor name: [LoadCmpAggSpendStage.SapTable]. Caused by com.microsoft.sqlserver.jdbc.SQLServerException: incorrect syntax near ')'... Check the logs for the record output full DBAdapter before this exception. This exception is considered as reproducible, probably due to a communication failure. To be classified as not reproducible rather add property nonRetriableErrorCodes with the '102' value in the deployment descriptor (i.e. weblogic - RA.Xml). Auto retry a reproducible fault set composite.xml for this invoke these properties: jca.retry.interval, jca.retry.count and jca.retry.backoff. All properties are integers. ". The called JCA adapter threw an exception of resource. Please examine the error message above carefully to determine a resolution. < /Summary. (> < / piece > < part name = "detail" > < detail syntax > incorrect near ')'. < / details > < / piece > < part name = "code" > < code > 102 < / code > < / piece > < / remoteFault > < / bpelFault >
Kind regards
Balaji Rahmani
It seems that in this case is called merge operation. If existing records (check primary key) are not there then it will be inserted on the other update. Check the syntax of the query that is created. It looks like she may have a supplement "). If you want to only insert then call insert operation and not merge.
-
ORA-28500 and ORA-02063 when querying sql server tables.
Hello
I am getting below error when querying (also with oracle reports) talbes of MS SQL 2008 database who have more lines. There is no problem with tables with less number of lines.
ORA-28500: connection between ORACLE and a non-Oracle system has sent this message:
ORA-02063: preceding line from SQLSERVER
When I asked "select *"Areas"@sqlserver;", it is retriving 195 lines and then the display above error.ยป This table contains 10716 lines.
Here are the details of our environment:
Database Oracle 11 G RAC (2 knots) on RHEL 5 64 Bit, MS SQL 2008
ODBC. INI
[oracle@proddb1 ~] $ cat /etc/odbc.ini
[ODBC data sources]
MSSQL = MS SQL Server
[mssql]
Driver=/opt/Microsoft/SQLNCLI/lib64/libsqlncli-11.0.so.1790.0
Database = Ksa_Fakieh_SFA
LogonID = OracleUser
Password=0r@cle999
Server = SJSQLV01.fakiehgroup.com
QuotedId = YES
AnsiNPW = YES
[ODBC]
IANAAppCodePage = 4
Trace = 0
UseCursorLib = 0
UseCursorLib = 0
INIT FILE:
[oracle@proddb1 ~] $ cat $ORACLE_HOME/hs/admin/initDG4ODBC.ora
# This is an example of initialization file of the agent that contains the HS settings
# necessary for the database to ODBC gateway
#
# HS init parameters
#
HS_FDS_CONNECT_INFO = mssql
HS_FDS_TRACE_LEVEL = off
HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so
HS_FDS_SUPPORT_STATISTICS = FALSE
HS_LANGUAGE = AMERICAN_AMERICA. AR8MSWIN1256
HS_NLS_NCHAR = UCS2
#
# ODBC specific environment variables
#
Set ODBCINI=/etc/odbc.ini
#
Listener.ora:
# ###############################################################
#
TRACE_FILE_LISTENER_PRODDB1 = fakieh1
LISTEN_DG4ODBC =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP (PORT = 1511))(HOST = proddb1.fakiehgroup.com))
)
)
SID_LIST_LISTEN_DG4ODBC =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = u01/oracle/fakieh/db/tech_st/11.1.0) (SID_NAME = DG4ODBC)
(ENV="LD_LIBRARY_PATH=/usr/lib64:/u01/oracle/fakieh/db/tech_st/11.1.0/lib')
(PROGRAM = dg4odbc)
)
)
#
# Definition of RAC database listener
#
LISTENER_PRODDB1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADRESSE = (PROTOCOL = TCP) (HOST = proddb1 - vip.fakiehgroup.com) (PORT = 1521)(IP = FIRST)))
(ADDRESS_LIST =
(ADRESSE = (PROTOCOL = TCP) (HOST = proddb1) (PORT = 1521)(IP = FIRST)))
)
)
SID_LIST_LISTENER_PRODDB1 =
(SID_LIST =
(SID_DESC = (ORACLE_HOME = /u01/oracle/fakieh/db/tech_st/11.1.0)(SID_NAME = fakieh1))
)
STARTUP_WAIT_TIME_LISTENER_PRODDB1 = 0
CONNECT_TIMEOUT_LISTENER_PRODDB1 = 10
TRACE_LEVEL_LISTENER_PRODDB1 = OFF
LOG_DIRECTORY_LISTENER_PRODDB1 = /u01/oracle/fakieh/db/tech_st/11.1.0/network/admin
LOG_FILE_LISTENER_PRODDB1 = fakieh1
TRACE_DIRECTORY_LISTENER_PRODDB1 = /u01/oracle/fakieh/db/tech_st/11.1.0/network/admin
TRACE_FILE_LISTENER_PRODDB1 = fakieh1
ADMIN_RESTRICTIONS_LISTENER_PRODDB1 = WE
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER_PRODDB1 = OFF
IFile=/U01/Oracle/Fakieh/DB/tech_st/11.1.0/Network/admin/fakieh1_proddb1/listener_ifile.ora
Thank you
Mohammed.Mohammed,
Without seeing the tracing information, it is difficult to say why this problem occurs.
However, could you add the following to the file initDG4ODBC.ora gateway -.HS_RPC_FETCH_REBLOCKING = OFF
HS_FDS_FETCH_ROWS = 1and try to select it again again SLQPLUS session and see if the same problem occurs?
Kind regards
Mike -
Oracle on the SQL Server tables dblinked query error ORA-00904
Hello
I created a dblink to a SQL from Oracle database using generic connectivity.
The following query returns the error ORA-00904 invalid identifier in the (tblEmp.Empno) WHERE clause
SELECT 'EmpNo', "EmpName", "DeptName".
OF tblEmp@sqlserver.
tblDept@sqlserver
WHERE tblDept.DeptNo = tblEmp.Empno
I had to include the column names between double quotes because of the case review of the columns, but I can't do the
same thing for the WHERE clause.
(1) so how can I fix this error?
(2) also how can I include the Deptno column with the table alias in the columns list?
(Deptno is ambiguous in the Emp and Dept tables)
Kind regards
SamLooks like you have case-sensitive column names, try this
SELECT "EmpNo","EmpName", "DeptName" FROM tblEmp@sqlserver e, tblDept@sqlserver d WHERE d."DeptNo" = e."Empno" --<--- are you sure this is the correct join condition
What should we not
WHERE d."DeptNo" = e."DeptNo"
Published by: Alex Nuijten on September 22, 2009 13:28
-
Load the BLOB column in Oracle to an Image column in MS SQL Server
Hello
I have an Oracle table as the source and a MS SQL Server table as a target. A blob column (4000) in the source is mapped to a column (2147483647) Image in the target.
Execution will give me the error message "* java.lang.NumberFormatException: for the input string:"4294967295"*"when it comes to step 'load the data into the staging of table' '.
The LKM that I use is LKM SQL for MSSQL.
I also tried LKM SQL for MSSQL (BULK), LKM SQL for SQL (jython), LKM SQL for SQL. None of them are useful.
Impossible, someone tell me how to fix this 4294967295? Thank you very muchHi Yang,
Oracle recommends the setting of the 'get_lob_precision' false flag to avoid this error.
For this,.
1. make a backup of your ODIPARAM. BAT file.
2. open ODIPARAM. BAT file and add the following line.Set ODI_ADDITIONAL_JAVA_OPTIONS = % ODI_ADDITIONAL_JAVA_OPTIONS % ""-Doracledatabasemetadata.get_lob_precision = false ' "
Next to
Set ODI_ADDITIONAL_JAVA_OPTIONS = ""-Djava.security.policy = server.policy ' "
PS:If, the parameter is defined, the result "ODI_ADDITIONAL_JAVA_OPTIONS" ("SNP_ADDITIONAL_JAVA_OPTIONS" or "SNP_JAVA_OPTIONS") should be similar to the foregoing.
Restart the ODI and try.
Thank you
G -
Migration from SQL Server to Oracle database
I have 2 questions:
1. we intend to convert our sql server databases oracle OLTP databases. I tried to use SQL Developer to migrate a database of small sql server to oracle (size 5 GB) database. It was fine. When I tried to migrate to a different database (size 90G), it takes too much time. The problem with sql developer is I can not pick and choose tables. 250 paintings, I need to migrate tables abt 80 (the size will be abt 50 G). What is everyone can share their experiences, as appropriate, converting databases of size average sql server for oracle databases? other options?
2. I intend to convert the sql server ddl to oracle ddl. I have tested bcp out and use sql loader to import the data. Right now I am manually creating the oracle tables sql server tables. I use http://download.oracle.com/docs/cd/E11882_01/gateways.112/e12069/apa.htm#BABCIIDI to convert the code. Are there other ways better to convert sql DDL DDL Oracle Server?
Thanks in advanceDDLS must be converted manually. Oracle is not SQL-Server.
If for example, you have the option of partitioning, you should consider using the partitioning index and when it is possible. Not all tables must be hash tables. Do postpone you creation of segment or not? What type of tablespace? Set yourself free percentages and allows you to manage when the data block is on the free list and how much is reserved in the block of data to update rows in this block?
There are many considerations to be taken with regard to the physical database design.
Using BCP and SQL * Loader sound good. SQL * Loader is fast and scalable - use it to load up to 3.6 million lines every 60 seconds. Direct and parallel charges will give the best performance in this regard (assuming that the underlying table structure and use supports this approach).
-
Problem to install SQL Server 2005
Hi friends,
I have Toshiba computer and I had a problem installing SQL Server 2005 when we do the connectivity to the server, it is not work properly.As much I know Toshiba doesn t load of SQL Server.
By the way: Toshiba has a lot of computers. One you have?
-
Write in MS SQL server forms 6i
For the needs of the company. We must write in MS SQL server forms 6i:
We have the system of attendance in time using MS SQL Server. We treat data from oracle and data needs to be inserted directly to the MS SQL Server tables.
Forms 6i allows us to treat the oracle data.
It is desirable that one could help us solve this problem.
Kind regards
Shareef
Thanks to you all.
I found this post useful:
ORA-28545: error diagnosed by Net8 when connecting to an URGENT agent error
which includes the following ORACLE notes:
Note.561033.1 how to Setup DG4ODBC on 64 bit OS Unix (Linux, Solaris, AIX, HP - UX)
Note.466228.1 how DG4ODBC Setup on Linux x 86 32 bit
Note.466225.1 How to Setup DG4ODBC (database gateway for ODBC Oracle) on 32-bit Windows
For our case, we think in a workaround.
Once again. Thanks to you all. Your efforts are appreciated.
-
Oracle <>- MS SQL server, problem with DATE
HS current options are:
HS_FDS_TRACE_LEVEL = 255
HS_FDS_SHAREABLE_NAME=/usr/lib64/libodbc.so
HS_FDS_FETCH_ROWS = 1
HS_FDS_SQLLEN_INTERPRETATION = 32
The following image contains 2 screenshots.
http://maslovd.no-IP.org/public/doc/date_problem.PNG
1. selection of table of MS SQL server.
2 selection in Oracle DB link.
Any suggestions?
I asked here, that is why the DateForm column are returned as data type-(9)
SQL_WVARCHAR).
Could you please post the SQL Server table definition?
What's the FreeTDS version and on which platform did you configure DG4ODBC?
- Klaus
-
Data migration from Oracle to SQL Server
Hello
I have the Oracle database in one or several table, I also blob data, i.e. images are stored, now I want to move that data to the sql server database, which is the best way to do this?
I would like to test for a migration of the table that contains the image data in the Oracle database and invade the SQL Server table.
How to test for an Oracle table data to SQL Server migration?
But the first thing I want to confirm is that if the Image from Oracle DB to SQL Server DB data are possible? is there something must be supported during the migration?
Thanks in advance.
Kind regards
Vishal
Published by: 968331 on October 31, 2012 02:31I think that it is supported. The equivalent data type in sql server is IMAGE/varbinary (max)
See the bottom of the article for the mapping of data types:
http://weblogs.sqlteam.com/jamesw/archive/2010/07/28/datatypes-translation-between-Oracle-and-SQL-Server-part-1.aspx
-
Sort of the differences between Oracle and SQL Server
Hi all
This question is linked by both Oracle and SQL Server
I have a requirement where I want to compare 2 tables line by line. A table is in Oracle and other table in SQL Server
And suppose that both tables do not have a primary key. Now when I sort records by using the order by clause for a column, then-
Rows with null values in that column of Oracle are placed in the background.
When that rows with null values in the same column in SQL Server are placed right at the top.
How can I make one of them to behave like any other.
My only goal is to have same order of lines in Oracle and SQL Server tables so that I can compare line by line.YADQ: Yet another Doc Question
Can you please avoid them?
Take your SQL reference manual, search for the ORDER BY clause and notice that it has
NULL FIRST or LAST values NULL values.------------
Sybrand Bakker
Senior Oracle DBA -
Problem with SQL Server 2008 migration
Hello
I am having trouble capturing SQL Server (Express 2008) tables/views/data for Migration to Oracle 11. I was able to connect to the source (SQL Server 2008 Express) and databases of destination (Oracle 11) on the same server (Windows Vista 32 bit). However, when I select objects SQl server (tables or views) and click on "Capture Microsoft SQL Server" or "Table of Capture" etc, nothing happens... No message and the tool is just sitting there. The models 'captured' is empty... Could someone please help? Where can I find the error logs? I followed the instructions as described in the help text and also found that some other people were able to run on SQL Server. I wonder what might be different about my situation.
Thank you!
BKHello
SQL Developer Migration Workbench does not yet support the migration to SQL Server 2008.
See http://www.oracle.com/technology/tech/migration/workbench/pdf/migrationdatasheet_15.pdf
This data sheet lists only the versions of SQL Server 7.0, 2000 and 2005.
Maybe the next Metalink note allows more:
Note 393760.1: how to migrate databases non-Oracle, for which an Option of Migration Workbench is not available
Kind regards
Wolfgang -
Problem loading table in SQL server
Hello
I'm trying to load a table in SQL server from another instance of SQL server.
I defined the physical and and stores of data, logical and reverse engineered models to retrieve tables.
The target table has been created manually...
If I try to launch the interface I get the fololowing error
ODI-1227: SrcSet0 (load) task fails on the source of connection MICROSOFT_SQL_SERVER data WAREHOUSE.
Caused by: java.sql.SQLException: incorrect syntax [FMWGEN] [SQLServer JDBC Driver] [SQL Server] about ' < '.
at weblogic.jdbc.sqlserverbase.ddb_.b (unknown Source)
at weblogic.jdbc.sqlserverbase.ddb_.a (unknown Source)
at weblogic.jdbc.sqlserverbase.ddb9.b (unknown Source)
at weblogic.jdbc.sqlserverbase.ddb9.a (unknown Source)
at weblogic.jdbc.sqlserver.tds.ddr.v (unknown Source)
at weblogic.jdbc.sqlserver.tds.ddr.a (unknown Source)
at weblogic.jdbc.sqlserver.tds.ddq.a (unknown Source)
at weblogic.jdbc.sqlserver.tds.ddr.a (unknown Source)
at weblogic.jdbc.sqlserver.ddj.m (unknown Source)
at weblogic.jdbc.sqlserverbase.ddel.e (unknown Source)
at weblogic.jdbc.sqlserverbase.ddel.a (unknown Source)
at weblogic.jdbc.sqlserverbase.ddde.a (unknown Source)
at weblogic.jdbc.sqlserverbase.ddel.v (unknown Source)
at weblogic.jdbc.sqlserverbase.ddel.r (unknown Source)
at weblogic.jdbc.sqlserverbase.ddde.execute (unknown Source)
at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:662)
He tries to run the following SQl and I don't know why she strives to drop and create a view in the source system? The interface that I do turn above has only one source of target mapping...
Delete the < Undefined > view. SQLDATAWH_DATAWAREHOUSEAccountDim
Indications will be useful...
Thanks in advance...Whirlpool says:
Can you please let me know the name of the lkm and ikm which must be selected for SQL SERVER to SQL SERVER.You can see this
http://docs.Oracle.com/CD/E23943_01/integrate.1111/e12644/ms_sqlserver.htm#BGBJBGCC -
Hey
I had a situation in the present case, I flat file and I want to load it into sql server 2012.
In the flatfile I have 2 data types of columns date and I chose LKM FILE TO SQL, when I try to run it fails to create the work table.
When I c the code in this step it shows
create the table dev.dbo.C$ _0TES
(
ASN_BOL_NBR NUMERIC (7,0) NULL,
ASN_CARTON NUMERIC (20.0) NULL,
ASN_SHORT_SKU NUMERIC (7,0) NULL,
ASN_SKU_CHECK_DIGIT NUMERIC (1.0) NULL,
ASN_DESC VARCHAR (25) NULL,
ASN_QUANTITY NUMERIC (7,0) NULL,
ASN_LEAVE_DATE DATETIME2 (27) NULL,
ASN_ARRIVAL_DATE DATETIME2 (27) NULL,
ASN_MULT_PACK VARCHAR (1) NULL,
ASN_MULT_SKU VARCHAR (1) NULL
)
MSG 1002, level 15, State 1, line 9
Line 9: Specified scale 27 is not valid.
DATETIME2 (27) the table of creative work is a failure because of the type of data
ASN_LEAVE_DATE DATETIME2 (27)
ASN_ARRIVAL_DATE DATETIME2 (27)
Is there a way to avoid a DATETIME2 (27)?
Thank you!
Yes, I would certainly put the data on the source of the string type.
Then in your mapping/interface, you can use the CONVERT function.
For example, CONVERT (DATETIME, YOUR.) ASN_LEAVE_DATE, 101)
In this example, 101 as a style means that your file contains a date in the format dd/mm/yyyy.
See CAST and CONVERT (Transact-SQL) to find out what style you apply.
Kind regards
JeromeFr
-
Loading data from Oracle to MS SQL SERVER
Hello
Source: Oracle
Target: MS SQL
ODI:11 g
I want to create an interface that loads the data from the source table in Oracle in the target table in MS SQL Server. Can any body tell me what LKM, IKM and CKM I use for the same.
Any help will be appreciated.
I thank you,
ShrinivasHi gisele, you can follow below KMs
1 LKM SQL for SQL
2 CKM ORACLE
3 IKM SQL Incremntal update (Insert and update) / IKM SQL command APpend (insert only)
It will be useful.
Thank you
Maybe you are looking for
-
Can you still find the 'theatre' on a song?
I remember back when iTunes was relatively young (around 2006) allowing you to be able to read how 'theatre', a song in your iTunes library and you may even sort the pieces by the amount of plays. In addition to the playlist 'Top 25 most played' (whi
-
Receiving the message 'Firefox close unexpectedly', but can not reopen.
Get the message "Firefox completely unexpected". I click on "reopening", but it does not reopen. Get the same message every time. Tried to delete and redownloading, but the same thing. I have a Mac. I used Firefox when he leaves suddenly. Now it just
-
Power management: screen never turns off when it should
I have two satellites, and two of them, the screen turns off ever after the scheduled time. They did before. Any help here?
-
Microsoft SQL Server 2005 Express Edition - Configuration has failed.
Time: 06/10/2010 13:16:39.639 Number of KB: KB954606 Computer: ComputerName OS version: Professional (Build 7600) Language package: 1033 (ENU) Platform: x 86 Package SP level: 2 Package Version: 3073 Specified command line parameters: Cluster install
-
How to manage the HttpConnection to do:
Hello Well, my problem is that I am a httpconnection by blackberry to a tomcat server apache where I have a servlet that establish a connection to a database, I want the blackberry to show me if the connection is successful or not. I have the blackbe