Solved

xmlschemas

Posted on 2012-03-13
12
262 Views
Last Modified: 2012-03-14
Hi,

  In the definition of a table i see this definition for a column.  

  The URL part of this definition means that for any insert/select/update/delete on this column it will need to go online to the internet ?

  So any DML operation on this table will take more time that usual because it has to go online  to this internet URL ?

  What does this part of URL means in the table definition ?

 

  ) XMLTYPE COLUMN "ADT_ADF_INFO" STORE AS CLOB  (
  TABLESPACE "my_tablespace" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
  NOCACHE LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
 XMLSCHEMA "http://url_web.com" ELEMENT "AuditTrail" ID 3288
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "my_tablespace"
  PARALLEL 4 ;
0
Comment
Question by:joe_echavarria
  • 7
  • 4
12 Comments
 
LVL 73

Assisted Solution

by:sdstuber
sdstuber earned 500 total points
Comment Utility
No

XMLSCHEMA clause forces your XMLTYPE column to be validated against the url_web.com schema you have registered using the DBMS_XMLSCHEMA package

There is a lot to this topic, far more than the scope of a single question.
I suggest reading up on it, starting in the following resources:


PL/SQL packages and types reference
http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_xmlsch.htm#i1008494

xml db developers guide
http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb05sto.htm#g1070409
0
 
LVL 1

Author Comment

by:joe_echavarria
Comment Utility
So it does not connect to the internet at any time  during any database operation ?
0
 
LVL 73

Expert Comment

by:sdstuber
Comment Utility
there will be no internet connection based on what you have posted above.

there could be triggers or other procedural steps that could create connections though.
0
 
LVL 1

Author Comment

by:joe_echavarria
Comment Utility
The URL i posted was " http://url_web.com ", which is not a valid one.

The original table definition has a valid url.  Having a valid URL does it means will need to connect to the internet for any DML operation ?
0
 
LVL 73

Expert Comment

by:sdstuber
Comment Utility
no
0
 
LVL 1

Author Comment

by:joe_echavarria
Comment Utility
Thanks, i just wanted to confirm that.

Because the server on which the database will be installed won't have internet access.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 73

Expert Comment

by:sdstuber
Comment Utility
>> the server on which the database will be installed won't have internet access.

that makes it really easy to confirm.  Just try it.
if it needed internet access it would fail.
0
 
LVL 1

Author Comment

by:joe_echavarria
Comment Utility
What happens is that any dml operation on that table always takes too much time, and i was telling it was because it has to go to the internet and connect to that url.

I wanted to be sure before.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
>>and i was telling it was because it has to go to the internet and connect to that url.

I suppose it is possible.  I've never tried this but there is a version or REGISTERSHCHEMA that accepts a URIType for the schema doc.

Look in DBA_XML_SCHEMAS for the registered schema to see if it is local to the database.
0
 
LVL 73

Assisted Solution

by:sdstuber
sdstuber earned 500 total points
Comment Utility
>>and i was telling it was because it has to go to the internet and connect to that url.

I suppose it is possible.


No, it's not....

http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb05sto.htm#i1031977

Registering an XML Schema with Oracle XML DB

The main parameters to procedure DBMS_XMLSCHEMA.registerSchema are these:

    SCHEMAURL – the XML schema URL. This is a unique identifier for the XML schema within Oracle XML DB. It is conventionally in the form of a URL, but this is not a requirement. The XML schema URL is used with Oracle XML DB to identify instance documents, by making the schema location hint identical to the XML schema URL. Oracle XML DB never tries to access a Web server identified by the specified URL.
0
 
LVL 73

Expert Comment

by:sdstuber
Comment Utility
I will repeat my caveat from above though.

If you have something other than dml against the table, (triggers or other procedural logic) then those processes "might" try to connect.  But those processes wouldn't have any technical correlation to the xdb schema registration
0
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
Comment Utility
Just to clarify on comments above.  I had originally misunderstood what slightwv was trying to say.

I thought he was referring to uri columns on the table,  not the uri version of the registersschema procedure.  (Yes, I know he was pretty explicit about it, but I still somehow misread it.)

If you want to dothat, you should actually call registeruri, and let it invoke the corresponding registerschema procedure for you.

If you do this, then your are telling Oracle to go retrieve a remote (i.e. across the internet) schema document and store it locally in your xdb repository.

Once the schema doc is stored, then, just like any other registered schema, there is no internet access required.  If you already have a registered schema, then none of this applies.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now