I have problem: I have 1 sql server already setup SQL Server 2012 Express and 1 Oracle Database server 10g. Now i want to insert data from SQL server to Oracle database through link server.
Some step i already make: 1. Setup oracle database 10g and configure listener (Finished) 2. Setup Sql server 2012 express on Windows 7 (Finished) 3. Setup ODTwithODAC1020221 on PC already setup SQL server (Finished) 4. Make Linkserver from SQL server to Oracle database (Finished), and can select data from Oracle Database on SQL server through Linkserver.
However when i insert data from SQl server to Oracle Server not success.
select * from OPENQUERY (QVHKTEST, 'SELECT * FROM QVSYSTEM')
After i run above script, result is OK With: "QVHKTEST" is alias of Link server from SQL to Oracle server : "QVSYSTEM" is a table on Oracle database, that table we want to get through Linkserver on SQL server
Both Server Database contain same name table is "QVSYSTEM" ----------- INSERT OPENQUERY (QVHKTEST, 'SELECT BODY_NO, MERCHANDISE, MODEL_NAME, LINE_NAME, DATE_ENTRY FROM QVSYSTEM') values('VNF4619829','3227B002CA','L1068','01','2012/09/26 03:18:11');
If i run script above directly in SQL Window query can insert OK. This is code in trigger at table on SQL server:
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author:<Author Name: Phuong Do Minh > -- Create date: <Create Date: 10/12/2012> -- Description:<Description: After data insert into table qvsystem on SQL server -- This trigger will fire and insert that data into table qvsystem [code].......
But when i make trigger after insert on table in SQL Server to insert data From SQL server to Oracle server, however not success and SQL server raise error below:
OLE DB provider "OraOLEDB.Oracle" for linked server "QVHKTEST" returned message "New transaction cannot enlist in the specified transaction coordinator. ". Msg 7391, Level 16, State 2, Procedure Insert_data, Line 16
The operation could not be performed because OLE DB provider "OraOLEDB.Oracle" for linked server "QVHKTEST" was unable to begin a distributed transaction.
I need to split a column into multiple columns. The data in my column is separated by a Comma (,). But the data is dynamic and I could have any number of data separated by (,).
Quote:FOR Ex: If COL1 contains CRITERIA_ITEM_TYPE_ID, CRITERIA_ITEM_TYPE, DESCRIPTION, ITEM_DATA_TYPE
RESULT: should be 4 columns contains the values CRITERIA_ITEM_TYPE_ID and CRITERIA_ITEM_TYPE and DESCRIPTION and ITEM_DATA_TYPE
Is COL1 contains CRITERIA_ITEM_TYPE_ID, CRITERIA_ITEM_TYPE, DESCRIPTION
RESULT: should be 3 columns contains the values CRITERIA_ITEM_TYPE_ID and CRITERIA_ITEM_TYPE and DESCRIPTION
I am unable to insert and even display euro symbol from server as well as windows client.
Following are the details of my database server
SQL> select * from nls_database_parameters; PARAMETER VALUE ------------------------------ ---------------------------------------- NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CURRENCY $ NLS_ISO_CURRENCY AMERICA NLS_NUMERIC_CHARACTERS ., NLS_CHARACTERSET WE8MSWIN1252
[code]....
1) When I try to insert € from Db server (using putty) using Alt+0128 it does not print anything (nothing gets typed on the screen). Not even junk characters Also following query does not print anything
SQL> select chr(128) from dual; C -
2) while I set NLS_LANG on client and try to insert €, Alt+0128 produces a question mark symbol And following query displays junk character
SQL> select chr(128) from dual;
C - Ç
3) Regardless when I inserted couple of rows and tried UNISTR following was the result
Insert multiple record in table. I have a table of customers . It has column cus_name, cus_fruit, cus_date, cus_qty.
Select * from customers; cus_name cus_fruit cus_date cus_qty Maria Anders Apple 18-July-2013 10 Maria Anders Apricot 18-July-2013 20 Maria Anders Asparagus 18-July-2013 100 Maria Anders Avocado 18-July-2013 5 Ana Trujillo Apple 18-July-2013 10 Ana Trujillo Apricot 18-July-2013 20 Ana Trujillo Asparagus 18-July-2013 100 Ana Trujillo Avocado 18-July-2013 5
how I can insert record in one time in table. All table data same only change the cus_name.
Thomas Hardy Apple 18-July-2013 10 Thomas Hardy Apricot 18-July-2013 20 Thomas Hardy Asparagus 18-July-2013 100 Thomas Hardy Avocado 18-July-2013 5
After Insert record result. Select * from customers;
cus_name cus_fruit cus_date cus_qty Maria Anders Apple 18-July-2013 10 Maria Anders Apricot 18-July-2013 20 Maria Anders Asparagus 18-July-2013 100 Maria Anders Avocado 18-July-2013 5 Ana Trujillo Apple 18-July-2013 10 Ana Trujillo Apricot 18-July-2013 20 Ana Trujillo Asparagus 18-July-2013 100 Ana Trujillo Avocado 18-July-2013 5 Thomas Hardy Apple 18-July-2013 10 Thomas Hardy Apricot 18-July-2013 20 Thomas Hardy Asparagus 18-July-2013 100 Thomas Hardy Avocado 18-July-2013 5
I have a temp table and want to insert that data into 2 tables. In both of my tables i have a sequence column but in my second table its a foreign key to the main table
up_query="INSERT INTO AFFILIATE (FNAME,LNAME,EMAIL,PHONE,ORG,ADDRESS1,ADDRESS2,COUNTY_ID,AFF_ID) Select a.FNAME, a.LNAME,a.EMAIL,a.PHONE, a.ORG, a.ADDRESS1, a.ADDRESS2,C.COUNTY_ID,'AF'||aff_seq.nextval FROM temp_aff A LEFT OUTER JOIN COUNTY C ON UPPER(A.COUNTY)=C.CNAME"; $up_query2= "INSERT INTO TEST4 (DEPT_ID,CAMP_ID,AFF_ID, PASSWD) SELECT D.DEPT_ID,C.CAMP_ID,aff_seq.currval,'Zq'||dbms_random.string('A',4)||'$8' from dual,TEMP_AFF A left outer join DEPT D ON (UPPER(A.DEPT)=UPPER(D.DNAME)) left outer join CAMPUS C ON (UPPER(A.CAMPUS)=UPPER(C.CPNAME))";
However in my test4 table its inserting the aff_seq.currval for all records. Its not incrementing as in the affiliate table.
I have some problem when i try to export data from a table which contains a nested table, using toad.
When toad generate the file, in the column corresponding to the nested table, toad just write a (DATASET) instead of the data contained in the nested table
Here is an example: INSERT INTO SSD_REV_S ( REV_ID, REV_TAB, REV_TS, REV_USER, REV_LOG ) VALUES ( TO_Date( '07/30/2007 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), (DATASET), TO_TIMESTAMP('4/3/2009 11:20:51.000000 AM','fmMMfm/fmDDfm/YYYY fmHH12fm:MI:SS.FF AM'), 'operator', 'Add EVENT');
REV_TAB is my nested table
way to export data from a table which contain a nested table, as a list of insert statement, so i can move the data to a different database schema? I can also use different client tool.
When I delete a table in Toad it takes only a one or two second until I receive success message.
But with SQL*Plus on UNIX I canceled the operation after 5 minutes:
$ sqlplus tmo323/IXQMISX8ttr@PROD
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Nov 28 11:54:22 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> delete table_5 2 ; ^Cdelete table_5 * ERROR at line 1: ORA-01013: user requested cancel of current operation
want to load data from an excel file to a database table in Oracle. I am using Oracle 11 and the excel file has 3 columns as compared to 5 columns in the destination table. I want to generate sequential nos also for the table.
1) A reverse engineering tool that I can point to an Oracle schema and get a "baseline" script to re-create that schema from scratch, with decently formatted DDL files (1 per object) neatly organized in a directory tree (by object type) and called in the correct order. Icing on the cake would be an option to pass the tool a list of tables containing static data and get DMLs to populate (insert) those tables as part of the script.
2) a diff tool that I can point to a pair of Oracle instances (source and target) containing a given schema and get a "delta" script to alter the target schema so that it becomes identical to the source schema. If data loss occurs on the target instance (i.e. drop a column) I would like to find a warning comment inserted in the script (e.g. "-- Attention: data migration DML needed here?"). Icing on the cake would be an option to pass the tool a list of tables containing static data and get DMLs to update (delete, update and insert) the data in the target tables to become identical to the contents in the source tables *without* deleting and re-inserting all rows (or dropping, recreating and repopulating the table).
3) I would like the above two tools (that, as you will have recognized, are basic to putting your database design under version control) to be open-source, with a command-line interface and a vibrant community backing them.
The problem is that this connection errors when I try to connect using my SQuirreL client. My developers want to connecting using the SID or the SERVICE_NAME and by using the "New Method" syntax, not the "Old Method" syntax. According to the documentation the "New Method" syntax works with the SERVICE_NAME or the SID. The "Old Method" only works with the SID.
# Host name is vmwwin7634.na.SAS.com # SID is sting2 # SERVICE_NAME is sting2.na.sas.com
PROBLEM using SID errors ==> jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2 THIS WORKS using SERVICE_NAME ==> jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2.na.sas.com
I am using SQuirreL Client version 3.4.0
# Here is the tnsnames.ora entry on the server. STING2 = (DESCRIPTION =
[code]...
# In this documentation it says, "On new syntax SERVICE may be a oracle service name or a SID."You can find this on the orafax wiki under JDBC#Thin_driver.
# I was able to connect with the "old method" using the SID only, SERVICE_NAME errors jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521:sting2.na.sas.com (SQuirreL client error, "Unexpected Error occurred attempting to open an SQL connection.") jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521:sting2 (this works)
# "New Method" jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2.na.sas.com (this works) jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2 (this errors) (SQuirreL client error, "Unexpected Error occurred attempting to open an SQL connection.")
I have new virtual UNIX machine and I installed oracle client on /usr/lib/oracle. Also I have a oracle database and I am able to connect to this database from my desktop sql developer.
So now I am trying to connect from new UNIX machine. Where I created tnsnames.ora file under /usr/lib/oracle/network/admin and before connecting did export the following
ORA-12545: Connect failed because target host or object does not exist. Not sure what I missed here. using same tns file I am able to connect from sql developer on windows.