Help with oracle with clause
suppose if i have WITH statement as
WITH a as select a.id,b.id,c.id from emp a,dep b,cep c
suppose if i want the id of emp table how can i reference it in select statement...thanks in advance
TRy this ...
/* Formatted on 10-30-2012 7:13:43 PM (QP5 v5.163.1008.3004) */
WITH xx AS (
SELECT a.id aid, b.id bid, c.id cid
FROM emp a, dep b, cep c)
SELECT x.aid FROM xx x;Please post some sample data.
Hope this Helps.
Ranit B.
Similar Messages
-
WAAS conflict with oracle (with G initiator) and citrix)
Dear all,
I am in Proof of Concept "WAAS" in one of the big Companies ,
I have a problem with implementing WAAS , there are:
1. There is Oracle data base with G initiator that encrypted traffic before send to another client or server. At first time, I force the all of acceleration of WAAS (DRE,TFO, LZ).
ex:167.103.72.46:1598 167.103.48.5:9000 10445 00:14:5e:85:77:87 F,F,F,F
after that, the traffic performance slower than before, as I know the oracle encrypted packet so the WAAS is not optimized.so how to solve this case?
(l try to set the optimizations to just TFO not DRE but it is still slow)
2.The Application citrix have same problem with oracle, the packet after accelerated by WAAS (more bigger than before).Maybe, because double header after encrypted (in WAAS and application)
3.is a Packeteer influence WAAS performance? so how to put Packeteer in WAAS POC scheme ?
l think there is better to put packeteer after WAAS (switch-WAAS-packeteer-router) ?because bandwidth influence the traffic performance between WAAS and client if there is packeteer.or are there another opinions?
I need your suggestion, problem solving, or anything that can help me.
(POC WAAS versus River bed versus Expand in this company,please give me tricks to win the competition)
Best Regards
HSNSeils,
thanks for your suggestion,
the WAAS 4.1 has been released. After reading the data sheet,
there are the sentences:
"Data-in-flight security is maintained during acceleration of Secure Sockets Layer (SSL) encrypted traffic while helping ensure that the server private keys never leave the data center.
⢠Data-at-rest security is provided by disk encryption based on the Federal Information Processing Standards (FIPS) 256-bit Advanced Encryption Standard (AES) to secure data even in the event of physical compromise."
source:
http://www.cisco.com/en/US/partner/prod/collateral/contnetw/ps5680/ps6870/data_sheet_c78-445372.html
maybe, I think WAAS is not accelerate the encrypted files/data but waas will encrypted the data with SSL and AES.
any suggestion?
(update my case:
maybe l can open the encrypted setting in oracle but the company say it will not become secure that passing traffic without encryption(maybe between client - waas can be tapped)
Thanks
Best Regards
Muhammad -
Regarding Connecting with oracle with sap netweaver developer studio
hi
i want to use oracle instead of max-db so can u
please tell me the procedure how to connect to sap netweaver developer studio and was server
byeOscar,
for WebDynpro-Projects you can create an .ear-archive in the context menu of your porject ("Create archive") that you have to deploy with SDM. BUT: webdynpro requires WebApplication Server 6.40! You cant use a webdynpro-project in your current ep60sp2-installation.
for portal applications you can export a .par-arcive in the context menu of your project ("Export...", choose "PAR file") that you can import in your portal.
you can't test your application without deploying it to a server. if you haven't got a connection to the server during developing, you have to install a portal or at least a WAS6.20(Java) & EP60SP2 or WAS640(java) & EP60SP>2 locally on your computer.
if you choose to do that, i recommend the WAS6.40(Preview) because you can then develop webdynpros, too.
kr, achim -
We’re seeing the following issue: sql - Can Oracle be forced to use the spatial index for sdo_filter in combination with an or clause? - Stack Overflow (posted by a colleague of mine) and are curious to know if this behaviour is due to a difference between standard and enterprise, or could we doing something else wrong in our DB config.?
We have also reproduced the issue on the following stacks:
Oracle SE One 11.2.0.3 (with Spatial enabled)
Redhat Linux 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
11.2.0.3.0 Standard Edition and 11.2.0.4.0 Standard Edition (both with Spatial enabled)
Microsoft Windows Server 2003R2 Standard x64 Edition
However, the SQL works fine if we try it on Oracle 11.2.0.3.0 *Enterprise* Edition.
Any help or advice would be much appreciated.
Kindest Regards,
KevinIn my experience sdo_filter ALWAYS uses the spatial index, so that's not the problem. Since you did not provide the explain plans, we can't say for sure but I think yhu is right: Standard Edition can't use the bitmap operations, and thus it'll take longer to combine the results of the two queries (because the optimizer will surely split this OR up in two parts, then combine them).
BTW: when asking questions about queries here, it would be nice if you posted the queries here as well, so that we do not have to check another website in order to see what you are doing. Plus it will probably get you more answers, because not everyone can be bothered to click on that link. It would also have been nice if you had posted your own answer on the other post here as well, because my recommendation would have been to use union all - but since you already found that out for yourself my recommendation would have been a little late. -
Help with oracle 11g pivot operator
i need some help with oracle 11g pivot operator. is it possible to use multiple columns in the FOR clause and then compare it against multiple set of values.
here is the sql to create some sample data
create table pivot_data ( country_code number , dept number, job varchar2(20), sal number );
insert into pivot_data values (1,30 , 'SALESMAN', 5000);
insert into pivot_data values (1,301, 'SALESMAN', 5500);
insert into pivot_data values (1,30 , 'MANAGER', 10000);
insert into pivot_data values (1,301, 'MANAGER', 10500);
insert into pivot_data values (1,30 , 'CLERK', 4000);
insert into pivot_data values (1,302, 'CLERK',4500);
insert into pivot_data values (2,30 , 'SALESMAN', 6000);
insert into pivot_data values (2,301, 'SALESMAN', 6500);
insert into pivot_data values (2,30 , 'MANAGER', 11000);
insert into pivot_data values (2,301, 'MANAGER', 11500);
insert into pivot_data values (2,30 , 'CLERK', 3000);
insert into pivot_data values (2,302, 'CLERK',3500);
using case when I can write something like this and get the output i want
select country_code
,avg(case when (( dept = 30 and job = 'SALESMAN' ) or ( dept = 301 and job = 'SALESMAN' ) ) then sal end ) as d30_sls
,avg(case when (( dept = 30 and job = 'MANAGER' ) or ( dept = 301 and job = 'MANAGER' ) ) then sal end ) as d30_mgr
,avg(case when (( dept = 30 and job = 'CLERK' ) or ( dept = 302 and job = 'CLERK' ) ) then sal end ) as d30_clrk
from pivot_data group by country_code;
output
country_code D30_SLS D30_MGR D30_CLRK
1 5250 10250 4250
2 6250 11250 3250
what I tried with pivot is like this I get what I want if I have only one ( dept,job) for one alias name. I want to call (30 , 'SALESMAN') or (301 , 'SALESMAN') AS d30_sls. any help how can I do this
SELECT *
FROM pivot_data
PIVOT (SUM(sal) AS sum
FOR (dept,job) IN ( (30 , 'SALESMAN') AS d30_sls,
(30 , 'MANAGER') AS d30_mgr,
(30 , 'CLERK') AS d30_clk
this is a simple example .... my real life scenario is compliated with more fields and more combinations .... So something like using substr(dept,1,2) won't work in my real case .
any suggestions get the result similar to what i get in the case when example is really appreciated.Hi,
Sorry, I don't think there's any way to get exactly what you requested. The values you give in the PIVOT ... IN clause are exact values, not alternatives.
You could do something like this to map all alternatives to a common value:
WITH got_dept_grp AS
SELECT country_code, job, sal
, CASE
WHEN job IN ('SALESMAN', 'MANAGER') AND dept = 301 THEN 30
WHEN job IN ('CLERK') AND dept = 302 THEN 30
ELSE dept
END AS dept_grp
FROM pivot_data
SELECT *
FROM got_dept_grp
PIVOT ( AVG (sal)
FOR (job, dept_grp)
IN ( ('SALESMAN', 30)
, ('MANAGER' , 30)
, ('CLERK' , 30)
;In your sample data (and perhaps in your real data), it's about as easy to explicitly define the pivoted groups individually, like this:
WITH got_pivot_key AS
SELECT country_code, sal
, CASE
WHEN job = 'SALESMAN' AND dept IN (30, 301) THEN 'd30_sls'
WHEN job = 'MANAGER' AND dept IN (30, 301) THEN 'd30_mgr'
WHEN job = 'CLERK' AND dept IN (30, 302) THEN 'd30_clrk'
END AS pivot_key
FROM pivot_data
SELECT *
FROM got_pivot_key
PIVOT ( AVG (sal)
FOR pivot_key
IN ( 'd30_sls'
, 'd30_mgr'
, 'd30_clrk'
;Thanks for posting the CREATE TABLE and INSERT statements; that really helps! -
I have the privilege of performing a very tedious task.
We have some home grown regular expressions in our company. I now need to expand these regular expressions.
Samples:
a = 0-3
b = Null, 0, 1
Expression: Meaning
1:5: 1,2,3,4,5
1a: 10, 11, 12, 13
1b: 1, 10, 11
1[2,3]ab: 120, 1200, 1201, ....
It get's even more inetersting because there is a possibility of 1[2,3]a.ab
I have created two base queries to aid me in my quest. I am using the SQL MODEL clause to solve this problem. I pretty confident that I should be able to convert evrything into a range and the use one of the MODEL clause listed below.
My only confusion is how do I INCREMENT dynamically. The INCREMENT seems to be a constant in both a FOR and ITERATE statement. I need to figure a way to increment with .01, .1, etc.
Any help will be greatly appreciated.
CODE:
Reference: http://www.sqlsnippets.com/en/topic-11663.html
Objective: Expand a range with ITERATE
WITH t AS
(SELECT '2:4' pt
FROM DUAL
UNION ALL
SELECT '6:9' pt
FROM DUAL)
SELECT pt AS code_expression
-- , KEY
-- , min_key
-- , max_key
, m_1 AS code
FROM t
MODEL
PARTITION BY (pt)
DIMENSION BY ( 0 AS KEY )
MEASURES (
0 AS m_1,
TO_NUMBER(SUBSTR(pt, 1, INSTR(pt, ':') - 1)) AS min_key,
TO_NUMBER(SUBSTR(pt, INSTR(pt, ':') + 1)) AS max_key
RULES
-- UPSERT
ITERATE (100000) UNTIL ( ITERATION_NUMBER = max_key[0] - min_key[0] )
m_1[ITERATION_NUMBER] = min_key[0] + ITERATION_NUMBER
ORDER BY pt, m_1
Explanation:
Line numbers are based on the assupmtion that "WITH t AS" starts at line 5.
If you need detailed information regarding the MODEL clause please refer to
the Refrence site stated above or read some documentation.
Partition-
Line 18: PARTITION BY (pt)
This will make sure that each "KEY" will start at 0 for each value of pt.
Dimension-
Line 19: DIMENSION BY ( 0 AS KEY )
This is necessary for the refrences max_key[0], and min_key[0] to work.
Measures-
Line 21: 0 AS m_1
A space holder for new values.
Line 22: TO_NUMBER(SUBSTR(pt, 1, INSTR(pt, ':') - 1)) AS min_key
The result is '1' for '1:5'.
Line 23: TO_NUMBER(SUBSTR(pt, INSTR(pt, ':') + 1)) AS max_key
The result is '5' for '1:5'.
Rules-
Line 26: UPSERT
This makes it possible for new rows to be created.
Line 27: ITERATE (100000) UNTIL ( ITERATION_NUMBER = max_key[0] - min_key[0] )
This reads ITERATE 100000 times or UNTIL the ITERATION_NUMBER = max_key[0] - min_key[0]
which would be 4 for '1:5', but since the ITERATION_NUMBER starts at 0, whatever follows
is repaeted 5 times.
Line 29: m_1[ITERATION_NUMBER] = min_key[0] + ITERATION_NUMBER
m_1[ITERATION_NUMBER] means m_1[Value of Dimension KEY].
Thus for each row of KEY the m_1 is min_key[0] + ITERATION_NUMBER.
Reference: http://www.sqlsnippets.com/en/topic-11663.html
Objective: Expand a range using FOR
WITH t AS
(SELECT '2:4' pt
FROM DUAL
UNION ALL
SELECT '6:9' pt
FROM DUAL)
, base AS
SELECT pt AS code_expression
, KEY AS code
, min_key
, max_key
, my_increment
, m_1
FROM t
MODEL
PARTITION BY (pt)
DIMENSION BY ( CAST(0 AS NUMBER) AS KEY )
MEASURES (
CAST(NULL AS CHAR) AS m_1,
TO_NUMBER(SUBSTR(pt, 1, INSTR(pt, ':') - 1)) AS min_key,
TO_NUMBER(SUBSTR(pt, INSTR(pt, ':') + 1)) AS max_key,
.1 AS my_increment
RULES
-- UPSERT
m_1[FOR KEY FROM min_key[0] TO max_key[0] INCREMENT 1] = 'Y'
ORDER BY pt, KEY, m_1
SELECT code_expression, code
FROM base
WHERE m_1 = 'Y'
Explanation:
Line numbers are based on the assupmtion that "WITH t AS" starts at line 5.
If you need detailed information regarding the MODEL clause please refer to
the Refrence site stated above or read some documentation.
Partition-
Line 21: PARTITION BY (pt)
This will make sure that each "KEY" will start at 0 for each value of pt.
Dimension-
Line 22: DIMENSION BY ( 0 AS KEY )
This is necessary for the refrences max_key[0], and min_key[0] to work.
Measures-
Line 24: CAST(NULL AS CHAR) AS m_1
A space holder for results.
Line 25: TO_NUMBER(SUBSTR(pt, 1, INSTR(pt, ':') - 1)) AS min_key
The result is '1' for '1:5'.
Line 26: TO_NUMBER(SUBSTR(pt, INSTR(pt, ':') + 1)) AS max_key
The result is '5' for '1:5'.
Line 27: .1 AS my_increment
The INCREMENT I would like to use.
Rules-
Line 30: UPSERT
This makes it possible for new rows to be created.
However seems like it is not necessary.
Line 32: m_1[FOR KEY FROM min_key[0] TO max_key[0] INCREMENT 1] = 'Y'
Where the KE value is between min_key[0] and max_key[0] set the value of m_1 to 'Y'
*/Of course, you can accomplish the same thing without MODEL using an Integer Series Generator like this.
create table t ( min_val number, max_val number, increment_size number );
insert into t values ( 2, 3, 0.1 );
insert into t values ( 1.02, 1.08, 0.02 );
commit;
create table integer_table as
select rownum - 1 as n from all_objects where rownum <= 100 ;
select
min_val ,
increment_size ,
min_val + (increment_size * n) as val
from t, integer_table
where
n between 0 and ((max_val - min_val)/increment_size)
order by 3
MIN_VAL INCREMENT_SIZE VAL
1.02 .02 1.02
1.02 .02 1.04
1.02 .02 1.06
1.02 .02 1.08
2 .1 2
2 .1 2.1
2 .1 2.2
2 .1 2.3
2 .1 2.4
2 .1 2.5
2 .1 2.6
2 .1 2.7
2 .1 2.8
2 .1 2.9
2 .1 3
15 rows selected.--
Joe Fuda
http://www.sqlsnippets.com/ -
Need some help about i18n on Redhat 71. with Oracle 8.1.7
Initally I used Redhat 7.0 with Oracle 8.1.7, everything had worked find until I upgrade my system to Redhat 7.1.
I have no idea about Redhat locate setting. Well, I use NLS_LANG=TRADITIONAL CHINESE_TAIWAN.ZHT16BIG5 to inital database . some character like '3\' had worked fine. Now '3\' will become '3\\' after inserting into tables.
It's a emergent event! plz help me. I will appreciate your kindness ;><BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Dragoon Chang ([email protected]):
Initally I used Redhat 7.0 with Oracle 8.1.7, everything had worked find until I upgrade my system to Redhat 7.1.
I have no idea about Redhat locate setting. Well, I use NLS_LANG=TRADITIONAL CHINESE_TAIWAN.ZHT16BIG5 to inital database . some character like '3\' had worked fine. Now '3\' will become '3\\' after inserting into tables.
It's a emergent event! plz help me. I will appreciate your kindness ;><HR></BLOCKQUOTE>
sorry ... I make a big mistake ... :)
After directlly connecting with sqlplus, I find out it's ok to use sql command.
well, The problem comes with PHP ...
I will try out the php. -
Help with Oracle Report Builder and SQL Server2000
Hey guys,
I just installed it Oracle Developer Suite10g with Report Builder and I am trying to use Report builder and wants to connect with SQL Server 2000. The problem that I am running in to is SQL Server 2000 i have is Window Authentication so Does not required to enter user name and password. So how can i connect my report builder to SQL server or is it possible to connect Report builder to SQL server?
Also, I want to create small practice version of database in Oracle how do i do it? what i mean by that is I installed trial version or Oracle developer 10g from www.oracle.com and now trying to get some knowledge with oracle. Could any one can give me some direction in this matter please.
Thank You
KeyHave a look at the reports help for the purpose header and trailer sections. Here is an exert:
"Report sectioning enables you to define multiple layouts in the same report, each with a different target audience, output format, page layout, page size, or orientation. You can define up to three report sections, each with a body area and a margin area: the names of the sections are Header, Main, and Trailer. By default, a report is defined in the Main section. In the other sections, you can define different layouts, rather than creating multiple separate reports. If you wish, you can use the margin and body of the Header and Trailer sections to create a Header and Trailer page for your reports." -
Transfer Of Data from Sap to Oracle with the help of Enterprise Services.
Hello,
We want to transfer data from Sap to Oracle using standard Enterprise Services.Some fields were not available in the existing standard Enterprise Services,so we have enhanced the existing Services by writing code inside BADI available with Enterprise Services.Rest of the fields we have mapped with the existing fields available in standard Enterprise Services.But,the Oracle people want to fetch all data from Sap without entering any input as a mandatory field in the Enterprise Services.The existing standard Enterprise Services require to enter any field as mandatory and are not accepting the range in input for multiple records.e.g.All enterprise Services related to Sales Orders are displaying only one sales Order.We have searched all Enterprise Services for Sales Order(related to reading of data),but not able to find service which would display mutiple records without entering any input.ECC_SALESORDER009QR is the only service which is displaying multiple records without entering any input,but the required fields are not available in this service.So,kindly suggest what we need to do further.
1.Should we go for customization of services completely,so that it would fulfil our requirement.
2.Are there standard Enterprise Services exists which would we give us data in range(all records).
If they exists,please specify the names of Services for reading Purchase Order,Production Order,BOM etc.
Thanks & Regards,
Divya.Hi Vaibhav,
Let me tell you the objective in detail.
Objective.
To develop a package solution which will work as a bridge between Oracle APS and SAP system so that customers using SAP will be able to use advantages of Oracle APS for their planning needs.
This will consist of following major components:
OA Templates is an Oracle utility to load data from any legacy system to Oracle APS using standard flat files.
Oracle has developed an Application Integration Architecture which is a standard architecture used for integration of Oracle products with other systems.
Enterprise services is an SAP utility to communicate with SAP.
AIA canonicals are standard canonicals developed by Oracle where we have to map data fields from destination system (Oracle APS) and source system (SAP)
Fusion middleware is being used to develop application interfaces following AIA standards.
Tasks at stake:
Mapping of Oracle APS fields and SAP Enterprise Service fields to AIA canonicals
Technical work of developing middleware using Oracle Fusion
From Sap side,we have to map fields which we have received from Oracle with the help of Enterprise Services,rest consumption of these services is done by Oracle guys.So,suggest is there enterprise services available which would give us multiple records .
Thanks & Regards,
Divya. -
[10g] Need help with order by clause in hierarchical query
I have the following sample data:
CREATE TABLE bill_test1
( parent_part CHAR(25)
, child_part CHAR(25)
, line_nbr NUMBER(5)
, qty_per NUMBER(9,5)
INSERT INTO bill_test1 VALUES ('ABC-1','ABC-10',100,1);
INSERT INTO bill_test1 VALUES ('ABC-1','ABC-20',200,2);
INSERT INTO bill_test1 VALUES ('ABC-1','ABC-30',300,3);
INSERT INTO bill_test1 VALUES ('ABC-1','HARDWARE-1',401,10);
INSERT INTO bill_test1 VALUES ('ABC-1','HARDWARE-2',402,5);
INSERT INTO bill_test1 VALUES ('ABC-10','ABC-155',100,2);
INSERT INTO bill_test1 VALUES ('ABC-10','HARDWARE-1',200,1);
INSERT INTO bill_test1 VALUES ('ABC-155','RAW-2',100,4.8);
INSERT INTO bill_test1 VALUES ('ABC-155','HARDWARE-3',200,3);
INSERT INTO bill_test1 VALUES ('ABC-20','RAW-1',100,10.2);
INSERT INTO bill_test1 VALUES ('ABC-30','RAW-3',100,3);And the query below gives me exactly what I want, in the order I want it. However, I am wondering if there is a way to get this order without creating the SEQ column, since I don't need it in my results
SELECT part_nbr
, parent_part
, child_part
FROM (
SELECT CONNECT_BY_ROOT b.parent_part AS part_nbr
, b.parent_part
, b.child_part
, SYS_CONNECT_BY_PATH(b.line_nbr,' ') AS seq
FROM bill_test1 b
, dual
CONNECT BY parent_part = PRIOR child_part
WHERE part_nbr = 'ABC-1'
ORDER BY seq
Results of above query, except with SEQ included in SELECT (just to show what I'm sorting off of):
PART_NBR PARENT_PART CHILD_PART SEQ
ABC-1 ABC-1 ABC-10 100
ABC-1 ABC-10 ABC-155 100 100
ABC-1 ABC-155 RAW-2 100 100 100
ABC-1 ABC-155 HARDWARE-3 100 100 200
ABC-1 ABC-10 HARDWARE-1 100 200
ABC-1 ABC-1 ABC-20 200
ABC-1 ABC-20 RAW-1 200 100
ABC-1 ABC-1 ABC-30 300
ABC-1 ABC-30 RAW-3 300 100
ABC-1 ABC-1 HARDWARE-1 401
ABC-1 ABC-1 HARDWARE-2 402Hi,
As long as there's only one root, you can say ORDER SIBLINGS BY, but you can't do that in a sub-query (well, you can, but usually there's no point in doing it in a sub-query). If the CONNECT BY is being done in a sub-query, there is no guarantee that the main query will preserve the hierarchical order that the sub-query provides.
The query you posted doesn't require a suib-query, so you can say:
SELECT CONNECT_BY_ROOT b.parent_part AS part_nbr
, b.parent_part
, b.child_part
--, SYS_CONNECT_BY_PATH(b.line_nbr,' ') AS seq
FROM bill_test1 b
WHERE CONNECT_BY_ROOT b.parent_part = 'ABC-1'
CONNECT BY parent_part = PRIOR child_part
ORDER SIBLINGS BY b.line_nbr
;I said the query you posted doesn't require a sub-query. It also doesn't require dual, so I suspect what you posted is a simplification of what you're really doing, and that may need a sub-query. In particular, if you intend to GROUP BY part_nbr, then you need the sub-query. We can repeat the CONNECT_BY_ROOT expression in the WHERE clause (or, now that I think about it, use a START WITH clause instead of WHERE), but, for some reason, we can't use CONNECT_BY_ROOT in a GROUP BY clause; we need to compute CONNECT_BY_ROOT in a sub-query, give it a name (like part_nbr), and GROUP BY that column in a super-query.
This assumes that there is only one root node. ORDER SIBLINGS BY means just that: children of a common parent will appear in order, but the root nodes, who have no parents, will not necessarily be in order.
Here's what I meant by using START WITH instead of WHERE:
SELECT CONNECT_BY_ROOT b.parent_part AS part_nbr
, b.parent_part
, b.child_part
--, SYS_CONNECT_BY_PATH(b.line_nbr,' ') AS seq
FROM bill_test1 b
START WITH b.parent_part = 'ABC-1'
CONNECT BY parent_part = PRIOR child_part
ORDER SIBLINGS BY b.line_nbr
;This should be much more efficient, because it narrows down the results before you waste time getting their descendants.
Using a START WITH clause here is analagous to me sending you an e-mail, saying "Come to a meeting a my office at 3:00."
Using a WHERE clause here is analagous to me sending an e-mail to everyone in the company, saying "Come to a meeting a my office at 3:00", and then, as people get here, telling everyone except you that they can go back.
ORDER SIBLINGS BY was introduced in Oracle 9.
Edited by: Frank Kulash on Dec 9, 2010 2:39 PM
Added version with START WITH clause -
Help for getting connection with oracle database
Hello,
i have a problem to connect my java program with oracle databse.
i have oracle 8 release. i tried all my best to connect but i
can't. please help me. whenever i compile JdbcCheckup.java file
which is distributed with oracle 8 release, it compile successfully.
but whenever i run JdbcCheckup class file then it will generate an
exception and that is -
Exception in thread "main" java.lang.ClassNotFoundException:
oracle.jdbc.driver.OracleDriver
at java.lang.class.forname0(native method)
at java.lang.class.forname(unknown source)
and some other error message.
But, by following yours given instruction, first, i unzip CLASSES111.zip
in file which is distributed with oracle 8 realease in jdbc subdirectory
into c:\temp directory and then run oracle installer(setup.exe) and point
the installer to c:\temp and then i install the oracle JDBC drivers(beta)
7.3.3.1.3 from the jdbc subfolder into oracle installer by selecting
win95.prd for jdbc subfolder.
After that i write into my autoexec.bat file,
path d:\jdk\lib;d:\jdk\bin;c:\windows\command;C:\temp\BIN;c:\temp\jdbc\lib\classes111.zip
and then i restart the machine and the i complile and run JdbcCheckup file
But, i can't recognize my error to define class path or installing the
driver. please help me in details so that i overcome this problem.
because i am student of B.sc. in CIS of final year. i need to submit
my project within some days. please reply me as early as possible.
thanks
hemonto
email - [email protected]path d:\jdk\lib;d:\jdk\bin;c:\windows\command;C:\temp\BIN;c:\temp\jdbc\lib\classes111.zipYou've added classes111.zip to your PATH, not your CLASSPATH.
Add it to your CLASSPATH using:
set CLASSPATH=%CLASSPATH%;c:\temp\jdbc\lib\classes111.zip
then try to compile/run again. -
Help how to connecting Oracle SQL Developer 3.0 with Oracle Database 11g
Hello,
I'm new in oracle developer yesterday i setup in my laptop database 11g the last version (11.2.0.1.0), well i follow steps still i got succeed to install, and i got my local host URL and i test my user name and password work very well, my problem now is i try to connect database 11g using Oracle SQL Developer 3.0 (3.0.04.34) but always filed and with my little experience i don't know where the wrong. as i said i test database after finish install is work fine the my URL is https://Ahmed-HP:1158/em and i test my username and password that i already set before is enter normal in my local database, please i need help to know how i connect database with Oracle SQL Developer 3.0 (3.0.04.34).
Thanks,885173 wrote:
EdStevens, thanks for your quick answer, sorry for my explain was doesn't clear, i open oracle sql developer and choose new connection i set connection name system_orcl username:system password:*i set my password that i create when i setup database*
-Now the link that i got after finish install database is https://Ahmed-HP:1158/em so i have question about this point Hostname and port if the link to access database is this https://Ahmed-HP:1158/em so this mean i typing at Hostname:localhost and port:1158 ?
because the message when i test connection always is filed and I'm sure i typing username and password and SID:orcl as i set when install database.port 1158 is what the dbcontrol (Oracle Enterprise Manager) is listening on. OEM is NOT the database. As far as the database is concerned, OEM is "just another client".
Actually, the database doesn't listen for requests on any port. There is another process, the "listener" that listens for requests to connect to the database. Typically, it listens on port 1521. You should have a tnsnames.ora file set up to resolve a connection request to the correct host. You can read more on this at http://edstevensdba.wordpress.com/2011/02/09/sqlnet_overview/ -
Help with Oracle 9i/10g on RedHat 4?
If anybody can help would be greatly appreciated...
I get the same error with Oracle 9i & 10g when installing on Red Hat Fedora 4, it's java related...
Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2007-03-16_01-09PM/jre/lib/i386/libawt.so: connat restore segment prot after reloc: Permission Denied
Red Hat Fedora is weak on java, it only has the Java 1.4 JRE installed. I tried to upgrade to Sun's JRE 6 but got dependency errors.
JonRed Hat Fedora 4Does not exist.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2007-03-16_01-09PM/jre/lib/i386/libawt.so: connat restore segment prot after reloc: Permission DeniedSolution 1: Modify /etc/selinux/config and change value of SELINUX to "disabled" and reboot computer.
Solution 2: Upgrade selinux-policy-targeted-1.25.2-4.noarch.rpm (Use command: "yum upgrade selinux-policy-targeted")
Red Hat Fedora is weak on java, it only has the Java 1.4 JRE installed. I tried to upgrade to Sun's JRE 6 but got dependency errors.??? OUI does not have to do with external JRE.
Oracle Installation comes with bunled JRE.
If you are using Fedora then you might consider these articles useful:
http://ivan.kartik.sk/oracle/install_ora9_fedora.html
http://ivan.kartik.sk/oracle/install_ora10gR2_fedora.html -
Help on CachedRowSet with setDataSourceName for Oracle needed
Hello users,
I am using WL6.1. and SUN's CachedRowSet. It works fine with setURL and it is very
fast with Oracle's oci thin driver. One more time for BEA people: oracle.jdbc.driver.OracleDriver
is more than 3 times faster than weblogic.jdbc.oci.Driver. Of course when I do setURL,
it bypasses WL and go directly to the database. And it is not using any connection
pool manager such as WL.
I would like to use WL's datasource. However, the problem is when I do CachedRowSet.setDataSourceName(jndiname)
with proper JNDI name, Sun's CachedRowset could not figure out what WLInitialContextFactory
is (it must have its own hard-coded context factory which I don't know what it is
therefore it can not create a connection from it). The exception thrown says "(JNDI)
Unable to connect".
Can anyone tell me how to make it work? (How to use setDataSourceName for CachedRowSet
for WL). The key is what ContextFactory to use.
Thanks in advance.
L.W.X.I am assuming there is some reverse proxy web server with OAM WebGate which is fronting the tomcat and JBoss servers. Also, assuming you are using FQDNs throughout.
Is the ObSSOCookie sent when you access the external applications after logging into portal? It should help to look through the HTTP headers. Also, it could be an issue with authentication levels/IP validation failure - these should show up in the WebGate logs.
-Vinod -
Hi,
I need some help... if someone can help its great.
I need to make a statement in Oracle SQL that read data from a file and insert in a Oracle Database ... if someone can show me the syntax of it i appreciate..
ThanksOkay, I see you followed the advice in that other thread and started a new post for you question. Congratulations. Your next lesson in forum etiquette is to give your posts a more relevant subject. Pretty much everybody who posts here needs help with oracle; if they need help with cooking catfish they've come to the wrong place.
It that other thread I suggested using SQL*Loader or External Tables might be a more suitable solution. Find out more.
Cheers, APC
Maybe you are looking for
-
I've been using Firefox since version 1 and it's always been my #1 web browser of choice. Since version 4, Firefox has become my #3 browser of choice, behind Safari & Chrome. I would like FF to go back to being #1, because frankly FF 4 & FF 5 have be
-
Adobe acrobat XI pro- reinstall -S/N provided is valid but qualifying product not found
installing on 64 bit computer with all security off and cookies allowed i have all ids,s/n, etc. - original purchasor
-
Business Objects and Oracle 10
Post Author: DQUINTON CA Forum: Deployment Currently using a deployment of Business Objects 5.1.6 with an Oracle 8 data source. We are considering using a data source that is Oracle 10 , does anyone know if our version of business objects is compatib
-
Received a mail message on my iPhone and next toit there is a red circle with a blue dot inside it. Normal messages have a solid blue dot when unread. What does the red circle with blue dot mean?
-
Lion reboots after waking from sleep mode
Since Lion I sometimes get the following issue: When waking my Macbook Pro (older Macbook Pro 15" 2.4 GHz Intel Core 2 Duo, 4 GB Ram, Mac OS 10.7.1) it will restart (like hard restart) all the programs that were running at the moment I put it to slee