Help converting MS SQL to Oracle
Can someone help me to translate this query from MS SQL to Oracle?
WITH GetProjectRootTree(ID, FolderName, PathName)
AS(
--Find the root record
SELECT DISTINCT
L.OBJECT_ID1
,P.CN_DESCRIPTION + ' ' + P.CN_PROJECT_ID
,CAST(P.CN_DESCRIPTION + ' ' + P.CN_PROJECT_ID AS NVARCHAR(MAX))
FROM TDM_LINKS_00001 AS L
INNER JOIN TN_PROJECT AS P ON L.OBJECT_ID1 = P.OBJECT_ID
WHERE P.CN_NOTES LIKE '1st%'
UNION ALL
--Create parent/child menu
SELECT
child.OBJECT_ID2
,P.CN_DESCRIPTION + ' ' + P.CN_PROJECT_ID
,parent.PathName + ' > ' + P.CN_DESCRIPTION + ' ' + P.CN_PROJECT_ID
FROM TDM_LINKS_00001 AS child
INNER JOIN GetProjectRootTree AS parent ON child.OBJECT_ID1 = parent.ID
INNER JOIN TN_PROJECT AS P ON child.OBJECT_ID2 = P.OBJECT_ID
--Get Result
SELECT *
FROM GetProjectRootTree
ORDER BY PathName
This is as recursive function retrieves a hierarchical tree structure like this:
Id | FolderName | PathName
62757 | Architectural| Architectural
85353 | A10 | Architectural > A10
85358 | A10-S | Architectural > A10 > A10-S
85359 | A10-S350 | Architectural > A10 > A10-S > A10-S350
85360 | A10-S440 | Architectural > A10 > A10-S > A10-S440
85270 | A20 | Architectural > A20
85290 | A20-P | Architectural > A20 > A20-P
85302 | A20-P100 | Architectural > A20 > A20-P > A20-P100
c",) Geir
Edited by: user12996295 on Aug 2, 2010 10:01 PM
check this out...
WITH temp AS
( SELECT DISTINCT L.OBJECT_ID1 FROM TDM_LINKS_00001 L INNER JOIN TN_PROJECT P ON L.OBJECT_ID1 = P.OBJECT_ID WHERE P.CN_NOTES LIKE '1st%'
SELECT OBJECT_ID ,CN_PROJECT_ID path, CN_PROJECT_ID folder FROM tn_project WHERE object_id IN (SELECT * FROM temp)
UNION ALL
SELECT t.OBJECT_ID1, p.cn_project_id||path path,t.CN_PROJECT_ID FROM
(SELECT L.OBJECT_ID1,connect_by_root L.object_id1 parent,sys_connect_by_path(P.CN_PROJECT_ID,'>') path,P.CN_PROJECT_ID
FROM TDM_LINKS_00001 L,tn_project P WHERE l.object_id2 = p.object_id
CONNECT BY L.object_id1 = prior L.object_id2
START WITH L.object_id1 IN (SELECT * FROM temp)
) t,
tn_project p
WHERE t.parent = p.object_id
ORDER BY 2,3Ravi Kumar
Similar Messages
-
Help on - convert ansi sql to oracle sql
hi gurus,
i'm try'g to convert ansi sql to oracle sql.
but i'm getting an error. can u please let me know, if i can convert it or is it better to use ansi sql!
original code in ansi format::
select distinct bfc.NBR_SEQ, bfc.IDN_ENTITY, bfc.CDE_TYPE_ENTITY, n.CDE_STATUS,
gec.idn_group as idn_parent_id, bfc.IDN_FUNC_BUSS,
case when bfc.CDE_TYPE_ENTITY = 'P' OR bfc.CDE_TYPE_ENTITY = 'A' then
PKG_FW_NVGTR.GET_NAM_PAGE(bfc.IDN_ENTITY)
else
PKG_FW_NVGTR.GET_NAM_GROUP(bfc.IDN_ENTITY)
end as ENTITY_NAM,
p.Category, p.Display_Txt, p.show_in_nav, p.page_uri
from
T_BUSS_FUNC_ENTITY_CREF bfc
inner join t_buss_func bf on bfc.idn_func_buss = bf.idn_func_buss
inner join t_entity_prog_cref epc on bfc.idn_entity = epc.idn_entity and bfc.cde_type_entity = epc.cde_type_entity
left outer join t_page p on bfc.idn_entity = p.idn_page
left outer join t_group_entity_cref gec on bfc.idn_entity = gec.idn_entity and bfc.cde_type_entity = gec.cde_type_entity
left outer join t_nvgtr n on bfc.idn_entity = n.idn_entity and bfc.cde_type_entity = n.cde_type_entity
where
BF.nam_func_buss = 'CP' AND--P_NAM_FUNC_BUSS and
epc.cde_program in
( select p.cde_program from t_program p where p.nam_program in (
SELECT * FROM TABLE (CAST(PKG_FW_NVGTR.FN_GET_ARRAY_FROM_COMMA_LIST('LC', ',') AS TYP_ARRAY))))
order by
bfc.NBR_SEQ;tried to convert into oracle
SELECT DISTINCT bfc.NBR_SEQ,
bfc.IDN_ENTITY,
bfc.CDE_TYPE_ENTITY,
n.CDE_STATUS,
gec.idn_group as idn_parent_id,
bfc.IDN_FUNC_BUSS,
case when bfc.CDE_TYPE_ENTITY = 'P' OR bfc.CDE_TYPE_ENTITY = 'A' then
PKG_FW_NVGTR.GET_NAM_PAGE(bfc.IDN_ENTITY)
else
PKG_FW_NVGTR.GET_NAM_GROUP(bfc.IDN_ENTITY)
end as ENTITY_NAM,
p.Category,
p.Display_Txt,
p.show_in_nav,
p.page_uri
FROM T_BUSS_FUNC_ENTITY_CREF bfc,
T_BUSS_FUNC bf,
T_ENTITY_PROG_CREF epc,
T_PAGE p,
T_GROUP_ENTITY_CREF gec,
T_NVGTR n
WHERE bfc.IDN_FUNC_BUSS = bf.IDN_FUNC_BUSS
AND bfc.IDN_ENTITY = epc.IDN_ENTITY
AND bfc.CDE_TYPE_ENTITY = epc.CDE_TYPE_ENTITY
AND bfc.IDN_ENTITY(+) = p.IDN_PAGE
AND bfc.IDN_ENTITY(+) = gec.IDN_ENTITY
AND bfc.CDE_TYPE_ENTITY(+) = gec.CDE_TYPE_ENTITY
AND bfc.IDN_ENTITY(+) = n.IDN_ENTITY
AND bfc.CDE_TYPE_ENTITY(+) = n.CDE_TYPE_ENTITY
AND BF.nam_func_buss = 'CP' AND--P_NAM_FUNC_BUSS and
epc.cde_program in
( select p.cde_program from t_program p where p.nam_program in (
SELECT * FROM TABLE (CAST(PKG_FW_NVGTR.FN_GET_ARRAY_FROM_COMMA_LIST('LC', ',') AS TYP_ARRAY))))
order by
bfc.NBR_SEQ;error is
ORA-01417: a table may be outer joined to at most one other tableso how can i convert it?
thanksuser642856 wrote:
explain plan for this select statement
ID PID Operation Name Rows Bytes Cost CPU Cost IO Cost Temp space IN-OUT PQ Dist PStart PStop
0 SELECT STATEMENT 10M 1183M 570694 33G 567917
1 0 SORT UNIQUE 10M 1183M 287940 17G 286502 2607M
2 1 HASH JOIN 10M 1216M 179 1G 84
3 2 COLLECTION ITERATOR PICKLER FETCH PKG_FW_NVGTR.FN_GET_ARRAY_FROM_COMMA_LIST
4 2 HASH JOIN OUTER 2693 299K 58 34M 55
5 4 HASH JOIN OUTER 37 3959 11 24M 9
6 5 HASH JOIN OUTER 37 3663 10 18M 8
7 6 HASH JOIN 37 1147 7 12M 6
8 7 HASH JOIN 59 1180 5 6060823 4
9 8 NESTED LOOPS 2 24 3 15843 3
10 9 TABLE ACCESS BY INDEX ROWID T_BUSS_FUNC 1 6 1 8341 1
11 10 INDEX UNIQUE SCAN UK_NAM_FUNC_BUSS 1 0 1050 0
12 9 TABLE ACCESS FULL T_PROGRAM 2 12 2 7501 2
13 8 INDEX FULL SCAN PK_T_ENTITY_PROG_CREF 59 472 1 18921 1
14 7 TABLE ACCESS FULL T_BUSS_FUNC_ENTITY_CREF 37 407 2 14891 2
15 6 TABLE ACCESS FULL T_PAGE 26 1768 2 14141 2
16 5 INDEX FULL SCAN UK_UNIQUE_GROUP_DEPENDENT 26 208 1 12321 1
17 4 TABLE ACCESS FULL T_NVGTR 6986 47K 46 3179613 46 as you can see.. cpu cost is in 33G..
is there any better way?
thanksCan you run this in a session please:
ALTER SESSION set optimizer_dynamic_sampling = 4;Then run an explain plan again.
And you have a function in there - PKG_FW_NVGTR.FN_GET_ARRAY_FROM_COMMA_LIST - which isn't helping things. -
Utility class to convert ms sql to oracle queries
HI all
if any body can write a java utility for converting MS SQl queries to oracle really appreciateHI all
if any body can write a java utility for converting MS SQl queries to oracle really appreciate -
Need help converting MS SQL query into Oracle, Function 'WHERE' issues
SELECT PERS_NBR, PAY_ID, PAY_CODE, LOGICAL_DATE, LOGICAL_DATE AS END_DATE, PCNAMES + REPLICATE(',', 39 - (LEN(PCNAMES) - LEN(REPLACE(PCNAMES, ',', ''))))
AS PC_NAMES_FINAL
FROM (SELECT DISTINCT A.PAY_ID, A.PAY_CODE, A.PERS_NBR, A.LOGICAL_DATE, PCNAMES = substring
((SELECT TOP 10 ',' + PC_NAME + ',' + SUBSTRING(CAST(B.VALUE AS VARCHAR), 0, LEN(CAST(B.VALUE AS VARCHAR)) - 2)
FROM T_PAY_CAT_RECORD B
WHERE B.PERS_NBR = A.PERS_NBR AND
B.LOGICAL_DATE = A.LOGICAL_DATE FOR XML path(''), elements), 2, 500)
FROM T_PAY_CAT_RECORD A, T_PERSON P
WHERE A.PERS_NBR = P.NBR) FINAL
Edited by: 919969 on Mar 9, 2012 3:45 PMHello
Like any language you need to understand what the messages coming from the syntax check are saying...
XXXX> SELECT PERS_NBR,
2 PAY_ID,
3 PAY_CODE,
4 LOGICAL_DATE,
5 LOGICAL_DATE AS END_DATE,
6 PCNAMES || LPAD(',', 39 - (LENGTH(PCNAMES) - NVL(LENGTH(REPLACE(PCNAMES,',')),0)),',') AS PC_NAMES_FINAL
7 FROM (
8 SELECT PAY_ID,
9 PAY_CODE,
10 PERS_NBR,
11 LOGICAL_DATE,
12 SUBSTR(
13 RTRIM(XMLAGG(XMLELEMENT(e,PC_NAME || ',' || SUBSTR(VALUE,1,LEN(VALUE) - 2),',').EXTRACT('//text()')),',') PCNAMES
14 2,
15 500
16 )
17 FROM (
18 SELECT A.PAY_ID,
19 A.PAY_CODE,
20 A.PERS_NBR,
21 A.LOGICAL_DATE,
22 A.PC_NAME,
23 ROW_NUMBER() OVER(PARTITION BY A.PERS_NBR,A.LOGICAL_DATE ORDER BY 1) RN
24 FROM T_PAY_CAT_RECORD A,
25 T_PERSON P
26 WHERE A.PERS_NBR = P.NBR
27 )
28 WHERE RN <= 10
29 GROUP BY PAY_ID,
30 PAY_CODE,
31 PERS_NBR,
32 LOGICAL_DATE
33 ) FINAL
34 /
RTRIM(XMLAGG(XMLELEMENT(e,PC_NAME || ',' || SUBSTR(VALUE,1,LEN(VALUE) - 2),',').EXTRACT('//text()')),',') PCNAMES
ERROR at line 13:
ORA-00907: missing right parenthesisIf you use something like SQL*Plus or SQL Developer, they will give you the error stack which will point you to the source of the problem.
It's saying missing right parenthesis. Start by finding out if we've got all out matching brackets. Counting from the start of that statement i.e. SUBSTR on line 12, we have 7 open brackets and 6 close brackets. So there does appear to be a problem with brackets. However if we take a step back and look at lines 12 to 16, this is actually a single statement. It's a call to the SUBSTR function and within it it has calls to RTRIM, XMLAGG etc. For the statement as a whole there are the same number of left and right parenthesis so the problem is related to something else. Something that is leading the syntax check to think it has reached the end of a statement and hasn't found enough closing parethesis.
The issue here appears to be that we have the token PCNAMES at the end of line 13 but syntactically that's not correct. We can't have that token there because it's appearing in the middle of a function call. PCTNAMES is actually a column alias but it's just in the wrong place. We need it to be an alias for the whole expression from line 12 to 16. So make the change and see what happens...
XXXX> select PERS_NBR,
2 PAY_ID,
3 PAY_CODE,
4 LOGICAL_DATE,
5 LOGICAL_DATE AS END_DATE,
6 PCNAMES || LPAD(',', 39 - (LENGTH(PCNAMES) - NVL(LENGTH(REPLACE(PCNAMES,',')),0)),',') AS PC_NAMES_FINAL
7 FROM (
8 SELECT PAY_ID,
9 PAY_CODE,
10 PERS_NBR,
11 LOGICAL_DATE,
12 SUBSTR(
13 RTRIM(XMLAGG(XMLELEMENT(e,PC_NAME || ',' || SUBSTR(VALUE,1,LEN(VALUE) - 2),',').EXTRACT('//text()')),',')
14 2,
15 500
16 ) PCNAMES
17 FROM (
18 SELECT A.PAY_ID,
19 A.PAY_CODE,
20 A.PERS_NBR,
21 A.LOGICAL_DATE,
22 A.PC_NAME,
23 ROW_NUMBER() OVER(PARTITION BY A.PERS_NBR,A.LOGICAL_DATE ORDER BY 1) RN
24 FROM T_PAY_CAT_RECORD A,
25 T_PERSON P
26 WHERE A.PERS_NBR = P.NBR
27 )
28 WHERE RN <= 10
29 GROUP BY PAY_ID,
30 PAY_CODE,
31 PERS_NBR,
32 LOGICAL_DATE
33 ) FINAL
34 /
2,
ERROR at line 14:
ORA-00907: missing right parenthesisNOw we've got a new error. Again it's saying we've got a missing parenthesis but this time on line 14. The issue here is that line 13 is a parameter to the SUBSTR function but there is no comma on the end. What we actually have at the moment is a line that looks like so
RTRIM(XMLAGG(XMLELEMENT(e,PC_NAME || ',' || SUBSTR(VALUE,1,LEN(VALUE) - 2),',').EXTRACT('//text()')),',') 2,Which is just not formed correctly. We need a comma at the end of line 13 to state that this is the end of that line as a parameter.
XXXX> select PERS_NBR,
2 PAY_ID,
3 PAY_CODE,
4 LOGICAL_DATE,
5 LOGICAL_DATE AS END_DATE,
6 PCNAMES || LPAD(',', 39 - (LENGTH(PCNAMES) - NVL(LENGTH(REPLACE(PCNAMES,',')),0)),',') AS PC_NAMES_FINAL
7 FROM (
8 SELECT PAY_ID,
9 PAY_CODE,
10 PERS_NBR,
11 LOGICAL_DATE,
12 SUBSTR(
13 RTRIM(XMLAGG(XMLELEMENT(e,PC_NAME || ',' || SUBSTR(VALUE,1,LEN(VALUE) - 2),',').EXTRACT('//text()')),','),
14 2,
15 500
16 ) PCNAMES
17 FROM (
18 SELECT A.PAY_ID,
19 A.PAY_CODE,
20 A.PERS_NBR,
21 A.LOGICAL_DATE,
22 A.PC_NAME,
23 ROW_NUMBER() OVER(PARTITION BY A.PERS_NBR,A.LOGICAL_DATE ORDER BY 1) RN
24 FROM T_PAY_CAT_RECORD A,
25 T_PERSON P
26 WHERE A.PERS_NBR = P.NBR
27 )
28 WHERE RN <= 10
29 GROUP BY PAY_ID,
30 PAY_CODE,
31 PERS_NBR,
32 LOGICAL_DATE
33 ) FINAL
34 /
T_PERSON P
ERROR at line 25:
ORA-00942: table or view does not existNow we have a new error but this time it's because I don't have the t_person table on my database. Syntactically the statement above is now correct so it should work on your system.
HTH
David
Edited by: Bravid on Mar 12, 2012 10:20 AM -
SQL Dev converts MS SQL to Oracle - issue with numeric prefix column name
Hi,
We're working on migrating MS SQL data into Oracle 10g. An issue we encountered is that some of MS SQL's tables have column names with numeric prefix like 1Q07, 2Q07, ..., 4Q08, and so on. The converted model as well as script can be created. But one thing I notice is that SQL Dev appends a prefix "A" for column names with numeric prefix. This makes sense because Oracle does not allow a column with number. But somehow this does not work with only 4Q
1Q04 => A1Q01
2Q07 => A2Q07
3Q08 => A3Q08
4Q08 => 4Q08 ???
Why? Any place in the tool where I can override this?
Obviously I can manually modify column name 4Q08 to A4Q08 in the script. But by doing this when moving data, it would fail because tool has no knowledge of updated column name.
Thanks in advance.Hi ittichai,
In <repository>.MIGRATION_TRANSFORMER body
FUNCTION first_char_check(p_work NVARCHAR2) RETURN NVARCHAR2
v_allowed := C_DISALLOWED_CHARS || '012356789_$';
should be
v_allowed := C_DISALLOWED_CHARS || '0123456789_$';
If you make this change and convert the 4Q08 will be
A4Q08 is expected, without any manual rename.
-Turloch
Message was edited by:
Turloch O'Tierney -
Help:Modifying access sql to Oracle sql
Hello folks can anybody please help me in changing the following code to oracle.Thanks a million.
select
IIf(prorated_directpay = 0 And prorated_feepaid = 0,
"CASH DEPOSIT",
IIf(prorated_directpay <> 0 And prorated_feepaid = 0,
'NONCASH DIRECTPAY',
IIf(prorated_directpay <> 0 And prorated_feepaid <> 0,
"NONCASH FEE RECEIVED"))) AS recovery_flg,
Left$(patientmemberid, Len(patientmemberid) - 2) AS Pat Mem ID
from
table
WHERE (((Debtor . LOB) = "MEDICAL") And ((Debtor . PRORATED_TRANAMT) <> 0))
Or (((Debtor . LOB) = "MEDICAL") And ((Debtor . PRORATED_TRANAMT) = 0) And
((Debtor . PRORATED_FEEAMT) <> 0))
Or (((Debtor . LOB) = "MEDICAL") And ((Debtor . PRORATED_TRANAMT) = 0) And
((Debtor . PRORATED_DIRECTPAY) <> 0))
Or (((Debtor . LOB) = "MEDICAL") And ((Debtor . PRORATED_TRANAMT) = 0) And
((Debtor . PRORATED_FEEPAID) <> 0))
Edited by: user11961230 on Nov 5, 2009 1:35 PMuser11961230 wrote:
Hello folks can anybody please help me in changing the following code to oracle.Thanks a million.
select
IIf(prorated_directpay = 0 And prorated_feepaid = 0,
"CASH DEPOSIT",
IIf(prorated_directpay <> 0 And prorated_feepaid = 0,
'NONCASH DIRECTPAY',
IIf(prorated_directpay <> 0 And prorated_feepaid <> 0,
"NONCASH FEE RECEIVED"))) AS recovery_flg,
Left$(patientmemberid, Len(patientmemberid) - 2) AS Pat Mem ID
from
table
WHERE (((Debtor . LOB) = "MEDICAL") And ((Debtor . PRORATED_TRANAMT) <> 0))
Or (((Debtor . LOB) = "MEDICAL") And ((Debtor . PRORATED_TRANAMT) = 0) And
((Debtor . PRORATED_FEEAMT) <> 0))
Or (((Debtor . LOB) = "MEDICAL") And ((Debtor . PRORATED_TRANAMT) = 0) And
((Debtor . PRORATED_DIRECTPAY) <> 0))
Or (((Debtor . LOB) = "MEDICAL") And ((Debtor . PRORATED_TRANAMT) = 0) And
((Debtor . PRORATED_FEEPAID) <> 0))
Edited by: user11961230 on Nov 5, 2009 1:35 PMYou bet, start by applying the lessons you learned in [YOUR LAST POST|http://forums.oracle.com/forums/message.jspa?messageID=3874940#3874940] and then come back with specific questions. Have you thought to use google to determine what the Access functions, which are not available in Oracle, do? After doing that, you can again google to see if you can find similar functionality in Oracle, if not ... we're here to help. -
Convert MS SQL 2000 to Oracle 9i
Hi,
I am a newbie in Oracle, I need to convert my current MS SQL 2000 db to Oracle 9i. My current db has about 200 tables with no stored procedures. So I need to convert the db design and data.
I read from this forum, some suggested to use Oracle Migration Workbench, some suggested Enterprise Manager Console with the Load Wizard.
How can I do the migration and where can I download the migration tools if any?
Regards,
JentyDTS is also buggy which is why SQL Server 2005 has a complete rewrite of the feature.
Nevertheless for straight data dumps Jim is correct in that DTS should work.
For getting the DDL you might consider using Query Analyzer to just dump all the DDL into a file and then using C or a script language to extract and convert the SQL into Oracle DDL. If you are a good script (maybe Perl) coder this would be just as quick as setting up and using the conversion tool.
Once you have the tables defined to Oracle you can use a little pl/sql to generate the sqlldr control cards to pull in the DTS extracted data.
Or you can use the ability of SQL Server to access Oracle by define a remote db and insert all the data accross. You will need to install an Oracle client on the SQL Server box to do this.
You have plently of options. Look them all over and go with the one that best matches your available skill set.
HTH -- Mark D Powell -- -
Converting MS SQL Server Query to Oracle Query
Hi There,
I've a strange problem. My project uses both MS SQL Server and Oracle server at run time. I've lot of queries which are written in MS SQL Style. Now, iam planning to write a helper class whic converts MS SQL Query to Oracle Query. Please Help me if any one has that kind of Helper with you.
Thanks And Regards,
Sasi KanthThat is why persistence applications like Hibernate or
CMP get used for apps that will use more than one DB,
but it takes upfront planning.
If you have a set of automated unit tests that work
with SQL Server, they will be a big help in getting
your Oracle code up and running.Indeed - JUnit and Ant would be a big help here.
It sounds like you have SQL in your JSPs, that will
work against you as well if so. If you are using a
DAO pattern, this will be much easier, as you can
re-implement each DAO for Oracle.If you'd layered this app properly, you might just implement an OracleDAOFactory and be done with it. Interfaces and a DAO layer would go a long way.
This is why layering is such a good idea. It isolates changes in a smaller subset of classes.
But your problem sounds pretty big. It'd be daunting even if it were well designed. -
How to convert epoch time to datetime in sql*loader Oracle
Hello,
I wan't to question how to convert epoch time to datetime in sql*loader Oracle. I try this script for convert epoch time to datetime in sql*loader, but error:
Record 1: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
ORA-01722: invalid number
Record 2: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
ORA-01722: invalid number
Record 3: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
ORA-01722: invalid number
This is my loader:
LOAD DATA INFILE 'C:\Documents and Settings\Administrator\My Documents\XL_EXTRACT_211\load.csv'
into table TEMP_TEST_LANGY append
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
DATADATA CHAR "TO_DATE('01-JAN-1970','DD-MON-YYYY')+:datadata/86400"
This is my csv file:
79314313.7066667
79314336.2933333
79314214.3466667
This is my table:
CREATE TABLE TEMP_TEST_LANGY
DATADATA DATE
Thanks
Edited by: xoops on Sep 21, 2011 8:56 AM
Edited by: xoops on Sep 21, 2011 8:58 AMthanks for your answer, but I asked to use sql loader instead of the external table, which so my question is why can not the epochtime converted to datetime, if there is no way to convert a datetime epochtime using sql loader, so I'm required to use the external table. thank you.
This is my error log:
Column Name Position Len Term Encl Datatype
DATADATA FIRST * , CHARACTER
SQL string for column : "TO_DATE('1-Jan-1970 00:00:00','dd-MM-YYYY hh24:mi:ss') + (:DATADATA/60/60/24)"
Record 1: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
ORA-01722: invalid number
Record 2: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
ORA-01722: invalid number
Record 3: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
ORA-01722: invalid number
Edited by: xoops on Sep 21, 2011 12:33 PM -
Help me please to migrate from MS SQL to Oracle
Hi all,
we are in process of migration from MS SQL to Oracle.
Please help me to perform the same in Oracle:
select number+1 as rowid,number*6+1 as rowbeg,number*6+6 as rowend
from master.dbo.spt_values
where type='P'
Our Oracle version:
select * from v$version
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for 64-bit Windows: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
5 rows selected.996831 wrote:
Here is another solution without "connect by":
select 1 as rnum, 1 as rowbeg, 6 as rowend from dual
union all
select rownum+1 as rnum,rownum*6+1 as rowbeg,rownum*6+6 as rowend
from all_objects
1
1
6
2
7
12
3
13
18
4
19
24
5
25
30
6
31
36
7
37
42
(et cetera).
This needs the user to have access on all_objects view and it will limit the result upto the numbers of objects returned by the all_objects view. -
Please help me convert the SQL to HQL
select
count(*) as col_0_0_
from
edu.hr_people_all hrpeopleal0_
left outer join
edu.conditions_journal conditions1_
on hrpeopleal0_.people_id=conditions1_.people_id
and conditions1_.personal_number like '%'
where
hrpeopleal0_.status=11Hibernate version: 3
HQL as I 've done
FROM PMSProjectsORO pjt LEFT JOIN PMSChecklistORO pcl
ON pjt.projectId = pcl.projectId order by
pjt.projectCode ascHQL is probably incorrect.
Try this:
FROM
PMSProjectsORO pjt
LEFT JOIN
PMSChecklistORO pcl
ORDER BY
pjt.projectCode asc>
Original SQL for MSQL5:
FROM PMSProject LEFT JOIN PMSCheckList ON
PMSProject.PROJECT_ID = PMSCheckList.PROJECT_ID order
by PMSProject.PROJECT_CODE desc
Name and version of the database you are using:
MYSQL 5
Please help me convert the sql to hql since what i
've done is throwing error like unexpected token...
Please reply ASAPLet me know if that's better.
% -
Fail to convert to internal representation: oracle.sql.DATE
I'm using the oracle 8.1.7 jdbc driver against oracle 8.1.7 running on NT, and I get the exception message below when I attempt to insert an jpub object structure into a prepared statement.
All date objects have been constructed from a timestamp object, using the oracle.sql.DATE Timestamp constructor. So I'm surprised to get this error given the timestamp object was successfully constructed.
I've tried session date formats of 'yyyy-mm-dd hh24:mi:ss' and 'mm/dd/yyyy hh24:mi:ss', with no success.
I can call stringValue on oracle.sql.DATE and it returns a valid date.
Can someone confirm that they have been able to use the oracle.sql.DATE class to insert a date correctly into the database? Its seems a silly question to ask but you have to start somewhere!
Exception : Fail to convert to internal representation: oracle.sql.DATE@3c144e8a
Stack trace : java.sql.SQLException: Fail to convert to internal representation: oracle.sql.DATE@3c144e8a
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:829)
at oracle.jdbc.oracore.OracleTypeADT.toDatum(OracleTypeADT.java:261)
at oracle.sql.StructDescriptor.toOracleArray(StructDescriptor.java:385)
at oracle.sql.StructDescriptor.toArray(StructDescriptor.java:560)
at oracle.sql.STRUCT.<init>(STRUCT.java:95)
at oracle.jpub.runtime.MutableStruct.toDatum(MutableStruct.java:65)
nullThe JPub/JDBC runtime is converting your Java object into Oracle-specific representation (all data is put in oracle.sql.XXXX format). The top level object is an oracle.sql.STRUCT, the attributes of which are represented as an array of oracle.sql.Datum objects - in your case an oracle.sql.NUMBER and an oracle.sql.DATE. However, the error does occur in the StructDescriptor which describes the SQL type and the shape of the object. Is the error dependent on the data values? Might null values not be dealt with, correctly?
One thing to try to do is create such an oracle.sql.STRUCT object from scratch with the same attribute values and insert/manipulate that using SQL.
I have not dealt with TAR's. If you send me a self-contained test case, I'll check it against the current development version of JDBC. (At least you'll know if the next JDBC release fixes this issue :-) I might also file a bug. -
Convert php script to oracle procedure
To all please help me... I wanna convert php script to oracle procedure..and the script is (exp)..
<?php
include("../config/koneksi.php");
$customer=$_POST['customer'];
$tanggal1=$_POST['theDate1'];
$tanggal2=$_POST['theDate2'];
$no_bulan=substr($tanggal1,0,2);
$bulan_sajah= (substr($no_bulan,0,1)=='0')? substr($no_bulan,1,1) : $no_bulan;
$tahun_sajah=substr($tanggal1,3,4);
$blnkmrn=(int)$bulan_sajah;
$thnkmrn=(int)$tahun_sajah;
if ($blnkmrn==1) {
$bulan_lalu=12;
$tahun_lalu=$thnkmrn-1;}
else {
$bulan_lalu=$blnkmrn-1;
$tahun_lalu=$thnkmrn;
$bulanlalu=strval($bulan_lalu);
$tahunlalu=strval($tahun_lalu);
$sql = "select nip_nas from edo_customer_master_dives where standard_name='$customer'";
$stm = ociparse($conn,$sql);
ociexecute($stm);
ocifetch($stm);
$data=ociresult($stm,1);
$sql12 = "select PRODUCT_LINE_ID,sum(REVENUE)
from PA_FACT_REV_BILLED_CC
where nip_nas='$data' and year_id='$tahun_sajah' and month_id='$bulan_sajah' group by PRODUCT_LINE_ID";
$stm12 = ociparse($conn,$sql12);
ociexecute($stm12);
$total_revenue=0;
$i="0";
while (ocifetch($stm12)){
$rev_items=ociresult($stm12,1);
$revenue=ociresult($stm12,2);
$sql2 = "select * from PA_FACT_REV_BILLED_CC
where nip_nas='$data' and PRODUCT_LINE_ID='$rev_items'";
$stm2 = ociparse($conn,$sql2);
ociexecute($stm2);
ocifetch($stm2);
$tahun=ociresult($stm2,1);
$bulan=ociresult($stm2,2);
$nipnas=ociresult($stm2,3);
$prod_line=ociresult($stm2,4);
$rev_item=ociresult($stm2,5);
//$revenue=ociresult($stm2,6);
$query1 = "select standard_name from edo_customer_master_dives where nip_nas='$nipnas'";
$st1 = ociparse($conn,$query1);
ociexecute($st1);
ocifetch($st1);
$nama_cust=ociresult($st1,1);
$query2 = "select prod_line_lname from parameter.p_prod_line@dwhnas where prod_line_id='$prod_line'";
$st2 = ociparse($conn,$query2);
ociexecute($st2);
ocifetch($st2);
$nama_prod_line=ociresult($st2,1);
$query3 = "select REV_TYPE_LNAME from parameter.p_rev_type@dwhnas where REV_TYPE_ID='$rev_item'";
$st3 = ociparse($conn,$query3);
ociexecute($st3);
ocifetch($st3);
$nama_rev_item=ociresult($st3,1);
$query4="select sum(total_usage) from PA_FACT_TRAFFIC_CC where PRODUCT_LINE_ID='$prod_line' and nip_nas='$nipnas' and year_id='$tahun_sajah' and month_id='$bulan_sajah' group by PRODUCT_LINE_ID";
$st4 = ociparse($conn,$query4);
ociexecute($st4);
ocifetch($st4);
$total_usage=ociresult($st4,1);
$total=$revenue + $total_usage;
echo $tahun." ".$bulan." ".$nama_cust." ".$nama_prod_line." ".$nama_rev_item." ".$revenue." ".$total_usage." ".$total."<br>";
$total_revenue=$total_revenue+$total;
$i++;
echo $total_revenue;
//cost of product
$query5="select * from PA_FACT_TRAFFIC_CC where nip_nas='$nipnas' and year_id='$tahunlalu' and month_id='$bulanlalu'";
$st5 = ociparse($conn,$query5);
ociexecute($st5);
$total1=0;
$total2=0;
$total3=0;
$total4=0;
$total5=0;
while (ocifetch($st5)){
$nipnas=ociresult($st5,3);
$lineid=ociresult($st5,4);
$itemid=ociresult($st5,5);
$call=ociresult($st5,6);
$unit=ociresult($st5,7);
$query6 = "select prod_line_lname from parameter.p_prod_line@dwhnas where prod_line_id='$lineid'";
$st6 = ociparse($conn,$query6);
ociexecute($st6);
ocifetch($st6);
$nama_prod_line=ociresult($st6,1);
$query7 = "select REV_item_LNAME from parameter.p_rev_item@dwhnas where REV_item_ID='$itemid'";
$st7 = ociparse($conn,$query7);
ociexecute($st7);
ocifetch($st7);
$nama_rev_item=ociresult($st7,1);
$query8 = "select * from cost_of_product where prod_line_lname='$nama_prod_line' and REV_item_LNAME='$nama_rev_item' and end_date is null";
$st8 = ociparse($conn,$query8);
ociexecute($st8);
ocifetch($st8);
$lineid_cost=ociresult($st8,1);
$itemid_cost=ociresult($st8,2);
$satuan=ociresult($st8,5);
$nilai=ociresult($st8,7);
if (strtoupper($satuan)=='MENIT') $total1=$total1+(($unit/60)*$nilai);
if (strtoupper($satuan)=='KBPS') $total2=$total2+($unit*$nilai);
if (strtoupper($satuan)=='SMS') $total3=$total3+($call*$nilai);
if (strtoupper($satuan)=='SSL') $total4=$total4+($call*$nilai);
if (strtoupper($satuan)=='SST') $total5=$total5+($call*$nilai);
$total_cost_pots=$total1+$total2+$total3+$total4+$total5;
echo $total_cost_pots;
?>
this script just for exp.Please convert step by step. for example
(1) remove inverted quotation mark ( ` )
(2) modify constraints syntax (PRIMARY KEY,UNIQUE KEY, KEY etc.) to [url http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/clauses002.htm#g1053592]Oracle constraints.
(3) modify some datatype to [url http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#i45441]Oracle datatype
(4) think how to convert auto_increment ([url http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_6015.htm#i2067093]Sequence, [url http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7004.htm#i2235611]Beffore Trigger etc. on Oracle)
http://download-west.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_packages.htm#sthref864
http://download-west.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm -
Converting application SQL code
I see that the migration workbench will convert stored procedures. Are there any tools that will help to sniff out or convert application SQL code for MS SQL into SQL supported by Oracle. I am converting from SQL Server 7 to Oracle 8i. Any help would be appreciated
Hello,
Yes it probably will return multiple rows...but I spot this:
CURSOR c_schemas IS
select owner from <table>@<db-link> where table_name = 'DDL_LOG' and num_rows > 0 order by owner;
Does that cursor return multiple rows as well? Or just one? Because if it returns more rows you'll get multiple SQL statements...
Good links?? There is APEX documentation in your installation directory...
Just try the different kinds of regions I suggested, see if it works and what fits your needs the best.
Greetings,
Roel
http://roelhartman.blogspot.com/
http://www.bloggingaboutoracle.org/
http://www.logica.com/ -
HELP! Can not install Oracle 8.1.5 w/ RedHat 6.1!
I can not get Oracle 8.1.5 to install onto Linux RedHat 6.1. The
Oracle installation script generates several errors. I have
tried several attempts, using different options, but they all
generate errors.
Please help. The Oracle Installation scripts appear to be very
buggy... or perhaps they are incompatible with the standard
RedHat 6.1 release. Either way, it is very frustrating.
I have documented one of my (failed) installation attempts below.
Does anyone have any words of wisdom?
I am installing Oracle onto a Dell Latitude CPi PC w/ 128MB RAM,
a 366MHz Pentium II, and RedHat 6.1 (using the standard Linux
2.2.12-2 kernel). RedHat was installed using the standard "Gnome
Workstation" configuration.
The Oralce CD is labeled:
"Oralce 8i Enterprise Edition
Release 8.1.5
for Linux
(c) Oracle Corporation 1999"
I got this CD about one week ago at Oracle OpenWorld '99 in Los
Angeles... it should be their "latest & greatest" version so far.
1. Pre-Installation and ./runInstall
I created an "oracle" Unix account w/ groups "oinstall" (the
primary group) and "dba" (a secondary group).
I created directories /u01 through /u04, belonging to oracle.
I setup .cshrc and sourced it, containing:
umask 022
setenv DISPLAY `hostname`:0
xhost +
setenv ORACLE_BASE /u01/app/oracle
setenv ORACLE_HOME ${ORACLE_BASE}/product/8.1.5
setenv ORACLE_SID cprtest
setenv PATH ${ORACLE_HOME}/bin:${PATH}
setenv LD_LIBRARY_PATH ${ORACLE_HOME}/lib
setenv NLS_LANG US7ASCII
I downloaded jre116_v5 and installed to /usr/local/jre.
Finally, I executed (from the "oracle" Unix account):
cd /mnt/cdrom
./runInstall
Problem: I got the error (from ./runInstall):
Initializing Java Virtual Machine from /usr/local/jre/bin/jre.
Please wait...
Error in CreateOUIProcess(): -1
: Bad address
Workaround: Executed the following commands instead:
cd /mnt/cdrom/install/linux
./runIns.sh
3. runIns.sh and root.sh
I selected the following options (from ./runIns.sh):
Source: /mnt/cdrom/stage/products.jar
Destination: /u01/app/oracle/product/8.1.5
Oracle 8i Enterprise Edition 8.1.5.0.0
Typical (585MB)
Installable Components: Oralce Intelligent Agent 8.1.5.0.0
Global Database Name: cprtest.parkrussell.com
SID: cprtest
Directory for Database Files: /u02
Then (when instructed by ./runIns.sh), I attempted to execute
(from the
"root" Unix account):
cd /u01/app/oracle/product/8.1.5
./root.sh
Problem: I got the error:
"bash: ./root.sh: Permission denied"
The execute bit was not set.
Workaround: I executed:
chmod a+x root.sh
./root.sh
5. Configuration Tools
The Oracle Installer (./runIns.sh) attempted to execute:
A. Net8 Configuration Agent
B. Oracle Database Configuration Agent
Problem: The "Oracle Database Configuration Agent" failed with
the following error message:
"One or more tools have failed. It is recommended but not
required that these tools succeed for this installation.
You can now select these tools, read its details to examine
why they have failed, fix those problems, and retry them.
Or, you can click "Next" to continue."
When I selected the "Oracle Database Configuration Agent" for
more info, I got the following additional details (as the cause
of the error):
"A required command line argument is missing."
The log file
"/u01/app/oracle/oraInventory/logs/installActions.log" recorded:
"Command which is being spawned is /usr/local/jre/bin/jre
-Duser.dir=/u01/app/oracle/product/8.1.5/assistants/dbca/jlib
-classpath
/usr/local/jre/lib/rt.jar:/u01/app/oracle/product/8.1.5/jlib/ewt-3_1_10.jar:/u01/app/oracle/produc
/8.1.5/jlib/share-1_0_6.jar:/u01/app/oracle/product/8.1.5/assistants/dbca/jlib/DBAssist.jar:/u01/a
p/oracle/product/8.1.5/assistants/jlib/jnls.jar:/u01/app/oracle/product/8.1.5/assistants/jlib/ACC.
AR:/u01/app/oracle/product/8.1.5/jlib/help-3_0_7.jar:/u01/app/oracle/product/8.1.5/jlib/oracle_ice
4_03_3.jar:/u01/app/oracle/product/8.1.5/jlib/HotJavaBean.jar:/u01/app/oracle/product/8.1.5/jlib/n
tcfg.jar:/usr/local/jre/lib/i18n.jar
DBCreateWizard /createtype seed /numusers NO_VALUE /apptype
NO_VALUE /cartridges NO_VALUE /options NO_VALUE /demos NO_VALUE
/seedloc NO_VALUE /sid cprtest /orahome
/u01/app/oracle/product/8.1.5 /orabase /u01/app/oracle /dbloc
/u02 /clususer NO_VALUE /cluspswd NO_VALUE /nodeinfo NO_VALUE
/gdbName cprtest.parkrussell.com
Invalid Exit Code. The following result code will be used for
configuration tool: 1
Configuration tool Oracle Database Configuration Assistant
failed"
Workaround: There is obviously nothing I can do to fix this
problem. It appears to be an internal bug in ./runIns.sh.
Therefore, I selected "Next" and executed "dbassist" directly.
6. dbassist
I executed:
dbassist
Problem: I got the following error:
"JNLS Execution:oracle.ntpg.jnls.JNLSException
Unable to find any National Character Sets. Please
check your Oracle installation."
Workaround: Press "OK" and ignore the error.
7. dbassist (cont.)
I selected the following options:
Create database
Typical
Copy existing database files from the CD
Global Database Name: cprtest.parkrussell.com
SID: cprtest
Problem: I got the following error:
"CD-ROM drive not detected on this system.
Database not created."
(Note: I've been running the installation scripts from the
CDROM drive this entire time. "df" shows the CDROM drive
mounted on /mnt/cdrom. "ls /mnt/cdrom" works too.)
Workaround: Abort (which generated the additional error: "Unable
to create database. DBCA-00003: No CD-ROM drive detected.") and
run dbassist again, this time using different parameters.
8. dbassist, again
I executed "dbassist" again and selected the following options:
Create database
Typical
Create new database files
Hybrid
Concurrently connected users: 5
Options: Oralce interMedia, Oralce JServer, and iM demos
Global Database Name: cprtest2.parkrussell.com
SID: cprtest2
Create database now
Problem: I got the following error:
"ORA-01012: not logged on"
Workaround: Try, try again.
9. dbassist, one last time
Executed "dbassist" once more and selected the following options:
Create database
Typical
Create new database files
Hybrid
Concurrently connected users: 5
Options: Oralce interMedia, Oralce JServer, and interMedia
demos
Global Database Name: cprtest3.parkrussell.com
SID: cprtest3
Output creation script
Then, I executed (from the "oracle" Unix account):
cd /u01/app/oracle/product/8.1.5/install
setenv ORACLE_SID cprtest3
./sqlcprtest3.sh
Problem: I got the following output:
"Oracle Server Manager Release 3.1.5.0.0 - Production
(c) Copyright 1997, Oracle Corporation. All Rights Reserved.
Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production
With the Partitioning and Java options
PL/SQL Release 8.1.5.0.0 - Production
SVRMGR> SVRMGR> Connected.
SVRMGR> ORACLE instance started.
ORA-01012: not logged on
SVRMGR> 2> 3> 4> 5> 6> 7>
8> 9> CREATE DATABASE "cprtest3"
ORA-01012: not logged on
SVRMGR> Disconnected."
Workaround: Beats me.
10. sqlplus
I attempted to execute sqlplus, but got the following error
message:
"/u01/app/oracle/product/8.1.5/bin/sqlplus: Permission denied."
The execute bit was not set.
Workaround: I executed:
chmod a+x /u01/app/oracle/product/8.1.5/bin/sqlplus
sqlplus
I gave up for now... there were just too many things wrong with
this installation, starting with the very first command I was
supposed to execute (./runInstaller).
I can't fathom why Oracle's installation script has so many bugs.
Am I just doing something terribly wrong?
Please help.
nullI'm using enlightenment version 0.15.5-41, which is more recent
than the 0.15.5-37 version (containing the Oracle installer
patch) that you recommended. Unfortunately, it fails when using
this version.
I also tried installing Oracle using twm, with enlightenment
disabled. This didn't help either.
Furthermore, the errors that I'm encountering in the OUI are
not just toward the end of the installation. They happen from
the very beginning, right after I enter "./runInstall", and
continue every step of the way.
Calvin Mitchell (guest) wrote:
: Check out my thread: "Assistants Failure Toward end of Oracle
: Install" to see where i've gone with this.
: if your running Enlightenment as your window manager you need
to
: upgrade to 0.15.5-37, that will solve the OUI error.
: Let me know if you solve any of your problems.
: Chris Russell (guest) wrote:
: : I can not get Oracle 8.1.5 to install onto Linux RedHat 6.1.
: The
: : Oracle installation script generates several errors. I have
: : tried several attempts, using different options, but they all
: : generate errors.
: : Please help. The Oracle Installation scripts appear to be
very
: : buggy... or perhaps they are incompatible with the standard
: : RedHat 6.1 release. Either way, it is very frustrating.
: : I have documented one of my (failed) installation attempts
: below.
: : Does anyone have any words of wisdom?
: : I am installing Oracle onto a Dell Latitude CPi PC w/ 128MB
: RAM,
: : a 366MHz Pentium II, and RedHat 6.1 (using the standard Linux
: : 2.2.12-2 kernel). RedHat was installed using the standard
: "Gnome
: : Workstation" configuration.
: : The Oralce CD is labeled:
: : "Oralce 8i Enterprise Edition
: : Release 8.1.5
: : for Linux
: : (c) Oracle Corporation 1999"
: : I got this CD about one week ago at Oracle OpenWorld '99 in
Los
: : Angeles... it should be their "latest & greatest" version so
: far.
: : 1. Pre-Installation and ./runInstall
: : I created an "oracle" Unix account w/ groups "oinstall" (the
: : primary group) and "dba" (a secondary group).
: : I created directories /u01 through /u04, belonging to oracle.
: : I setup .cshrc and sourced it, containing:
: : umask 022
: : setenv DISPLAY `hostname`:0
: : xhost +
: : setenv ORACLE_BASE /u01/app/oracle
: : setenv ORACLE_HOME ${ORACLE_BASE}/product/8.1.5
: : setenv ORACLE_SID cprtest
: : setenv PATH ${ORACLE_HOME}/bin:${PATH}
: : setenv LD_LIBRARY_PATH ${ORACLE_HOME}/lib
: : setenv NLS_LANG US7ASCII
: : I downloaded jre116_v5 and installed to /usr/local/jre.
: : Finally, I executed (from the "oracle" Unix account):
: : cd /mnt/cdrom
: : ./runInstall
: : Problem: I got the error (from ./runInstall):
: : Initializing Java Virtual Machine from
: /usr/local/jre/bin/jre.
: : Please wait...
: : Error in CreateOUIProcess(): -1
: : : Bad address
: : Workaround: Executed the following commands instead:
: : cd /mnt/cdrom/install/linux
: : ./runIns.sh
: : 3. runIns.sh and root.sh
: : I selected the following options (from ./runIns.sh):
: : Source: /mnt/cdrom/stage/products.jar
: : Destination: /u01/app/oracle/product/8.1.5
: : Oracle 8i Enterprise Edition 8.1.5.0.0
: : Typical (585MB)
: : Installable Components: Oralce Intelligent Agent 8.1.5.0.0
: : Global Database Name: cprtest.parkrussell.com
: : SID: cprtest
: : Directory for Database Files: /u02
: : Then (when instructed by ./runIns.sh), I attempted to execute
: : (from the
: : "root" Unix account):
: : cd /u01/app/oracle/product/8.1.5
: : ./root.sh
: : Problem: I got the error:
: : "bash: ./root.sh: Permission denied"
: : The execute bit was not set.
: : Workaround: I executed:
: : chmod a+x root.sh
: : ./root.sh
: : 5. Configuration Tools
: : The Oracle Installer (./runIns.sh) attempted to execute:
: : A. Net8 Configuration Agent
: : B. Oracle Database Configuration Agent
: : Problem: The "Oracle Database Configuration Agent" failed
with
: : the following error message:
: : "One or more tools have failed. It is recommended but not
: : required that these tools succeed for this installation.
: : You can now select these tools, read its details to
examine
: : why they have failed, fix those problems, and retry them.
: : Or, you can click "Next" to continue."
: : When I selected the "Oracle Database Configuration Agent" for
: : more info, I got the following additional details (as the
cause
: : of the error):
: : "A required command line argument is missing."
: : The log file
: : "/u01/app/oracle/oraInventory/logs/installActions.log"
: recorded:
: : "Command which is being spawned is /usr/local/jre/bin/jre
: : -Duser.dir=/u01/app/oracle/product/8.1.5/assistants/dbca/jlib
: : -classpath
/usr/local/jre/lib/rt.jar:/u01/app/oracle/product/8.1.5/jlib/ewt-
: 3_1_10.jar:/u01/app/oracle/product/8.1.5/jlib/share-
1_0_6.jar:/u01/app/oracle/product/8.1.5/assistants/dbca/jlib/DBAs
sist.jar:/u01/app/oracle/product/8.1.5/assistants/jlib/jnls.jar:/
u01/app/oracle/product/8.1.5/assistants/jlib/ACC.JAR:/u01/app/ora
: cle/product/8.1.5/jlib/help-
: 3_0_7.jar:/u01/app/oracle/product/8.1.5/jlib/oracle_ice-
4_03_3.jar:/u01/app/oracle/product/8.1.5/jlib/HotJavaBean.jar:/u0
1/app/oracle/product/8.1.5/jlib/netcfg.jar:/usr/local/jre/lib/i18
: n.jar
: : DBCreateWizard /createtype seed /numusers NO_VALUE /apptype
: : NO_VALUE /cartridges NO_VALUE /options NO_VALUE /demos
NO_VALUE
: : /seedloc NO_VALUE /sid cprtest /orahome
: : /u01/app/oracle/product/8.1.5 /orabase /u01/app/oracle /dbloc
: : /u02 /clususer NO_VALUE /cluspswd NO_VALUE /nodeinfo NO_VALUE
: : /gdbName cprtest.parkrussell.com
: : Invalid Exit Code. The following result code will be used
for
: : configuration tool: 1
: : Configuration tool Oracle Database Configuration Assistant
: : failed"
: : Workaround: There is obviously nothing I can do to fix this
: : problem. It appears to be an internal bug in ./runIns.sh.
: : Therefore, I selected "Next" and executed "dbassist"
directly.
: : 6. dbassist
: : I executed:
: : dbassist
: : Problem: I got the following error:
: : "JNLS Execution:oracle.ntpg.jnls.JNLSException
: : Unable to find any National Character Sets. Please
: : check your Oracle installation."
: : Workaround: Press "OK" and ignore the error.
: : 7. dbassist (cont.)
: : I selected the following options:
: : Create database
: : Typical
: : Copy existing database files from the CD
: : Global Database Name: cprtest.parkrussell.com
: : SID: cprtest
: : Problem: I got the following error:
: : "CD-ROM drive not detected on this system.
: : Database not created."
: : (Note: I've been running the installation scripts from the
: : CDROM drive this entire time. "df" shows the CDROM drive
: : mounted on /mnt/cdrom. "ls /mnt/cdrom" works too.)
: : Workaround: Abort (which generated the additional error:
: "Unable
: : to create database. DBCA-00003: No CD-ROM drive detected.")
: and
: : run dbassist again, this time using different parameters.
: : 8. dbassist, again
: : I executed "dbassist" again and selected the following
options:
: : Create database
: : Typical
: : Create new database files
: : Hybrid
: : Concurrently connected users: 5
: : Options: Oralce interMedia, Oralce JServer, and iM demos
: : Global Database Name: cprtest2.parkrussell.com
: : SID: cprtest2
: : Create database now
: : Problem: I got the following error:
: : "ORA-01012: not logged on"
: : Workaround: Try, try again.
: : 9. dbassist, one last time
: : Executed "dbassist" once more and selected the following
: options:
: : Create database
: : Typical
: : Create new database files
: : Hybrid
: : Concurrently connected users: 5
: : Options: Oralce interMedia, Oralce JServer, and interMedia
: : demos
: : Global Database Name: cprtest3.parkrussell.com
: : SID: cprtest3
: : Output creation script
: : Then, I executed (from the "oracle" Unix account):
: : cd /u01/app/oracle/product/8.1.5/install
: : setenv ORACLE_SID cprtest3
: : ./sqlcprtest3.sh
: : Problem: I got the following output:
: : "Oracle Server Manager Release 3.1.5.0.0 - Production
: : (c) Copyright 1997, Oracle Corporation. All Rights
Reserved.
: : Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production
: : With the Partitioning and Java options
: : PL/SQL Release 8.1.5.0.0 - Production
: : SVRMGR> SVRMGR> Connected.
: : SVRMGR> ORACLE instance started.
: : ORA-01012: not logged on
: : SVRMGR> 2> 3> 4> 5> 6> 7>
: : 8> 9> CREATE DATABASE "cprtest3"
: : ORA-01012: not logged on
: : SVRMGR> Disconnected."
: : Workaround: Beats me.
: : 10. sqlplus
: : I attempted to execute sqlplus, but got the following error
: : message:
: : "/u01/app/oracle/product/8.1.5/bin/sqlplus: Permission
: denied."
: : The execute bit was not set.
: : Workaround: I executed:
: : chmod a+x /u01/app/oracle/product/8.1.5/bin/sqlplus
: : sqlplus
: : I gave up for now... there were just too many things wrong
with
: : this installation, starting with the very first command I was
: : supposed to execute (./runInstaller).
: : I can't fathom why Oracle's installation script has so many
: bugs.
: : Am I just doing something terribly wrong?
: : Please help.
null
Maybe you are looking for
-
How to switch off 'Would you like to save changes?' message
Hello. I am developing AddOn that has form of control type. This means some parameters can be specified (so editing mode must be on) but the data in database are never changed. So standard message that SAP B1 displays ( 'Would you like to save change
-
After finally getting Mainstage to work with 10.7.4 for any extended period of time, I updated to 10.7.5. Immediately after restarting, I tried to open mainstage and (after trying several more times and restarting again and again), I keep getting a
-
Material Creation date at Plant Level
Hi All, I am not able to get the date when the material was extended for a new plant . Please help me . regards, Sukant
-
Short term need of local country number.
Hi, It does happend that it would be convinent to have a short time usage of a number. I talk about much shorter then 3 months... Some times I wish I hade a number for perhapps just an hour, so that I can be reached on a local phone number in a count
-
My sister, my friend and I were all using 10.4.5 up to recently. Used to video conf on iChat all the time, never had a problem. Until 10.4.6 came out in October. Then all sorts of stuff went wrong, but mainly pop ups used to (erroneously) claim that