So, has anybody used/tried the XMLtype datatype?
Printable View
So, has anybody used/tried the XMLtype datatype?
I've had a go in Release 1:Quote:
Originally posted by julian
So, has anybody used/tried the XMLtype datatype?
http://www.oracle-base.com/Articles/...peDatatype.asp
I'll have a go in Rel 2 once I get it :)
This should sort you out I think:
GRANT EXECUTE ON SYS.XMLTYPE TO <username>;
Cheers
[Edited by TimHall on 05-20-2002 at 08:20 AM]
You can get 9i R2 "Early Release" through the following link...
you'll need your otn username and password.
http://otn.oracle.com/software/produ...tformsoft.html
Julian, just downloaded 9i Rel 2 and installed it on my old PII laptop and it's working fine. I just did a run through of my XMLType example and it was fine:Quote:
Originally posted by julian
So, has anybody used/tried the XMLtype datatype?
SQL> create user tim identified by tim default tablespace users;
User created.
SQL> grant connect, resource to tim;
Grant succeeded.
SQL> grant execute on sys.xmltype to tim;
Grant succeeded.
SQL> conn tim/tim@tsh1
Connected.
SQL> CREATE TABLE tab1
2 (col1 SYS.XMLTYPE);
Table created.
SQL> DECLARE
2 v_xml SYS.XMLTYPE;
3 v_doc CLOB;
4 BEGIN
5 -- XMLTYPE created from a CLOB
6 v_doc := '' || Chr(10) || ' <TABLE_NAME>MY_TABLE</TABLE_NAME>';
7 v_xml := sys.xmltype.createXML(v_doc);
8
9 INSERT INTO tab1 (col1) VALUES (v_xml);
10
11 -- XMLTYPE created from a query
12 SELECT SYS_XMLGen(table_name)
13 INTO v_xml
14 FROM user_tables
15 WHERE rownum = 1;
16
17 INSERT INTO tab1 (col1) VALUES (v_xml);
18
19 COMMIT;
20 END;
21 /
PL/SQL procedure successfully completed.
SQL> SET LONG 1000
SQL> SELECT a.col1.getStringVal()
2 FROM tab1 a;
A.COL1.GETSTRINGVAL()
----------------------------------------------------------------------------------------------------
<?xml version="1.0"?>
<TABLE_NAME>MY_TABLE</TABLE_NAME>
<?xml version="1.0"?>
<TABLE_NAME>TAB1</TABLE_NAME>
2 rows selected.
SQL> SELECT a.col1.extract('//TABLE_NAME/text()').getStringVal() AS "Table Name"
2 FROM tab1 a
3 WHERE a.col1.existsNode('/TABLE_NAME') = 1;
Table Name
----------------------------------------------------------------------------------------------------
MY_TABLE
TAB1
2 rows selected.
SQL>
I had to manually alter the output a little to prevent the XML tags from disappearing when viewed on the browser. Sorry if I've made any typos.
Cheers
[Edited by TimHall on 05-20-2002 at 11:42 AM]
I heard at OpenWorld that R2 has alot of XPATH enhancements.
downloading now..
Thanks Tim! So did I. I will create the database tomorrow (had to go for a drink :-))Quote:
Originally posted by TimHall
Julian, just downloaded 9i Rel 2 and installed it on my old PII laptop and it's working fine. I just did a run through of my XMLType example and it was fine:Quote:
Originally posted by julian
So, has anybody used/tried the XMLtype datatype?
Did you create the SYSTEM tablespace Locally Managed? It is possible in 9.2. I am also curious on the additions to UTL_FILE, a package I like a lot.
Hi,
I have no time right now to intall 9iR2 so I was wondering if any body tried out data segment compression?
http://otn.oracle.com/docs/products/...3a.htm#2128735
Have you noticed any performance increase (less IO) when doing full table scans on tables using data segment compression?
Mike
I tried to dl the Sun verion of Oracle 9i R2 and it didn't work. Is anyone else having the same problem?
Its very hard to download the first week it is available. I just called Oracle and got them to send me the software on CD. I'll have it in 2 days.
I just installed R2 on RedHat 7.3, surprisingly I didnt have to do any fancy stuff on .bash_profile. I only had Blackdown JDK insalled
this is my .bash_profile
it installed really fast, in about 25 minutes and pretty smooth but at the end two linking failed. One is ins_ctx which failed in 8.1.7 and I know the fix and the other is oemagentCode:# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
# Setup ORACLE environment
# export LD_ASSUME_KERNEL=2.2.5 needed for 8.1.7
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/9.2
export ORACLE_SID=dev902
export ORACLE_TERM=xterm
export ORACLE_OWNER=oracle
export TNS_ADMIN=$ORACLE_HOME/network/admin
export NLS_LANG=AMERICAN_AMERICA.UTF8
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/usr/local/java/bin
export PATH
# source /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh needed for 8.1.7
unset USERNAME
umask 022
error:
I was wondering if we should overwrite the coraenv, dbhome, oraenv files (from 8.1.7) when we run root.sh? Oh and got some legato errors when ran root.sh but since I am not planning use it...Code:Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target install of makefile /u01/app/oracle/product/9.2/network/lib/ins_oemagent.mk
Exception Severity: 1
Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target install of makefile /u01/app/oracle/product/9.2/ctx/lib/ins_ctx.mk
Exception Severity: 1
steps to fix ins_ctx.mk
i. alter the file $ORACLE_HOME/lib/sysliblist from "-ldl -lm -lpthread" to "-ldl -lm -lnsl -lpthread"
ii. did a search in a file $ORACLE_HOME/ctx/lib/env_ctx.mk for the INSO_LINK and added the $(LINKLDLIBS) to the end of the lib includes. From
"INSO_LINK = -Wl,-rpath,$(CTXLIB) $(LDLIBFLAG)m $(LDLIBFLAG)sc_fa $(LDLIBFLAG)sc_fi $(LDLIBFLAG)sc_ch $(LDLIBFLAG)sc_ut $(LDLIBFLAG)sc_ex $(LDLIBFLAG)sc_da $(LLIBCTXHX) $(LDLIBFLAG)m $(LDLIBFLAG)c $(CORELIBS)"
TO THIS --->
"INSO_LINK = -Wl,-rpath,$(CTXLIB) $(LDLIBFLAG)m $(LDLIBFLAG)sc_fa $(LDLIBFLAG)sc_fi $(LDLIBFLAG)sc_ch $(LDLIBFLAG)sc_ut $(LDLIBFLAG)sc_ex $(LDLIBFLAG)sc_da $(LLIBCTXHX) $(LDLIBFLAG)m $(LDLIBFLAG)c $(CORELIBS $(LINKLDLIBS)"
iii. $make -f ins_ctx.mk ictxhx
iv. $make -f ins_ctx.mk install
from someone in Metalink and it works in 8.1.7 not sure for 9.2 though
[Edited by pando on 05-20-2002 at 06:14 PM]