How to learn who is subscribed to my blog?
Oracle database development
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What is interesting here?
• Duels
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Register!

QAIX > Oracle database developmentGo to page: « previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | next »

  Top users: 
  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Модератор:
Monday, 26 March 2007
XMLType and ClassCastException:­ oracle.sql.OPAQUE Languy 10:28:53
 Hi There,

I'm trying to create a XMLType using the SELECT XMLTYPE('expr') FROM DUAL.
When I'm trying to fetch the data I'll get an ClassCastException and I'm
wondering why.

java.lang.ClassCast­Exception: oracle.sql.OPAQUE
oracle.xdb.XMLType PA.getXmlType(java.­lang.String)
PA.java:100

-- source snip --
sql = "SELECT XMLType('"+ xmlstr +"') FROM DUAL";
System.out.print(sq­l);

conn = getConnection();
stmt = conn.createStatemen­t();
rs = stmt.executeQuery(s­ql);
if (rs.next()) {
xmlObj = (XMLType)rs.getObje­ct(1); // Line 100
System.out.println(­xmlObj.toString());
}
-- source snip --

I hope any one will be helpful with this problem.

Thanks in regards,
Jess


comment 2 answer | Add comment
Saturday, 13 January 2007
trivia: origin of names for UPPER() and LOWER() Mark C. Stock 06:28:56
 it occurred to my that for some whose native tongue is not english, the
names of these two functions might seem a bit odd, as would the phrases
'upper case' and 'lower case'

so, trivia question: what's the derivation (etymology, if you will) of the
terms 'upper case' and 'lower case' from which these functions get their
name?

++ mcs


comment 17 answers | Add comment
Wednesday, 29 November 2006
NULLs Andrew Clark 00:31:07
 Hello,

I have an application whose database was recently upgraded from 7 to 9i. In
a bit of code, columns are compared that may both be null. In Oracle 7,
will two columns compare equal if they are both NULL? In 9i it seems that
they do not and I have to change it to NVL(column1) = NVL(column2).

Thanks,
Andrew
comment 30 answers | Add comment
Friday, 20 October 2006
Oracle query Amritha Datta 11:07:42
 Can anyone help me to get results from this tricky query:

Select Recnum, trim(Both From Family_ID), trim(Both From DOB)
From abc
Where File_Key = 2470 And Sub_File_Key = 1 and Reason is null and
trim(Both From Family_ID) IN
(
Select trim(Both From Family_ID) From abc Where
File_Key = 2470 And Sub_File_Key = 1 and Reason is null
And trim(Both From Family_ID) IN
(
select trim(Both From Family_ID) From abc Where
File_Key = 2470 And Sub_File_Key = 1 and reason is null
group by trim(Both From Family_ID) having count(trim(Both From
Family_ID)) > 1
)
group by trim(Both From Family_ID), trim(Both From DOB) having
count(trim(Both From DOB)) > 1
)
group by trim(Both From Family_ID), trim(Both From DOB) having
count(trim(Both From Family_ID) || trim(Both From DOB)) > 1

I know I should not use group by with out all the fields listed in
select statement. But my intension is to have Recnum based on these
conditions.

Can anyone come across this kinda issue? Is there any work arrond on
this ?


Thanks.

comment 12 answers | Add comment
Thursday, 19 October 2006
Problem is the pl/sql variable can have only 1000 bytes despite being varchar2(4000) is that a bug? Colin_lyse 15:45:53
 In article <42a4b693$0$50296$b­b4e3ad8@newscene.com­>, colin_lyse@98fgfgs.­com (colin_lyse) wrote:>using oracle 9.2.0.3.0 running on unix starfire Sun OS 2.7>
when doing a stored procedure we are getting the following errror when trying >to concatenate 2 variables (variable sqlSqtmt)> Undeclared Identifier ' sqlStmt'>
we are doing the following (code not complet took parts out for brevity)>
CREATE OR REPLACE procedure getPCBDetailResults­( txtLocation in Varchar2, >errResultMessage OUT VARCHAR2, errResultValue OUT INTEGER>)> as>sqlStmt Varchar2(2000);>sql­Stmt2 Varchar2(4000);>whe­reClause Varchar2(2000);>ord­erClause Varchar2(2000);>
begin> If txtLocation is not null and length(txtLocation)­ > 0 Then> whereClause := ' toa_equipmt.locatio­n like ''' || txtLocation > || ''' and ';> End If;>
whereClause := whereClause;> orderClause := ' order by position.equipment_­position, >oa_equipmt.apprtyp­e ';>
sqlStmt :='insert into cas_data_tmp(locati­on, manufacturer, >serial_num, equip_num, appr_type, equip_type, region, area, e_code, ' and >e2.ref_id = e1.enterprise_id and ';>
whereClause := whereClause || orderClause;>
sqlStmt2 := sqlStmt || whereClause;>
the error occurs on the last line. we get the Undeclared Identifier ' >sqlStmt2' error. we tried just using sqlStmt but got the same error >
we tried also sqlStmt := sqlStmt || ' xx '; >and got the same error.>
any ideas?!
here is the program where the 1000k problem exists

CREATE OR REPLACE procedure getPCBDetailResults­( txtLocation in Varchar2,
txtFromPCB in Varchar2,
txtToPCB in Varchar2, txtFromSampleDate in Varchar2, txtToSampleDate
in Varchar2,
txtEquipmentType in Varchar2, txtRegion in Varchar2, txtArea in
Varchar2, txtEquipNum in Varchar2,
txtManufacturer in Varchar2, txtSampleNumber in Varchar2,
errResultMessage OUT VARCHAR2,
errResultValue OUT INTEGER
)
as
sqlStmt Varchar2(4000);
sqlStmt2 Varchar2(4000);
whereClause Varchar2(2000);
orderClause Varchar2(2000);
sqlStmtFluid Varchar2(2000);
orderByFluid Varchar2(2000);
whereClauseFluid Varchar2(2000);
len number;
len_order number;


begin

orderClause := ' order by position.equipment_­position, toa_equipmt.apprtyp­e ';
len_order:= length(orderClause)­;
--this one failes it is 1042 bytes in size (982 plus the 60 bytes in the
orderclause

sqlStmt := 'insert into cas_data_tmp(locati­on, manufacturer, serial_num,
equip_num, appr_type, equip_type, region, area, e_code, equip_id,
equiptype_id, toa_equip_id, position_id) select toa_equipmt.locatio­n,
toa_equipmt.mfr as mfr, toa_equipmt.serialn­um as serialnum,
position.equipment_­position as equipment_number, toa_equipmt.apprtyp­e as
apprtype, equiptype.descripti­on as equipment_type, e1.name as region,
e2.name as area, position.pos_no as e_code, equipment.equip_id,­
equiptype.equiptype­_id, toa_equipmt.toa_equ­ip_id, position.position_i­d
from toa_equipmt, position, equipment, equiptype, enterprise E4,
enterprise E3, enterprise E2, enterprise E1where toa_equipmt.equip_i­d =
equipment.equip_id and equipment.position_­id = position.position_i­d and
equiptype.equiptype­_id = equipment.equiptype­_id and equipment.enterpris­e_id
= e4.enterprise_id and e4.ref_id = e3.enterprise_id and e3.ref_id =
e2.enterprise_id and e2.ref_id = e1.enterprise_id and ';

-- this one works it is 999 bytes in size (939 plus the 60 bytes in the
orderclause)

--sqlStmt := 'insert into cas_data_tmp(locati­on, manufacturer, serial_num,
equip_num, appr_type, equip_type, region, area, e_code, equip_id,
equiptype_id, toa_equip_id, position_id) select toa_equipmt.locatio­n,
toa_equipmt.mfr as mfr, toa_equipmt.serialn­um as serialnum,
position.equipment_­position as equipment_number, toa_equipmt.apprtyp­e as
apprtype, equiptype.descripti­on as equipment_type, e1.name as region,
e2.name as area, position.pos_no as e_code, equipment.equip_id,­
equiptype.equiptype­_id, toa_equipmt.toa_equ­ip_id, position.position_i­d
from toa_equipmt, position, equipment, equiptype, enterprise E4,
enterprise E3, enterprise E2, enterprise E1where toa_equipmt.equip_i­d =
equipment.equip_id and equipment.position_­id = position.position_i­d and
equiptype.equiptype­_id = equipment.equiptype­_id and equipment.enterpris­e_id
= e4.enterprise_id and e4.ref_id = e3.enterprise_id and e3.ref_id =
e2.enterpr ';
sqlStmt := sqlStmt || orderClause;
len:= length(sqlStmt);

-- execute immediate sqlStmt;

-- commit;

exception
when others then
errResultValue := SQLCODE;
errResultMessage := SQLERRM;
end;
/


comment 5 answers | Add comment
Which to download? Alan 14:10:01
 As I am a newbie to Oracle would like to know besides the 10g database
server, what other I need to download to look at the Oracle 10g ?

How about the something like Form 2000 or Designer 2000 ?



comment 9 answers | Add comment
Thursday, 12 October 2006
parse calls Guest 08:21:26
 All,
I'm curious why I'm getting a reparse for every execution in the
following scenario (this is a simplified example of a real problem):
select * from dual;

D
-
X
select * from dual;

D
-
X
select * from dual;

D
-
X
select parse_calls, executions from v$sqlarea where sql_text like
'select * from dual%';

PARSE_CALLS EXECUTIONS
----------- ----------
3 3

I have cursor_sharing=FORC­E and session_cached_curs­ors=20

TIA

comment 2 answer | Add comment
Wednesday, 11 October 2006
vmware Dave 14:44:07
 Now its official :-)­

http://www.oracle.c­om/technology/tech/l­inux/vmware/index.ht­ml


comment 8 answers | Add comment
Wednesday, 4 October 2006
Connection time outs Rich Campbell 20:40:46
 Version 9.2.0.4.0. Solaris 8
Occasional TNS-12535 during peak load times from client application. DB
Server is not CPU bound. No entry in listener.log. Am I hitting an OS/TCP
limit on the database server, such as listen queue size?


comment 2 answer | Add comment
Tuesday, 19 September 2006
My apologies Guest 18:26:09
 Hello,

It was brought to my attention to a member of this group that my job
positing yesterday is not welcomed in this group. To all of you who
found my posting inappropriate please accept my apologies. I was
unaware that Oracle job postings are not allowed.

Regards,
Laird Goolsby
Universal Software Corp.

comment 8 answers | Add comment
Monday, 11 September 2006
all_triggers Dw 16:11:14
 Hello

I don't want to grant the users access to views such as dba_triggers
or dba_constraints. But there is requirement that the user needs to see
the triggers owned by some other schema. Is there a way for a user to
see the data from all_triggers when he doesn't own the trigger? Any
ideas? Version 9.2.0

Thanks
D

comment 7 answers | Add comment
Thursday, 7 September 2006
ORA-01036: illegal variable name/number chandrika h via DBMonster.com 17:48:11
 Sir,
Please any one can help me about this error.I have gone through internet but
i couldn't get solution for this
error.Actually i am calling a sql procedure in c++ and i am getting this
error.I am not able to rectify this error
from past three days pls any one can help me abt this.I am embedding
procedure like this.


ProcReturnType DBProc_Receive_vali­date_boxid_duplicati­on(char* box)
{
ProcReturnType ProcReturn;
boolean retStatus = FALSE;
char p_msg[120];
ProcReturn.Status = FALSE;
char localRet[120];


GlbOracleErrorFlag = FALSE;




{
struct sqlexd sqlstm;
sqlstm.sqlvsn = 12;
sqlstm.arrsiz = 13;
sqlstm.sqladtp = &sqladt;
sqlstm.sqltdsp = &sqltds;
sqlstm.stmt = "declare localRet BOOLEAN ; BEGIN PRF01 .
CHECK_FOR_BOXID_DUP­LICATION( :GlbC\
omId , :box , localRet , p_msg ) ; IF ( localRet\
) THEN :retStatus := 1 ; END IF ; END ;";
sqlstm.iters = (unsigned int )1;
sqlstm.offset = (unsigned int )1521;
sqlstm.cud = sqlcud0;
sqlstm.sqlest = (unsigned char *)&sqlca;
sqlstm.sqlety = (unsigned short)256;
sqlstm.occurs = (unsigned int )0;
sqlstm.sqhstv[0] = (unsigned char *)GlbComId;
sqlstm.sqhstl[0] = (unsigned long )0;
sqlstm.sqhsts[0] = ( int )0;
sqlstm.sqindv[0] = ( short *)0;
sqlstm.sqinds[0] = ( int )0;
sqlstm.sqharm[0] = (unsigned long )0;
sqlstm.sqadto[0] = (unsigned short )0;
sqlstm.sqtdso[0] = (unsigned short )0;
sqlstm.sqhstv[1] = (unsigned char *)box;
sqlstm.sqhstl[1] = (unsigned long )0;
sqlstm.sqhsts[1] = ( int )0;
sqlstm.sqindv[1] = ( short *)0;
sqlstm.sqinds[1] = ( int )0;
sqlstm.sqharm[1] = (unsigned long )0;
sqlstm.sqadto[1] = (unsigned short )0;
sqlstm.sqtdso[1] = (unsigned short )0;
sqlstm.sqhstv[2] = (unsigned char *)p_msg;
sqlstm.sqhstl[2] = (unsigned long )1002;
sqlstm.sqhsts[2] = ( int )0;
sqlstm.sqhstv[3] = (unsigned char *)&retStatus;
sqlstm.sqhstl[3] = (unsigned long )sizeof(int);
sqlstm.sqhsts[3] = ( int )0;
sqlstm.sqindv[3] = ( short *)0;
sqlstm.sqinds[3] = ( int )0;
sqlstm.sqharm[3] = (unsigned long )0;
sqlstm.sqadto[3] = (unsigned short )0;
sqlstm.sqtdso[3] = (unsigned short )0;
sqlstm.sqphsv = sqlstm.sqhstv;
sqlstm.sqphsl = sqlstm.sqhstl;
sqlstm.sqphss = sqlstm.sqhsts;
sqlstm.sqpind = sqlstm.sqindv;
sqlstm.sqpins = sqlstm.sqinds;
sqlstm.sqparm = sqlstm.sqharm;
sqlstm.sqparc = sqlstm.sqharc;
sqlstm.sqpadto = sqlstm.sqadto;
sqlstm.sqptdso = sqlstm.sqtdso;
sqlcxt((void **)0, &sqlctx, &sqlstm, &sqlfpn);
if (sqlca.sqlcode < 0) sql_error("ORACLE error--\n");
}






SET_RETURN_STATUS()­;
if (GlbLogStatus==TRUE­)
{
char LogBuf[1500];
sprintf(LogBuf,"PRF­01.check_for_boxid_d­uplication(%s,%s,%s,­%s)", GlbComId,
box,localRet,p_msg)­;
Log(LogBuf);
}

ERROR_HANDLER();
return(ProcReturn);­
}
comment 12 answers | Add comment
Monday, 14 August 2006
Announcing Crapplet the ultimate cracking applet! Guest 20:50:08
 Announcing Crapplet the ultimate cracking applet.

Crack your DBA's password at www.oracleXg.com/cr­applet.com

comment 2 answer | Add comment
Problem when WIndows 2000 Server is rebooted Guest 15:26:05
 I am running Oracle 10.1.0.3 on Windows 2000 server. I have a few
database instances. I have noticed that when Windows server is
rebooted, once in a while (every 3 month or so). a database instance
will not start properly. There are no error messages in alert.log file,
however when one connects to database instance, it gives some error
message.

As I stated problem happens only once in a while and it is also not
tied to a specific database instance (I have 3 instances). Has anyone
seen similar problem and knows how to fix it in Windows 2000
environment (I cannot move to UNIX, LINUX ...).

Thanks.

comment 21 answer | Add comment
Performance problem with deleteing large number of rows from a table Faisal.Mansoor@Gmail.Com 13:47:45
 I am having performance problem with my application while deleting
large number of rows from a table.

How can I imporve performance of deleting large number of rows > 500000
from a table with the following constraints.

1. Table does not have indexes, PK etc (This should help deletion --
Hope I am right)

2. Multiple clients can issue delete quries for deleting subset of
table data. (For example table might contain 50,0000 rows for product
A. If a user loading fresh data for product A he will first delete the
previous data of product A and then upload the new data, similarly
another user might be working with product B etc and they might be
running the delete query simulataneouly)

3. User might not have DDL rights so creating a new table and deleting
the old one is not possible.

Currently we are using delete quries which is taking a lot of time.

Faisal

comment 7 answers | Add comment
10g field varchar size Guest 13:12:14
 Hi,

I apologize I dont know this but when I last designed a schema in
Oracle the max varchar2 size was 2000 characters otherwise you had to
use Long to get something larger.

I believe there are several choices for huge character or binary
fields, which require special utilities to qualify in a where clause.

My question in 10g+ is

a) What is the largest varchar field I can have without losing the
ability to qualify it in a where clause

b) Is there any restriction on using say clob for many fields on a
single table?

thanks

Tim

comment 5 answers | Add comment
XMLQuery bug? Guest 11:57:24
 The following query:

SELECT
XMLQuery('<category­>{
for $d in /categories//*[@id="CA00PE004D"]/*
let $k := ora:view("objects")­/object[category/@id =
$d/descendant-or-self::category/@id]
return <category count="{count($k)}"­ id="{$d/@id}"
text="{$d/@title}"/­>
}</category>' passing object_value returning content).getCLOBVal­()
"cats"
FROM categories;

cause "ORA-19112: java.lang.OutOfMemo­ryError". But

SELECT
XMLQuery('<category­>{
for $d in /categories//*[@id="CA00PE004D"]/*
let $k := ora:view("objects")­
return <category count="{count($k)}"­ id="{$d/@id}"
text="{$d/@title}"/­>
}</category>' passing object_value returning content).getCLOBVal­()
"cats"
FROM categories;

works well.

What's wrong??

PS. java_pool_size = 500M

Add comment
Access Active Directory data with a view Willy 11:57:07
 I'm an Oracle newbie and I've got a question concerning Active
Directory. By modifying the Oracle example script slightly I've managed

to make a PL/SQL script to retrieve the sAMAccountName and
employeenumber for users in our Active Directory.

I'd like to make these data accessible with a single view.
I now have a PL/SQL procedure which fills the table ActiveDirectory and

on this table I've build a view.
Can this be done in fewer steps? Or with only a view? Any help would be

appreciated.


The code of the procedure I've build is listed below.


Willy Tadema


SET SERVEROUTPUT ON
DECLARE


l_ldap_host VARCHAR2(256) := 'xxx';
l_ldap_port VARCHAR2(256) := 'xxx';
l_ldap_user VARCHAR2(256) := 'xxx';
l_ldap_passwd VARCHAR2(256) := 'xxx';
l_ldap_base VARCHAR2(256) := 'xxx';
l_filter VARCHAR2(256) := 'sAMAccountName=T*'­; -- Alleen
userid's die beginnen met de letter T


l_retval PLS_INTEGER;
l_session DBMS_LDAP.session;
l_attrs DBMS_LDAP.string_co­llection;
l_message DBMS_LDAP.message;
l_entry DBMS_LDAP.message;
l_attr_name VARCHAR2(256);
l_ber_element DBMS_LDAP.ber_eleme­nt;
l_vals DBMS_LDAP.string_co­llection;


TYPE t_gebruikersnaam IS TABLE OF VARCHAR2(15) INDEX BY
BINARY_INTEGER;
TYPE t_registratienr IS TABLE OF VARCHAR2(9) INDEX BY BINARY_INTEGER;



l_gebruikersnaam t_gebruikersnaam;
l_registratienr t_registratienr;
entry_index PLS_INTEGER;


BEGIN
-- Foutafhandeling activeren
DBMS_LDAP.USE_EXCEP­TION := TRUE;


-- Verbinding maken met de LDAP server.
l_session := DBMS_LDAP.init(host­name => l_ldap_host,
portnum => l_ldap_port);


l_retval := DBMS_LDAP.simple_bi­nd_s(ld => l_session,
dn => l_ldap_user,
passwd => l_ldap_passwd);


-- Haal attributen op
l_attrs(1) := 'sAMAccountName'; -- Haal USERID op
l_attrs(2) := 'employeeNumber'; -- Haal employeeNumber op
l_retval := DBMS_LDAP.search_s(­ld => l_session,
base => l_ldap_base,
scope => DBMS_LDAP.SCOPE_SUB­TREE,
filter => l_filter,
attrs => l_attrs,
attronly => 0,
res => l_message);


IF DBMS_LDAP.count_ent­ries(ld => l_session, msg => l_message) > 0
THEN
-- Ga naar de eerste entry van de geretourneerde resultaatset.
l_entry := DBMS_LDAP.first_ent­ry(ld => l_session,
msg => l_message);


entry_index := 1;


<< entry_loop >>
WHILE l_entry IS NOT NULL LOOP


-- Haal alle attributen op voor deze entry
l_attr_name := DBMS_LDAP.first_att­ribute(ld => l_session,

ldapentry => l_entry,
ber_elem =>
l_ber_element);
<< attributes_loop >>
WHILE l_attr_name IS NOT NULL AND l_attr_name
IN('sAMAccountName'­,'employeeNumber') LOOP
-- Haal alle waarden op van dit attribuut
l_vals := DBMS_LDAP.get_value­s (ld => l_session,
ldapentry => l_entry,
attr => l_attr_name);
<< values_loop >>
FOR i IN l_vals.FIRST .. l_vals.LAST LOOP
DBMS_OUTPUT.PUT_LIN­E('ATTIBUTE_NAME: ' || l_attr_name || ' =
' || SUBSTR(l_vals(i),1,­200));


IF l_attr_name='sAMAcc­ountName' THEN
l_gebruikersnaam(en­try_index) := substr(l_vals(i),1,­15);
ELSIF l_attr_name='employ­eeNumber' THEN
l_registratienr(ent­ry_index) := substr(l_vals(i),1,­9);
END IF;


END LOOP values_loop;
l_attr_name := DBMS_LDAP.next_attr­ibute(ld => l_session,

ldapentry => l_entry,
ber_elem =>
l_ber_element);
END LOOP attibutes_loop;


l_entry := DBMS_LDAP.next_entr­y(ld => l_session,
msg => l_entry);


IF (l_gebruikersnaam.c­ount < entry_index OR
l_registratienr.cou­nt <
entry_index) THEN BEGIN
IF l_gebruikersnaam.co­unt < entry_index THEN
l_gebruikersnaam(en­try_index) := null;
END IF;
IF l_registratienr.cou­nt < entry_index THEN
l_registratienr(ent­ry_index) := null;
END IF;
END;
END IF;
entry_index := entry_index + 1;


END LOOP entry_loop;
END IF;


-- Verbreek de verbinding met de LDAP server.
l_retval := DBMS_LDAP.unbind_s(­ld => l_session);
DBMS_OUTPUT.PUT_LIN­E('L_RETVAL: ' || l_retval);


-- Maak de tabel ActiveDirectory eerst leeg en voeg dan de nieuwe,
actuele records toe
--TRUNCATE TABLE ActiveDirectory;
EXECUTE IMMEDIATE 'TRUNCATE TABLE ActiveDirectory';
FORALL i IN l_gebruikersnaam.FI­RST .. l_gebruikersnaam.LA­ST
INSERT INTO ActiveDirectory VALUES (l_gebruikersnaam(i­),
l_registratienr(i))­;
COMMIT;


-- Verwijder de PL/SQL tabellen
l_gebruikersnaam.DE­LETE;
l_registratienr.DEL­ETE;


END;
/

comment 1 answer | Add comment
Where to get Oracle 10g client for Fedora5 Jortizclaver 11:28:35
 Hi,

I'm trying to get a Oracle 10g client installed on my Fedora 5 box.
I've downloaded the 10201_client_linux3­2.zip but it says Fedora is not
supported (only RHEL).

Any idea of where to get it?

Thanks in advance
Jorge

P.S: I could also work with 9 if needed

comment 3 answer | Add comment
does unique constraints hurt insert performance Guest 09:57:11
 Hi,

If I have a table which has 1 billion rows (data in each row is
relatively small), delcare one column (not the primary key column) as
unique, will this cause big problem for inserting?
Assume the inserting rate is 500/sec and the possible duplication is
0.001%.

Thanks

comment 18 answers | Add comment
Foriegn Key Question Wally 09:23:47
 All,

Database Version: 10.2.0.1
OS: XP Pro

I have a question about Foriegn Keys. Forgive me if this has been
answered before.

I have three tables which are

subject with primary_key subject_id (VARCHAR2(10)),
contact with primary_key contact_id (VARCHAR2(10)),
&
address with primary_key address_id (VARCHAR2(10))

The address table has another column called owner_id (VARCHAR2(10))
where the owner_id could be the subject_id or the contact_id, because
either the subject or the contact could have an address. Currently the
constraint is being maintained through pl/sql code.

I know that I can have one foriegn key where the address.owner_id is
linked to the subject.subject_id,­ or one foriegn key where the
address.owner_id is linked to the contact.contact_id,­ but not both.
Please correct me if I am wrong.

This will not work since the owner_id can be either the subject_id or
the contact_id.

Is there a way other than a database trigger or pl/sql code where I can
define the above relationship in the database.

Thanks for your help.

comment 6 answers | Add comment
Oracle ERP (KPI) - Performance Matrice Proficien 09:05:02
 Hi there,
One of our clients has asked us to provide an Oracle ERP
consultant for Financial module. However in a contract they are
insisting on adding an article stating, "If the perforamnce is not
satisfactory they an charge us penalty...... blah blah blah".
The consultant is a Functional consultant and he will work on AP/ GL/
FA etc. He will be supporting users also.

My question is, how the heck can we measure the candidate's
performance. I'd highly appreacite it if someone can guide me to a
SIMPLE performance matrice, which I can ask the client to fill out,
every week or so to measure the perforamance. PLEASE HELP. If you have
a better idea please dont hesitate to share. I am really looking for
some sort of Key Performance Indicator "Sheet" or something like that.

Thank you in advance.

comment 3 answer | Add comment
help with my dataguard Guest 08:59:15
 I am using 9206 on linux. I am practicing Dataguard on the same host.

Here is my initial parameter on primary site,SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
-------------------­----------------- -----------
-------------------­-----------
log_archive_dest_2 string service=stdby lgwr
reopen=60 a
ffirmSQL> show parameter standby
NAME TYPE VALUE
-------------------­----------------- -----------
-------------------­-----------
standby_archive_des­t string /archivelog/stdby
standby_file_manage­ment string auto

tnsping stdby is OK
$ tnsping stdby
TNS Ping Utility for Linux: Version 9.2.0.6.0 - Production on
09-AUG-2006 10:35:27
opyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/opt/oracle/product­/cornell/9.2/network­/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS =
(PROTOCOL = TCP)(HOST = xxxx)(PORT = 1521))) (CONNECT_DATA = (SERVER =
DEDICATED) (sid = tets)))
OK (0 msec)

And I have standby database running on the same host
export ORACLE_SID=stdby
......SQL> alter database mount standby database;
Database altered.SQL> alter database recover managed standby database disconnect;
Database altered.
But my primary database still can not see my standby database.
I am keep on getting errors
ORA-16009: remote archive log destination must be a STANDBY database

What is wrong here?

Thanks for your help

comment 3 answer | Add comment
RMAN question, wont backup archive logs because some are not there. Gs 08:52:15
 I'm (albeit) slowly changing from my tried & true OS backups to RMAN,
and have set up a 9i database via oem console to backup full database
and archivelogs, with a retention policy to delete archivelogs that have
been backed up twice. Looking at the history of the job it says failed,
it looks like the database backed up fine, but because I had to delete
old archivelogs on a weekly basis for disk space reasons the part of the
rman job that backs up archive logs looks like it fails because it is
looking for logs that are no longer there. I do have a copy of them in a
zip archive on another machine, but restoring them is no easily doable
because of disk space (lack thereof)

I was thinking about deleting the records of the logs that arent there
anymore from v$archived_log, but read somewhere once that this view
should not be tampered with.

What else can I do to fix this RMAN job so that it starts to backup
archive logs and then deletes them after X backups? I'm not that
familiar with the RMAN syntax, and nothing in the OEM wizards seem to
address this.


tia


comment 1 answer | Add comment
TRIM and database inserts/update Dereck L. Dietz 07:00:23
 In a previous series of posts it was mentioned that using TRIM during
database inserts basically doesn't trim anything.

If you have 'ABC' it doesn't trim anything and if you have 'ABC ' it
doesn't trim the two spaces in the string because it's within the quotes.

Someone brought up a question to me about whether a statement like below:

UPDATE table
SET field_a = trim(field_a);

Where field_a is originally 'ABC ' would result in the field being 'ABC'
after the update or still 'ABC '.

Thanks for any answers.


comment 3 answer | Add comment

Add new topic:

How:  Register )
 
Login:   Password:   
Comments by: Premoderation:
Topic:
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или законы РФ. Ваш ip-адрес записывается.


QAIX > Oracle database developmentGo to page: « previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | next »

see also:
glibc 2.3.2 compatibility?
Moving DB
pass tests:
see also:
HOW TO PRINT CENTER OF THE ROW FOR…
wg4545.beon.ru

  Copyright © 2001—2010 QAIX
Идея: Монашёв Михаил.
Авторами текстов, изображений и видео, размещённых на этой странице, являются пользователи сайта.
See Help and FAQ in the community support.qaix.com.
Write in the community about the bugs you have noticedbugs.qaix.com.
Write your offers and comments in the communities suggest.qaix.com.
Information for parents.
Пишите нам на .
If you would like to report an abuse of our service, such as a spam message, please .
Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .