Query using HS returns all fields of MySQL to ORACLE
HelloUsing HS to connect from oracle 10204 to MySql 5
Run the following statement using Oracle dblink:
SELECT * From "Custom_XDR"@MySql
After the level setting ON a trace on the server getway, the trace file indicates all the varchar column are ignored!ORACLE GENERIC GATEWAY Log File Started at 2011-02-08T11:17:42
hoadtab(26); Entered.
Table 1 - Custom_XDR
Skipped field h323_conf_id, unrecognized datatype.
Skipped field user_agent1, unrecognized datatype.
Skipped field user_agent2, unrecognized datatype.
Skipped field ip1, unrecognized datatype.
Skipped field ip2, unrecognized datatype.
Warning: index h323 is ignored.
hoapars(15); Entered.
Sql Text is:
SELECT A1."id",A1."bill_time",A1."i_env",A1."last_modified1",A1."last_modified2" FROM "Custom_XDR" A1
The strucher of the table in Mysql is as follows:SQL> desc Custom_XDR
+----------------+-------------------------+-----+----+---------------------+-----------------+
| Field | Type | Null| Key| Default | Extra |
+----------------+-------------------------+-----+----+---------------------+-----------------+
| id | int(10) unsigned | NO | PRI| | auto_increment |
| h323_conf_id | varchar(36) | NO | MUL| | |
| bill_time | datetime | NO | | | |
| i_env | tinyint(1) unsigned | NO | | | |
| user_agent1 | varchar(50) | NO | | | |
| user_agent2 | varchar(50) | YES | | | |
| ip1 | varchar(15) | NO | | | |
| ip2 | varchar(15) | YES | | | |
| last_modified1 | timestamp | NO | | 0000-00-00 00:00:00 | |
| last_modified2 | timestamp | NO | | 0000-00-00 00:00:00 | |
+----------------+-------------------------+-----+----+---------------------+-----------------+
Please advice.Thank you
As Mike points out in its update the sql.log you downloaded on demand service displays the type of data-9 which is the sql_wvarchar which is not supported.
Take a look at the manual of hsodbc:
http://download.Oracle.com/docs/CD/B19306_01/server.102/b14232/APB.htm#sthref509
Oracle® database
Heterogeneous Connectivity Administrator's Guide
10g Release 2 (10.2)
B14232-01
B.1 mapping Types of data ANSI to Oracle via an ODBC Interface Data Types
=>, this data type is missing.
DG4ODBC, the product of the follow-up HSODBC support it. HSODBC was desupported since 2008 and no more features will be added to it. So you might think of the update to the supported version of DG4ODBC which can be used with the Oracle version 10.2.0.4/10.2.0.5 and 11g database.
Tags: Database
Similar Questions
-
What is used to reset all fields?
Hello guys!
I have 2 page. On page 1, there is a single button. When someone when this button is clicked, I want to reset all fields on page 2, is it possible? What function?
You have so much!
Yes, you use the same command and pass the fields or subforms that you want to have reset as a comma-separated string. So if you want to reset TextField1, TextField2 and subform1, you would use the command:
xfa.host.resetData ("TextField1", "TextField2", "subform1")
If you do not pass anything the entire form is reset.
Paul
-
MySQL to Oracle using LKM SQL to Oracle, poor performance
Hello
I'm on the underside of technology.
I'm try to use ODI to import data from MySQL to Oracle using the LKM SQL to Oracle, it works well for small amounts of documents but once volumes go higher it performs very badly.
I'm replacing an integration of existing HS dblink to 44 seconds and ODI is 9 minutes.
The MySQL and Oracle DB are on the same host with an autonomous ODI agent on the same host.
MySQL 5.6.21
Oracle 11.2.0.4
Oracle Data Integrator 12.1.3
I may try a different approach to dumping the MySQL table to a flat file and import from external table or sqlldr but y at - it a way to make the LKM SQL for Oracle perform better?
Hello
This problem has been resolved.
I was setting the table sizes in batches on the data source server, after you set the values on the target data server is it now works as expected.
Using a value of 5,000 for the two tables has reduced the operating time of 9 minutes to about 40 seconds.
-
Golden Gate 11 g replicate from MySQL to Oracle
Golden Gate 11 g for MySQL can read mysql binlog. I have a question, can I use GG11g for MySQL to replicate from MySQL to Oracle?
Thank and regardOK, here's the official word from Oracle on it.
Oracle GoldenGate now supports MySQL 5.1.15 and later capture and oracle can be a target. Therefore, if you use MySQL 5.1.15 or later, you can indeed use Golden Gate to replicate from MySQL to Oracle when you use GoldenGate 11 g.
-
create table ab (a number, b varchar2 (20));
Insert into ab
Select rownum, rownum. "" sample "
of the double
connect by level < = 10
create table bc (a number, b varchar2 (20));
Insert into BC.
Select rownum + 1, rownum + 1 | "" sample "
of the double
connect by level < = 10
Select * AB
where b in (select b BC where b = "2sample")
This query will return me 1 row, but there are cases where the value of the parameter b is null
and that it should return all rows in the table
as
Select * AB
where b in (select b BC where b = "2sample")
which return specific values, but I want to change in a way when the inner query returns nothing then outer query should return all the lines and works as
Select * AB;
Is it possible to put in a single query
Hello
You seem to ask for different things. You want all the lines AB when
- The parameter ("2sample' in the example) is NULL, or when
- There is no corresponding row in the 2 tables (which could happen even if the parameter is not NULL)
?
Assuming you want the option 2, here's one way:
WITH got_rnk AS
(
SELECT ab.*
DENSE_RANK () (ORDER IN CASE
WHEN b (IN)
SELECT b
BC.
WHERE b = "2sample" - parameter
)
THEN "A".
OF ANOTHER 'B '.
END
) AS rnk
AB
)
SELECT a, b
OF got_rnk
WHERE rnk = 1
;
This does not assume b is unique in each table.
Thanks for posting the CREATE TABLE and INSERT statements; It is very useful.
-
Request from oracle to MySql using dblink read all rows in the table
Hello
I use the heterogeneous connectivity between oracle 10204 to the Mysql database.
I have a database of link on the side of the oracle.
I request a table in MySql with 10 million rows.
His is not serious if I am running:
' Select * from ' CDR_Accounts"@mysql where 'id '= 7675405;
or
Select * from 'CDR_Accounts"@mysql;
There is an index on the column id.
It seems that the Mysql is feteching all rows in the table, all data is transferred to oracle on the dblink and only after the required lines are back to the client.
The /etc/odbcinst.ini file is as follows:
Please advice[odbcprd:oracle@odbc /software/oracle]$ cat /etc/odbcinst.ini [myodbc3] Description = Mysql connector to mysql version 3.5 Driver = /software/oracle/MysqlOdbc/3.52/lib/libmyodbc3-3.51.25.so Driver64 = /usr/lib Setup = /software/oracle/MysqlOdbc/3.52/lib/libmyodbc3S-3.51.25.so Setup64 = /usr/lib UsageCount = 1 CPTimeout = 3600 CPReuse =
Thank youInitialization of gateway open tha file located in $ORACLE_HOME/hs/admin called init .ora and change HS_FDS_TRACE_LEVEL to HS_FDS_TRACE_LEVEL =
WE. ATTENTION:
Do not forget t turn off after all your tests. -
Hello
I'm trying to use Reg Query to review the contents of a registry key. More precisely
- HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify
I just want to know what are the subkeys. I expect to be
- IconStreams and
PastIconsStream
Since they are both of type reg_binary, when I do this query I have also all binary data as well, make very large output.Is there a way to simply retrieve/request which is in the field/column name and not the data column/field? I tried the /k options and /v who gave me errors, which I interpreted in the sense I was their use either wrong or they are not used in this instance.
There is not a lot of examples out there and most of repeat them what you find when you use /?.
Thank you.
Hello
The question you posted would be better suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums.
http://social.msdn.Microsoft.com/forums/en-us/windowsgeneraldevelopmentissues
-
Need help to create a search form that returns all values on this line
Hello
I have a pdf document that lists every zip code unique to the USA and for each line, it has five columns of information for each zip. Using the integrated search, when the user key a zip code, the cursor jumps to that page and highlights only the postal code, making it difficult to read the other five columns.
Not sure if this is possible, but it would be the ideal solution:
Enter the postal Code: [search] _ <-user key a zip code if found, return all columns in the same row in the report below
Group: ___________
Description of the Group: _
Mkt Area ____________
City ____________
State ___
This can be done (in the PDF file), but it requires a script to measure.
The worksheet data should be converted to a crude and attached text to the PDF file, and then the script could read and fill in the fields on this basis.
If you are interested in hiring someone to develop this script for you, feel free to contact me privately at try6767 at gmail.com
-
Can I get the total number of records that meet the conditions of a query using the Table API?
Hello
A < row > TableIterator is returned when I ask operations using the index of tables. If I want to get the total number of records, I count one by one using the returned TableIterator < row >.
Can I get the total number of records directly meets the conditions of the query?
I can get the total number of records directly the request of the meeting of the conditions of CLI using the command Global table - name tableName - count - index index-name-field fieldName - start startValue-end endValue.
Can I get the same results using the Table API?
I used MongoDB and NoSQL Oracle for about a year. According to the experience of the use of these dbs, I think mongoDB querying interface is powerful. In the contras, the query interface is relatively simple, which results is a lot of work that is usually a long time in the client side.
Hello
Counting records in a database is a tricky thing. Any system that gives you an accurate count of the records will have a hotspot of concurrency on updates, namely the place where the counting is maintained. Such a count is a problem of performance in addition to competitive access problem. The problem is even more difficult in a system widely distributed such a NoSQL database.
The CLI has overall command that counts, but does so by brutal force - iterate keys that correspond to the parameters of the operation. This is how you must do this within the API. There is not a lot of code, but you have to write. You certainly want to use TableIterator
TableAPI.tableKeysIterator (), because a key iteration is significantly faster than the iteration of lines. Just one iteration and count. If you use TableAPI.multiGet () and a key with a touch of brightness full then, in fact, count the results as they are returned in a single piece (a list).
Kind regards
George
-
subquery returns no row in the main query, but hard returns the value of the master query
Oracle 11g, Solaris SPARC 64-bit:
This is the master query: its not to return all the lines
Select count (*) in the sadmin.usr_mods where to_char (ts_id) in ((select to_char (rtrim (ltrim(TS_MODULES,','), ',')) in the sadmin.usr_rfc where TS_KINTANA_PACKAGE_NUMBER = '123' and ts_projectid = 3));
COUNT (*)
----------
0
But wherever if I use subquery only returns he lines:
SQL > select rtrim (ltrim(TS_MODULES,','), ',') from the sadmin.usr_rfc where TS_KINTANA_PACKAGE_NUMBER = '123' and ts_projectid = 3;
RTRIM (LTRIM(TS_MODULES,','), ',')
--------------------------------------------------------------------------------
49,54
If I use these values as hardcoded to a select master it will return 2 rows:
SQL > select count (*) in the sadmin.usr_mods where to_char (ts_id) in ('49 ', ' 54');
COUNT (*)
----------
2
TS_MODULES datatype is CLOB
TS_ID datatype is set to number
Help, please
with
usr_rfc as
(select 3 ts_projectid, 123 ts_kintana_package_number, to_clob(',49,54,') ts_modules
of the double
),
usr_mods as
(select ts_id 49 Union double all the)
Select 50 in all double union
Select double 54
)
Select count (*)
of usr_mods
where to_char (ts_id) in (select regexp_substr (to_char (rtrim (ltrim(TS_MODULES,','), ',')),'[^,] +', 1, level))
of usr_rfc
where TS_KINTANA_PACKAGE_NUMBER = '123'
and ts_projectid = 3
connect by level<= regexp_count(to_char(rtrim(ltrim(ts_modules,','),',')),',')="" +="">=>
)
COUNT (*) 2 Concerning
Etbin
Select count (*)
of usr_mods
where instr ((select ',' | to_char (rtrim (ltrim(TS_MODULES,','), ',')) |)) ','
of usr_rfc
where TS_KINTANA_PACKAGE_NUMBER = '123'
and ts_projectid = 3
),
',' || TO_CHAR (TS_ID) | ','
) > 0
-
How to create a resource of query using CS component?
Hi all
Can someone please let me know how we can create a resource request (OOTB assettype WCS) using the option element CS?
Assettype - Query, OOTB assets can be created using two methods: 1) using the SQL query and 2) using CS elements.
I searched a lot of guides and has been unable to find even a small example or a snippet of code that must be used in an element cs while creating a resource request. Even guide the developer gives example of using only one SQL query when creating a resource request and did not mention anything on the assets of the query to the CS elements.
It would be very very useful for me and most of them if an example can be provided. Thanks in advance.
Kind regards
Praveen
Hi Praveen,
In the attribute menu editor drop-DOWN using a resource request, you need the following:
-The SQL code in the assets of the query should return a column 'value '. For example:select name as value from shippingtype
-If the data type of the attribute using the attribute Editor is 'good', the query should also return property IDs. For example:
select name as value, id as assetid from Product where...
See Designing Attribute Editors - 11g Release 1 (11.1.1.8.0)
Your original CallQuery was essentially correct except that you must
1. return a value column (and possibly an id column)
2. no loop on the results. The attribute editor will loop on the results.
3. set the name of the list the variable 'list '.
For example
<% String sqlQuery = "select name as value from Query"; %>
Note that this will return a list of the names of the assets of the query, which may or may not be what you need.
I hope this helps.
Kind regards
Stephan.
-
Sorting the query according to the unique field data type.
Hello
I have a varchar data from the field in a table which cointains 'NumAriques' and 'Alphanumaric '. I need to sort the query using this field.
While data are numAriques should sort as numAriques else data out as varchar.
Is it posible in oracle. If so, please help me to get it.Hello
I would do something like this:
[11.2] Scott @ My11g > !cat t.sql with t(n) as ( select ' 123' from dual union all select '123CAD' from dual union all select '123TAD' from dual union all select '123' from dual union all select '1234 ' from dual union all select '11111' from dual union all select 'zzrytarz' from dual ) ------ end of sample data ------ select n -- uncomment 2 following line to ease understanding : --,case when regexp_like(trim(n),'^\d+$') then 1 else 2 end --,case when regexp_like(trim(n),'^\d+$') then to_char(to_number(n),'fm00000000000000000000') else n end from t order by case when regexp_like(trim(n),'^\d+$') then 1 else 2 end ,case when regexp_like(trim(n),'^\d+$') then to_char(to_number(n),'fm00000000000000000000') else n end / [11.2] Scott @ My11g > @t N ------------- 123 123 1234 11111 123CAD 123TAD zzrytarz 7 rows selected.
-
SPARQL query using varying paths
Hello
I have a chart in Oracle I like to do query using Jena 2.6.4 and OracleJenaAdaptor 11.2.0.3
IND:123: ind:124 hasA
IND:124: ind:125 Hilmi
IND:125: hasC ind:126
IND:123: coward ind:127
Is there a way to build a sparql query to return all the ind: without 'hard-conding"the full property name? Something in these lines (note that this query doesn't really work).
Select *.
where {ind:123 (: has *) +? x}
Thank you.Hello
If you have created a virtual model before, then will do the following. Note that I am assuming that the virtual model is created based on two 'my_asset', 'my_model' models and modules OWLPRIME.
Piece attached attachment = Attachment.createInstance (new String() {"my_model"},
(New String() {"OWLPRIME"}, InferenceMaintenanceMode.UPDATE_WHEN_COMMIT, QueryOptions.ALLOW_QUERY_INVALID_AND_DUP).Chart GraphOracleSem = new GraphOracleSem (oracle, "my_asset", room attached, true);
graph.performInference ();Thank you
Zhe
-
I'm quite new in the world of SQL and I'm having a problem with an application using binding. I use SQL Developer (3.1.07).
If I run the query with no binding, everything works fine. Normal occasions I have run this query on the day I want my totals and I get my desired results:
HIS SELECTION. CRAFTS, nvl (SUM (SA. (LABORHRS), 0) ' loaded hours. "
SOL_SCHEDULEBASELINEWOASGMNT SA
LEFT JOIN SOL_SCHEDULEBASELINE ON SB SB. BASELINEID = SA. BASELINEID
WHERE SB. DATECODE = "DAILY".
AND TO_CHAR (SB. FROMDATE, "MON-DD-YYYY") = TO_CHAR (SYSDATE, ' DD-MON-YYYY "")
AND TO_CHAR (SB. TODATE, 'DD-MON-YYYY') = TO_CHAR (SYSDATE, ' DD-MON-YYYY "")
AND TO_CHAR (SA. SCHEDULEDATE, "MON-DD-YYYY") = TO_CHAR (SYSDATE, ' DD-MON-YYYY "")
Sa.craft group
sa.craft asc order
BOATS loaded hours
---------- -------------------
CONTROL. 24
12 MM
MT 6
BUT * I want to enter my own date rather than use sysdate. This will be for when I get bored of running this for a day, wonder for the values of an earlier date, etc...
The value will always be the same for all three date fields (SB. FROMDATE, SB. TO DATE, SA. SCHEDULEDATE)
I modified the request here and the query still works very well at this stage: (I use April 1, 2012 to my link...)
HIS SELECTION. CRAFTS, nvl (SUM (SA. (LABORHRS), 0) ' loaded hours. "
SOL_SCHEDULEBASELINEWOASGMNT SA
LEFT JOIN SOL_SCHEDULEBASELINE ON SB SB. BASELINEID = SA. BASELINEID
WHERE SB. DATECODE = "DAILY".
AND SB. FROMDATE =: DDMONYYYY
AND SB. TODATE =: DDMONYYYY
AND TO_CHAR (SA. SCHEDULEDATE, "MON-DD-YYYY") = TO_CHAR (SYSDATE, ' DD-MON-YYYY "")
Sa.craft group
sa.craft asc order
BOATS loaded hours
---------- -------------------
CONTROL. 24
12 MM
MT 6
Now I change my request to what follows, I get a different result:
HIS SELECTION. CRAFTS, nvl (SUM (SA. (LABORHRS), 0) ' loaded hours. "
SOL_SCHEDULEBASELINEWOASGMNT SA
LEFT JOIN SOL_SCHEDULEBASELINE ON SB SB. BASELINEID = SA. BASELINEID
WHERE SB. DATECODE = "DAILY".
AND SB. FROMDATE =: DDMONYYYY
AND SB. TODATE =: DDMONYYYY
AND SA. SCHEDULEDATE =: DDMONYYYY
Sa.craft group
sa.craft asc order
BOATS loaded hours
----------- ------------------
CONTROL. 10
All columns have a Date data_type.
As soon as I change SA. SCHEDULEDATE of
AND TO_CHAR (SA. SCHEDULEDATE, "MON-DD-YYYY") = TO_CHAR (SYSDATE, ' DD-MON-YYYY "")
TO
PAM SCHEDULEDATE =: DDMMYYYY
He keeps the results I need back.
Why is this? Does anyone have an idea of what's going on here? Any help would be GREATLY appreciated!
Thank youHello
Welcome to the forum!
I'm not very familiar with SQL Developer. Should bind variables DATE? Other Oracle products; in them, you must use VARCHAR2 variables, like this (which works in SQL * more):
VARIABLE ddmonyyyy VARCHAR2 (11) EXEC :ddmonyyyy := '01-Apr-2012'; SELECT SA.CRAFT , NVL (SUM (SA.LABORHRS), 0) as "Loaded Hours" FROM SOL_SCHEDULEBASELINEWOASGMNT SA LEFT JOIN SOL_SCHEDULEBASELINE SB ON SB.BASELINEID = SA.BASELINEID WHERE SB.DATECODE = 'DAILY' AND TO_CHAR (SB.FROMDATE, 'DD-MON-YYYY') = :ddmonyyyy AND TO_CHAR (SB.TODATE, 'DD-MON-YYYY') = :ddmonyyyy AND TO_CHAR (SA.SCHEDULEDATE, 'DD-MON-YYYY') = :ddmonyyyy GROUP BY sa.craft ORDER BY sa.craft ASC ;
It's very similar to your original query, where you have used TO_CHAR on all your DATE columns.
Moreover, it would be more effective liaison conve\rt variable of a DATE, rather than convert the DATE on each row of a VARCHAR2. In other words, replace the comparisons as
AND TO_CHAR (SA.SCHEDULEDATE, 'DD-MON-YYYY') = :ddmonyyyy
with
AND SA.SCHEDULEDATE >= TO_DATE (:ddmonyyyy, 'DD-MON-YYYY') AND SA.SCHEDULEDATE < TO_DATE (:ddmonyyyy, 'DD-MON-YYYY') + 1
If is a coding more. It is up to you to decide if the efficiency improvement is worth.
Published by: Frank Kulash, April 1, 2012 20:31
-
How to make all fields on a specific page that is invisible
Is there a way to scroll through all of the fields on a specific page to make them invisible? I prefer not to use a template.
Sure. A field is a 'page' property that returns the page number (or numbers in a table, if the fields with the same name are on multiple pages) that is on the field. If it matches the page in question, you can set the display to display.hidden field property.
This page shows a script that loops through the collection of fields in the document and flips the border color property, which is not very different from what you want to do: http://kb2.adobe.com/community/publishing/885/cpsid_88564.html
So you have to adapt a little bit, but it should help you get started.
A far easier approach is to give each field in the page the same prefix using hierarchical naming and you can then use a single line of code. For example, if you preface each field page 4 with "P4". (e.g., P4.name, P4.address, P4.state, etc.), the following code will hide all fields of P4:
getField("P4").display = display.hidden;
Maybe you are looking for
-
How to use Firefox Sync to recover lost bookmarks
I have a Firefox Sync account and I synced my firefox with it data. But I completely erased my PC, so I use Firefox Sync to retrieve my data from firefox?
-
Question about recovery on satellite disks series
Hello worldI had my equium for a week now and it already have mucked up. I managed to delete the partition hidden just reconfiguring the partitions on my HARD drive, is it possible to recover the hidden partition or that failing to get a set of recov
-
Equium L20-197 - memory problem
I have memory problem with pc-world of computing L20 and currys sell the L20 with suite spec 256 MB of main memory and 128 MB of video memory (up to 128 no) when this is not the first case of all memory is shared and there are 64 MB main memory and w
-
Is any String variable or something that have entry and exit data?
Is any String variable or something that have entry and exit data?
-
I need a batch file or program that simulate a keypress (F8) on running. How can I do this or what program should I expect?