Relational Database & CFM Issues
Issue: I currently have a table in a database that is set up
as such:
1st Column Lists Company Names Following columns lists an a
short hand edition of the type of business each company does in
each state. i.e. In Illnois Comany A provide Type Q Services in
Arkansas Type R etc..
Based on a user selection of a particular state how can I get
the list of CompanyNames and only the selected states information
to display on the page?
CompanyName I IL I AR I AL I CO I
Company A Q R R L
Company B L R Q Q
Company C R R L L
Company D Q L Q Q
Thanks,
P
The database layout has to be updated to do what you want
done.
Rules of Data
Normalization
Table: Companies
CompanyID [ integer ] [primary key] (auto)
CompanyName
Table: BusinessTypes
BusinessTypeID [ integer ] [primary key] (auto)
BusinessType [ varchar ]
Table: CompanyBusinessTypes
CompanyID [ Foreign Key: Companies.CompanyID ]
State [ char(2) ]
BusinessTypeID [ Foreign Key: BusinessTypes.BusinessTypeID ]
This layout allows you to scale up to infinite associations
between companies, states and business types.
SELECT CompanyID, BusinessTypeID FROM CompanyBusinessTypes
WHERE State = '#state#'
Similar Messages
-
Essbase as a source in OBIEE 11g and using lookup to Relation database
Hello All,
We are trying to implement Essbase as primary source for our obiee 11g repository and using relational database as secondary source of data.
I was using a lookup functionality in repository to lookup value from one of the Essbase's Dimension's attribute to relational database, however, there is error when testing this in OBIEE Dashboards.
And tried to look this error in support.oracle and googled it but was not able to find anything on it.
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 46008] Internal error: File server\Query\Src\SQLookupUtility.cpp, line 145. (HY000)
Have you had any such issue and how can we pass this issue?
I am trying to find if there are any quick resolution before going to oracle support.
TIA.
ParishIs Essbase 11.1.1.3 supported as a source for OBIEE 11g?From the certification matrix (http://www.oracle.com/technetwork/middleware/bi-enterprise-edition/bi-11gr1certmatrix-166168.xls) we can see that only Essbase 9.3.3+ and 11.1.2+ are supported, not 11.1.1.3
Paul -
JDBC for non-relational Databases.
Hi All,
correct me if I am wrong in my understanding,
1. JDBC are a set of specifications (as interfaces etc..) which each
vendor is expected to provide implementation.
2. JDBC is for relationsla databases only (like oracle,MySQL etc..) it
does not take into account the access to non-relational databases.
3. If 2 is true, is there an equivalent of JDBC for non-relational
databases?
TIA.1. JDBC are a set of specifications (as interfaces etc..) which each
vendor is expected to provide implementation.
Broadly speaking, yes. It doesn't have to be the vendor that provides the implementation, and an ODBC driver (to be used via the JdbcOdbc bridge) is adequate if a native JDBC driver is not available.
2. JDBC is for relationsla databases only (like oracle,MySQL etc..) it
does not take into account the access to non-relational databases.
It expects tabular results. Aside from that I don't think it mandates anything about the design of the underlying system. Certainly it's entirely agnostic about syntactic issues.
For example, it can talk to Excel spreadsheets, via the JdbcOdbc bridge, and Excel is by no stretch of the imagination a relational database. IMS is not a relational database, but that has a JDBC driver.
3. If 2 is true, is there an equivalent of JDBC for non-relational
databases?
2 is not true, and I'm not aware of any "non relational" database connection standard, probably for this very reason. There may well be vendor specific tools for talking to some systems. -
Database consistency issue..
Hi.
SCCM 2012 English, RTM
For unknown reason the DR link broke between CA and primary.
It says Site Replication status both way Active, but data replication is mixed. Parent to child Global data - failed and child to parent site data failed. Child to parent global - Active. Replication link analyzer performs several checks and then informs
- Database consistency issues detected for site XXX. (parent). Skiping rule - shows different replication groups which are failed. I tried to replicate those, but nothing changed.(according to following article last step)
http://blogs.msdn.com/b/minfangl/archive/2012/05/16/tips-for-troubleshooting-sc-2012-configuration-manager-data-replication-service-drs.aspx
Any more ideas?Now i have read more about DRS and SCCM 2012 and get in state where 2 from 3 replications are active.
Mainly with puting relevatnt pub files to RCM.BOX. But global data replication from CAs to PRI is still failed. No idea ....
More related articles:
http://blogs.technet.com/b/sudheesn/archive/2012/10/21/drs-initialization-in-configuration-manager-2012.aspx
http://anoopcnair.com/2012/06/20/sccm-configmgr-2012-site-to-site-replication-sql-data-replication-service-replication-configuration-management-sql-service-broker-replication-groups-and-manual-sync/
And one more thing - do not know it is related or not
Severity Type Site code Date / Time System Component Message ID Description
Error Milestone XXX 12/14/2012 10:34:29 AM server.domain.local SMS_POLICY_PROVIDER 620 Microsoft SQL Server reported SQL message 547, severity 16: [23000][547][Microsoft][SQL Server Native Client 10.0][SQL Server]The INSERT
statement conflicted with the FOREIGN KEY constraint "ResPolicyMap_PolicyAssignment_FK". The conflict occurred in database "CM_XXX", table "dbo.PolicyAssignment", column 'PADBID Please refer to your Configuration Manager documentation, SQL
Server documentation, or the Microsoft Knowledge Base for further troubleshooting information.
It is jaming replication ? and how fix DB inconsistency detected by Replication Link analyzer ? -
Visualization of Normalization Processes in Relational Database
What are the current issues on Visualization of Normalization Processes? Of what use could it be to Relational Database problems?
What are the current issues on Visualization of
Normalization Processes? Of what use could it be to
Relational Database problems?You have made two pots, and both are database questions. Haven't you noticed that this is a java forum?
/Kaj -
Migrating HP SIM related databases to a new database server
Greetings,
I'm working on a migration task for our HP SIM to a new database server (the application and services will reside on the original server).
Migrating the Insight_v50_0_xxx database and redirecting the server to point the the new database was no problem and HP SIM runs along just fine.
There are still some related databases that I haven't moved yet, and I've searched all over the web to get some documentation on the matter, but found none.
The databases and related services are the following.
PMP_V5_0 - PMP Services
hpvmmsqldb - Virtual Machine Management
I guess I could do like I did with the Insight_v50_0_xxx , take a backup and restore it on the new server and then change the configuration files to point to the new one. The big issue is that I can't seem to find any configuration files for these services.
Also I've run into something called mx services, and the same here. I have no idea where these points.
Any HP SIM savvy technician out there that think they can help me out?
1. Product: HP SIM and related services
2. Operating System: Windows Server 2008 R2
Best regards,
KarlOld topic but in case someone is searching...
PMP database uses an ODBC connection. Easy to reconfigure.
HPVMMDB uses a JDBC configuration file in the \Program Files\HP\Insight Control Virtual Machine Management\Bin folder called hpvmmdb.conf. -
Urgent help needed; Database shutdown issues.
Urgent help needed; Database shutdown issues.
Hi all,
I am trying to shutdown my SAP database and am facing the issues below, can someone please suggest how I can go about resolving this issue and restart the database?
SQL> shutdown immediate
ORA-24324: service handle not initialized
ORA-24323: value not allowed
ORA-01089: immediate shutdown in progress - no operations are permitted
SQL> shutdown abort
ORA-01031: insufficient privileges
Thanks and regards,
IqbalHi,
check SAP Note 700548 - FAQ: Oracle authorizations
also check Note 834917 - Oracle Database 10g: New database role SAPCONN
regards,
kaushal -
Web Analysis Report prompted for relational database login
We have given access to the WA reports and everything works fine in general. One of the user trying to open same report(s) document(s) via Workspace and its getting prompted with relational database login? I have verified for the access and everything seems to be fine.
I do not know the reason for this. Can anyone help me? Thanks.From the forums, i got the below MAXL commands to sync the user access :
alter system resync sss; --> this command will sync all the users, groups.
alter group <group name> sync security with all application; --> This can be used to individually sync the required group
alter user <user name> sync security with all application; --> This can be used to individually sync the required user
Will check it up with user on any change in her access.
Thanks,
Praveen. -
Not able to create XML from an existing relational database
Hi,
I am trying to create and xml from an existing relational database. I am not able to get any XML data, I receive "XMLTYPE()" as the result.
Here's the query -
SQL> select o.order_id, XMLELEMENT("order", XMLATTRIBUTES(o.order_id as ID)) AS "result" from order_
info o where order_id=2793;
ORDER_ID
result()
+2793+
XMLTYPE()
I was expecting to get +<order id=2793 />+ instead of XMLTYPE().
I am using -
SQLPlus: Release 9.0.1.0.1*
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
I have also run some checks to confirm XML DB installation -
SQL> select 1 from all_users where username = 'XDB';
+1+
+1+
SQL> desc RESOURCE_VIEW;
Name Null? Type
RES SYS.XMLTYPE
ANY_PATH VARCHAR2(4000)
RESID RAW(16)
I think, I have something wrong with installation or configuration.
Any idea about what have I done wrong here?Works fine now. Got the result "<order ID="2793"></order>".
Thanks. :-) -
Insert XML file into Relational database model - no XMLTYPE!
Dear all,
How can I store a known complex XML file into an existing relational database WITHOUT using xmltypes in the database ?
I read the article on DBMS_XMLSTORE. DBMS_XMLSTORE indeed partially bridges the gap between XML and RDBMS to a certain extent, namely for simply structured XML (canonical structure) and simple tables.
However, when the XML structure will become arbitrary and rapidly evolving, surely there must be a way to map XML to a relational model more flexibly.
We work in a java/Oracle10 environment that receives very large XML documents from an independent data management source. These files comply with an XML schema. That is all we know. Still, all these data must be inserted/updated daily in an existing relational model. Quite an assignment isn't it ?
The database does and will not contain XMLTYPES, only plain RDBMS tables.
Are you aware of a framework/product or tool to do what DBMS_XMLSTORE does but with any format of XML file ? If not, I am doomed.
Cheers.
Luc.
Edited by: user6693852 on Jan 13, 2009 7:02 AMIn case you decide to follow my advice, here's a simple example showing how to do this.. (Note the XMLTable syntax is the preferred approach in 10gr2 and later..
SQL> spool testase.log
SQL> --
SQL> connect / as sysdba
Connected.
SQL> --
SQL> set define on
SQL> set timing on
SQL> --
SQL> define USERNAME = XDBTEST
SQL> --
SQL> def PASSWORD = XDBTEST
SQL> --
SQL> def USER_TABLESPACE = USERS
SQL> --
SQL> def TEMP_TABLESPACE = TEMP
SQL> --
SQL> drop user &USERNAME cascade
2 /
old 1: drop user &USERNAME cascade
new 1: drop user XDBTEST cascade
User dropped.
Elapsed: 00:00:00.59
SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASS
ORD
2 /
old 1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &
ASSWORD
new 1: grant create any directory, drop any directory, connect, resource, alter session, create view to XDBTEST identified by XDB
EST
Grant succeeded.
Elapsed: 00:00:00.01
SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
2 /
old 1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
new 1: alter user XDBTEST default tablespace USERS temporary tablespace TEMP
User altered.
Elapsed: 00:00:00.00
SQL> connect &USERNAME/&PASSWORD
Connected.
SQL> --
SQL> var SCHEMAURL varchar2(256)
SQL> var XMLSCHEMA CLOB
SQL> --
SQL> set define off
SQL> --
SQL> begin
2 :SCHEMAURL := 'http://xmlns.example.com/askTom/TransactionList.xsd';
3 :XMLSCHEMA :=
4 '<?xml version="1.0" encoding="UTF-8"?>
5 <!--W3C Schema generated by XMLSpy v2008 rel. 2 sp2 (http://www.altova.com)-->
6 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xdb:storeVarrayAsTable="true">
7 <xs:element name="TransactionList" type="transactionListType" xdb:defaultTable="LOCAL_TABLE"/>
8 <xs:complexType name="transactionListType" xdb:maintainDOM="false" xdb:SQLType="TRANSACTION_LIST_T">
9 <xs:sequence>
10 <xs:element name="Transaction" type="transactionType" maxOccurs="unbounded" xdb:SQLCollType="TRANSACTION_V"
>
11 </xs:sequence>
12 </xs:complexType>
13 <xs:complexType name="transactionType" xdb:maintainDOM="false" xdb:SQLType="TRANSACTION_T">
14 <xs:sequence>
15 <xs:element name="TradeVersion" type="xs:integer"/>
16 <xs:element name="TransactionId" type="xs:integer"/>
17 <xs:element name="Leg" type="legType" maxOccurs="unbounded" xdb:SQLCollType="LEG_V"/>
18 </xs:sequence>
19 <xs:attribute name="id" type="xs:integer" use="required"/>
20 </xs:complexType>
21 <xs:complexType name="paymentType" xdb:maintainDOM="false" xdb:SQLType="PAYMENT_T">
22 <xs:sequence>
23 <xs:element name="StartDate" type="xs:date"/>
24 <xs:element name="Value" type="xs:integer"/>
25 </xs:sequence>
26 <xs:attribute name="id" type="xs:integer" use="required"/>
27 </xs:complexType>
28 <xs:complexType name="legType" xdb:maintainDOM="false" xdb:SQLType="LEG_T">
29 <xs:sequence>
30 <xs:element name="LegNumber" type="xs:integer"/>
31 <xs:element name="Basis" type="xs:integer"/>
32 <xs:element name="FixedRate" type="xs:integer"/>
33 <xs:element name="Payment" type="paymentType" maxOccurs="unbounded" xdb:SQLCollType="PAYMENT_V"/>
34 </xs:sequence>
35 <xs:attribute name="id" type="xs:integer" use="required"/>
36 </xs:complexType>
37 </xs:schema>';
38 end;
39 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
SQL> set define on
SQL> --
SQL> declare
2 res boolean;
3 xmlSchema xmlType := xmlType(:XMLSCHEMA);
4 begin
5 dbms_xmlschema.registerSchema
6 (
7 schemaurl => :schemaURL,
8 schemadoc => xmlSchema,
9 local => TRUE,
10 genTypes => TRUE,
11 genBean => FALSE,
12 genTables => TRUE,
13 ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
14 );
15 end;
16 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.26
SQL> desc LOCAL_TABLE
Name Null? Type
TABLE of SYS.XMLTYPE(XMLSchema "http://xmlns.example.com/askTom/TransactionList.xsd" Element "TransactionList") STORAGE Object-rela
ional TYPE "TRANSACTION_LIST_T"
SQL> --
SQL> create or replace VIEW TRAN_VIEW
2 as
3 select
4 extractvalue(x.column_value,'/Transaction/TradeVersion/text()') tradeversion,
5 extractvalue(x.column_value,'/Transaction//text()') transactionid
6 from
7 local_table,
8 table(xmlsequence(extract(OBJECT_VALUE,'/TransactionList/Transaction'))) x
9 /
View created.
Elapsed: 00:00:00.01
SQL> create or replace VIEW TRAN_LEG_VIEW
2 as
3 select
4 extractvalue(x.column_value,'/Transaction/TransactionId/text()') transactionid,
5 extractvalue(y.column_value,'/Leg/Basis/text()') leg_basis,
6 extractValue(y.column_value,'/Leg/FixedRate/text()') leg_fixedrate
7 from
8 local_table,
9 table(xmlsequence(extract(OBJECT_VALUE,'/TransactionList/Transaction'))) x,
10 table(xmlsequence(extract(x.column_value,'/Transaction/Leg'))) y
11 /
View created.
Elapsed: 00:00:00.01
SQL> create or replace VIEW TRAN_LEG_PAY_VIEW
2 as
3 select
4 extractvalue(x.column_value,'/Transaction/TransactionId/text()') transactionid,
5 extractvalue(y.column_value,'/Leg/LegNumber/text()') leg_legnumber,
6 extractvalue(z.column_value,'/Payment/StartDate/text()') pay_startdate,
7 extractValue(z.column_value,'/Payment/Value/text()') pay_value
8 from
9 local_table,
10 table(xmlsequence(extract(OBJECT_VALUE,'/TransactionList/Transaction'))) x,
11 table(xmlsequence(extract(x.column_value,'/Transaction/Leg'))) y,
12 table(xmlsequence(extract(y.column_value,'/Leg/Payment'))) z
13 /
View created.
Elapsed: 00:00:00.03
SQL> desc TRAN_VIEW
Name Null? Type
TRADEVERSION NUMBER(38)
TRANSACTIONID VARCHAR2(4000)
SQL> --
SQL> desc TRAN_LEG_VIEW
Name Null? Type
TRANSACTIONID NUMBER(38)
LEG_BASIS NUMBER(38)
LEG_FIXEDRATE NUMBER(38)
SQL> --
SQL> desc TRAN_LEG_PAY_VIEW
Name Null? Type
TRANSACTIONID NUMBER(38)
LEG_LEGNUMBER NUMBER(38)
PAY_STARTDATE DATE
PAY_VALUE NUMBER(38)
SQL> --
SQL> create or replace VIEW TRAN_VIEW_XMLTABLE
2 as
3 select t.*
4 from LOCAL_TABLE,
5 XMLTable
6 (
7 '/TransactionList/Transaction'
8 passing OBJECT_VALUE
9 columns
10 TRADE_VERSION NUMBER(4) path 'TradeVersion/text()',
11 TRANSACTION_ID NUMBER(4) path 'TransactionId/text()'
12 ) t
13 /
View created.
Elapsed: 00:00:00.01
SQL> create or replace VIEW TRAN_LEG_VIEW_XMLTABLE
2 as
3 select t.TRANSACTION_ID, L.*
4 from LOCAL_TABLE,
5 XMLTable
6 (
7 '/TransactionList/Transaction'
8 passing OBJECT_VALUE
9 columns
10 TRANSACTION_ID NUMBER(4) path 'TransactionId/text()',
11 LEG XMLType path 'Leg'
12 ) t,
13 XMLTABLE
14 (
15 '/Leg'
16 passing LEG
17 columns
18 LEG_NUMBER NUMBER(4) path 'LegNumber/text()',
19 LEG_BASIS NUMBER(4) path 'Basis/text()',
20 LEG_FIXED_RATE NUMBER(4) path 'FixedRate/text()'
21 ) l
22 /
View created.
Elapsed: 00:00:00.01
SQL> create or replace VIEW TRAN_LEG_PAY_VIEW_XMLTABLE
2 as
3 select TRANSACTION_ID, L.LEG_NUMBER, P.*
4 from LOCAL_TABLE,
5 XMLTable
6 (
7 '/TransactionList/Transaction'
8 passing OBJECT_VALUE
9 columns
10 TRANSACTION_ID NUMBER(4) path 'TransactionId/text()',
11 LEG XMLType path 'Leg'
12 ) t,
13 XMLTABLE
14 (
15 '/Leg'
16 passing LEG
17 columns
18 LEG_NUMBER NUMBER(4) path 'LegNumber/text()',
19 PAYMENT XMLType path 'Payment'
20 ) L,
21 XMLTABLE
22 (
23 '/Payment'
24 passing PAYMENT
25 columns
26 PAY_START_DATE DATE path 'StartDate/text()',
27 PAY_VALUE NUMBER(4) path 'Value/text()'
28 ) p
29 /
View created.
Elapsed: 00:00:00.03
SQL> desc TRAN_VIEW_XMLTABLE
Name Null? Type
TRADE_VERSION NUMBER(4)
TRANSACTION_ID NUMBER(4)
SQL> --
SQL> desc TRAN_LEG_VIEW_XMLTABLE
Name Null? Type
TRANSACTION_ID NUMBER(4)
LEG_NUMBER NUMBER(4)
LEG_BASIS NUMBER(4)
LEG_FIXED_RATE NUMBER(4)
SQL> --
SQL> desc TRAN_LEG_PAY_VIEW_XMLTABLE
Name Null? Type
TRANSACTION_ID NUMBER(4)
LEG_NUMBER NUMBER(4)
PAY_START_DATE DATE
PAY_VALUE NUMBER(4)
SQL> --
SQL> set long 10000 pages 100 lines 128
SQL> set timing on
SQL> set autotrace on explain
SQL> set heading on feedback on
SQL> --
SQL> VAR DOC1 CLOB
SQL> VAR DOC2 CLOB
SQL> --
SQL> begin
2 :DOC1 :=
3 '<TransactionList>
4 <Transaction id="1">
5 <TradeVersion>1</TradeVersion>
6 <TransactionId>1</TransactionId>
7 <Leg id="1">
8 <LegNumber>1</LegNumber>
9 <Basis>1</Basis>
10 <FixedRate>1</FixedRate>
11 <Payment id="1">
12 <StartDate>2000-01-01</StartDate>
13 <Value>1</Value>
14 </Payment>
15 <Payment id="2">
16 <StartDate>2000-01-02</StartDate>
17 <Value>2</Value>
18 </Payment>
19 </Leg>
20 <Leg id="2">
21 <LegNumber>2</LegNumber>
22 <Basis>2</Basis>
23 <FixedRate>2</FixedRate>
24 <Payment id="1">
25 <StartDate>2000-02-01</StartDate>
26 <Value>10</Value>
27 </Payment>
28 <Payment id="2">
29 <StartDate>2000-02-02</StartDate>
30 <Value>20</Value>
31 </Payment>
32 </Leg>
33 </Transaction>
34 <Transaction id="2">
35 <TradeVersion>2</TradeVersion>
36 <TransactionId>2</TransactionId>
37 <Leg id="1">
38 <LegNumber>21</LegNumber>
39 <Basis>21</Basis>
40 <FixedRate>21</FixedRate>
41 <Payment id="1">
42 <StartDate>2002-01-01</StartDate>
43 <Value>21</Value>
44 </Payment>
45 <Payment id="2">
46 <StartDate>2002-01-02</StartDate>
47 <Value>22</Value>
48 </Payment>
49 </Leg>
50 <Leg id="22">
51 <LegNumber>22</LegNumber>
52 <Basis>22</Basis>
53 <FixedRate>22</FixedRate>
54 <Payment id="21">
55 <StartDate>2002-02-01</StartDate>
56 <Value>210</Value>
57 </Payment>
58 <Payment id="22">
59 <StartDate>2002-02-02</StartDate>
60 <Value>220</Value>
61 </Payment>
62 </Leg>
63 </Transaction>
64 </TransactionList>';
65 :DOC2 :=
66 '<TransactionList>
67 <Transaction id="31">
68 <TradeVersion>31</TradeVersion>
69 <TransactionId>31</TransactionId>
70 <Leg id="31">
71 <LegNumber>31</LegNumber>
72 <Basis>31</Basis>
73 <FixedRate>31</FixedRate>
74 <Payment id="31">
75 <StartDate>3000-01-01</StartDate>
76 <Value>31</Value>
77 </Payment>
78 </Leg>
79 </Transaction>
80 </TransactionList>';
81 end;
82 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.01
SQL> insert into LOCAL_TABLE values ( xmltype(:DOC1))
2 /
1 row created.
Elapsed: 00:00:00.01
Execution Plan
Plan hash value: 1
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | INSERT STATEMENT | | 1 | 100 | 1 (0)| 00:00:01 |
| 1 | LOAD TABLE CONVENTIONAL | LOCAL_TABLE | | | | |
SQL> insert into LOCAL_TABLE values ( xmltype(:DOC2))
2 /
1 row created.
Elapsed: 00:00:00.01
Execution Plan
Plan hash value: 1
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | INSERT STATEMENT | | 1 | 100 | 1 (0)| 00:00:01 |
| 1 | LOAD TABLE CONVENTIONAL | LOCAL_TABLE | | | | |
SQL> select * from TRAN_VIEW_XMLTABLE
2 /
TRADE_VERSION TRANSACTION_ID
1 1
2 2
31 31
3 rows selected.
Elapsed: 00:00:00.03
Execution Plan
Plan hash value: 650975545
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 3 | 168 | 3 (0)| 00:00:01 |
| 1 | NESTED LOOPS | | 3 | 168 | 3 (0)| 00:00:01 |
|* 2 | TABLE ACCESS FULL| SYS_NTGgl+TKyhQnWoFRSrCxeX9g== | 3 | 138 | 3 (0)| 00:00:01 |
|* 3 | INDEX UNIQUE SCAN| SYS_C0010174 | 1 | 10 | 0 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter("SYS_NC_TYPEID$" IS NOT NULL)
3 - access("NESTED_TABLE_ID"="LOCAL_TABLE"."SYS_NC0000800009$")
Note
- dynamic sampling used for this statement
SQL> select * from TRAN_LEG_VIEW_XMLTABLE
2 /
TRANSACTION_ID LEG_NUMBER LEG_BASIS LEG_FIXED_RATE
1 1 1 1
1 2 2 2
2 21 21 21
2 22 22 22
31 31 31 31
5 rows selected.
Elapsed: 00:00:00.04
Execution Plan
Plan hash value: 1273661583
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 5 | 560 | 7 (15)| 00:00:01 |
|* 1 | HASH JOIN | | 5 | 560 | 7 (15)| 00:00:01 |
| 2 | NESTED LOOPS | | 3 | 159 | 3 (0)| 00:00:01 |
|* 3 | TABLE ACCESS FULL| SYS_NTGgl+TKyhQnWoFRSrCxeX9g== | 3 | 129 | 3 (0)| 00:00:01 |
|* 4 | INDEX UNIQUE SCAN| SYS_C0010174 | 1 | 10 | 0 (0)| 00:00:01 |
|* 5 | TABLE ACCESS FULL | SYS_NTUmyermF/S721C/2UXo40Uw== | 5 | 295 | 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - access("SYS_ALIAS_1"."NESTED_TABLE_ID"="SYS_ALIAS_0"."SYS_NC0000800009$")
3 - filter("SYS_NC_TYPEID$" IS NOT NULL)
4 - access("NESTED_TABLE_ID"="LOCAL_TABLE"."SYS_NC0000800009$")
5 - filter("SYS_NC_TYPEID$" IS NOT NULL)
Note
- dynamic sampling used for this statement
SQL> select * from TRAN_LEG_PAY_VIEW_XMLTABLE
2 /
TRANSACTION_ID LEG_NUMBER PAY_START PAY_VALUE
1 1 01-JAN-00 1
1 1 02-JAN-00 2
1 2 01-FEB-00 10
1 2 02-FEB-00 20
2 21 01-JAN-02 21
2 21 02-JAN-02 22
2 22 01-FEB-02 210
2 22 02-FEB-02 220
31 31 01-JAN-00 31
9 rows selected.
Elapsed: 00:00:00.07
Execution Plan
Plan hash value: 4004907785
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 9 | 1242 | 10 (10)| 00:00:01 |
|* 1 | HASH JOIN | | 9 | 1242 | 10 (10)| 00:00:01 |
|* 2 | HASH JOIN | | 5 | 480 | 7 (15)| 00:00:01 |
| 3 | NESTED LOOPS | | 3 | 159 | 3 (0)| 00:00:01 |
|* 4 | TABLE ACCESS FULL| SYS_NTGgl+TKyhQnWoFRSrCxeX9g== | 3 | 129 | 3 (0)| 00:00:01 |
|* 5 | INDEX UNIQUE SCAN| SYS_C0010174 | 1 | 10 | 0 (0)| 00:00:01 |
|* 6 | TABLE ACCESS FULL | SYS_NTUmyermF/S721C/2UXo40Uw== | 5 | 215 | 3 (0)| 00:00:01 |
|* 7 | TABLE ACCESS FULL | SYS_NTelW4ZRtKS+WKqCaXhsHnNQ== | 9 | 378 | 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - access("NESTED_TABLE_ID"="SYS_ALIAS_1"."SYS_NC0000900010$")
2 - access("SYS_ALIAS_1"."NESTED_TABLE_ID"="SYS_ALIAS_0"."SYS_NC0000800009$")
4 - filter("SYS_NC_TYPEID$" IS NOT NULL)
5 - access("NESTED_TABLE_ID"="LOCAL_TABLE"."SYS_NC0000800009$")
6 - filter("SYS_NC_TYPEID$" IS NOT NULL)
7 - filter("SYS_NC_TYPEID$" IS NOT NULL)
Note
- dynamic sampling used for this statement
SQL>Out of interest why are you so against using XMLType...
Edited by: mdrake on Jan 13, 2009 8:25 AM -
Insert XML file into Relational database model without using XMLTYPE tables
Dear all,
How can I store a known complex XML file into an existing relational database WITHOUT using xmltypes in the database ?
I read the article on DBMS_XMLSTORE. DBMS_XMLSTORE indeed partially bridges the gap between XML and RDBMS to a certain extent, namely for simply structured XML (canonical structure) and simple tables.
However, when the XML structure will become arbitrary and rapidly evolving, surely there must be a way to map XML to a relational model more flexibly.
We work in a java/Oracle10 environment that receives very large XML documents from an independent data management source. These files comply with an XML schema. That is all we know. Still, all these data must be inserted/updated daily in an existing relational model. Quite an assignment isn't it ?
The database does and will not contain XMLTYPES, only plain RDBMS tables.
Are you aware of a framework/product or tool to do what DBMS_XMLSTORE does but with any format of XML file ? If not, I am doomed.
Constraints : Input via XML files defined by third party
Storage : relational database model with hundreds of tables and thousands of existing queries that can not be touched. The model must not be altered.
Target : get this XML into the database on a daily basis via an automated process.
Cheers.
Luc.Luc,
your Doomed !
If you would try something like DBMS_XMLSTORE, you probably would be into serious performance problems in your case, very fast, and it would be very difficult to manage.
If you would use a little bit of XMLType stuff, you would be able to shred the data into the relational model very fast and controlable. Take it from me, I am one of those old geezers like Mr. Tom Kyte way beyond 40 years (still joking). No seriously. I started out as a classical PL/SQL, Forms Guy that switched after two years to become a "DBA 1.0" and Mr Codd and Mr Date were for years my biggest hero's. I have the utmost respect for Mr. Tom Kyte for all his efforts for bringing the concepts manual into the development world. Just to name some off the names that influenced me. But you will have to work with UNSTRUCTURED data (as Mr Date would call it). 80% of the data out there exists off it. Stuff like XMLTABLE and XML VIEWs bridge the gap between that unstructured world and the relational world. It is very doable to drag and drop an XML file into the XMLDB database into a XMLtype table and or for instance via FTP. From that point on it is in the database. From there you could move into relational tables via XMLTABLE methods or XML Views.
You could see the described method as a filtering option so XML can be transformed into relational data. If you don't want any XML in your current database, then create an small Oracle database with XML DB installed (if doable 11.1.0.7 regarding the best performance --> all the new fast optimizer stuff etc). Use that database as a staging area that does all the XML shredding for you into relational components and ship the end result via database links and or materialized views or other probably known methodes into your relational database that isn't allowed to have XMLType.
This way you would keep your realtional Oracle database clean and have the Oracle XML DB staging database do all the filtering and shredding into relational components.
Throwing the XML DB option out off the window beforehand would be like replacing your Mercedes with a bicycle. With both you will be able to travel the distance from Paris to Rome, but it will take you a hell of lot longer.
:-) -
How to store, in an effective way, analyzer data into a relational database?
We want to store the "sweep traces" of a network analyzer in a relational database in a way that it saves as much as possible space without loosing resolution.
The solutions were we thinking on are to separate the x-axes information from the y-axes information and store it in different tables of the database.
Because the repeating character of the measurements the data in the x-axes will be nearly all ways the same. So we want to store only new data in the x-axes table as a different x-axes is detected.
In a third table we want to save the relation between the x and y data and other data that belongs to the measurement.
Question is are there other or better possibilities to solve this proble
m?Hi Ben,
Thanks for you help.
The use of a third table that links the X-axe and y-axe table together depends on if I store the datapoints in the y-axe table sequential, so I need an identification of the points belonging together and I can have a varying number of data-points, (i.e. 401 of 801 ...) or I save it in one record.
The problem here is I have to save a varying nummer of points in tables with a lot of "datapoint columns".
Another solution is save the datapoints as a semicolon ( separated text string in one field.
Problem now is the limitation in the max. text field length.
In my Oracle Rdb database I can use "Varchar" fields.
(is here no limitation??)
In other databases a "Note field" will maybe give a solution.
The question sti
ll is: What is the best solution and uses the smallest amount of space?
In the next week I will do some tests with the solutions mentioned.
Please let me know what DSC is??
Greetings Huub -
Database performance issue (8.1.7.0)
Hi,
We are having tablespace "payin" in our database (8.1.7.0) .
This tablespace is the main Tablespace of our database which is dictionary managed and heavily accessed by the user SQL statements.
Now we are facing the database performance issue during the peak time (i.e. at the month end) when no. of users use to run the no. of large reports.
We have also increased the SGA sufficiently on the basis of RAM size.
This tablespace is heavily accessed for the reports.
Now my question is,
Is this performance issue is because the tablespace is "dictionary managed" instead of locally managed ?
because when i monitor the different sessions through OEM, the no. of hard parses is more for the connected users.
Actually the hard parses should be less.
In oracle 8.1.7.0 Can we convert dictionary managed tablespace to locally managed tablespace ?
by doing so will the problem will get somewhat resolve ? will it reduce the overhead on the dictionary tables and on the shared memory ?
If yes then how what is procedure to convert the tablespace from dictionary to locally managed ?
With RegardsIf your end users are just running reports against this tablespace, I don't think that the tablespace management (LM/DM) matters here. You should be concerned more about the TEMP tablespace (for heavy sort operations) and your shared pool size (as you have seen hard parses go up).
As already stated, get statspack running and also try tracing user sessions with wait events. Might give you more clues. -
Tricky Database Modelling Issue
My application needs to merge items of defferent types into items of one specific type.
For example, 2dz Heinecken, 3dz Grolsch and 1dz Stella should be turned into 6dz of Heinecken whereas 2dz Heinecken, 3dz Grolsch, 1dz Stella and 3dz Carlsberg should be turned into 9dz Grolsch.
There isn't really a pattern to it and the rules can change all the time. Therefore, the user should be able to maintain data in the database so that my application can be directed how things ought to be merged.
I have thought and thought and though how to model this but can't see anything simple. Has anybody here any suggestion?I'm not sure what is unclear here Dave...
I stated what my app was supposed to do but let me try again. Let's assume I had a Beer Table. So I'd have records like:
Heinecken
Grolsch
Stella
Carlsberg
etc.
As mentioned, I need something that allows me to do a lookup based on multiple of these records. For example, I could use a bitmask as a key for my beer table:
Key Name
1 Heinecken
2 Grolsch
4 Stella
8 Carlsberg
16 Tuborg
32 Leffe
64 Urquell
etc.
I could then create another table that would use the bitmask as a key, so that an entry for say Heinecken/Stella/Leffe which would identify Stella as the default would look like so:
Key UseThis
37 4
While this approach would do the trick, there are many flaws. I was wondering if anyone here had come accross matrixes like that and found a way to implement these elegantly in a relational database? -
RELATIONAL DATABASE TABLES IN SAP BW
hi
friends please give me the information regarding the RELATIONAL DATABASE TABLES IN SAP BW?Hi,
See the tables.
InfoObjects Table:
RSDIOBJ Directory of all InfoObjects
RSDIOBJT Texts of InfoObjects
InfoCube Tables:
RSDCUBE Directory of InfoCubes
RSDCUBET Texts on InfoCubes
DSO Tables:
RSDODSO Directory of all ODS Objects
RSDODSOT Texts of all ODS Objects
PSA Table:
RSTSODS Directory of all PSA Tables
For reports:
RSRREPDIR
Thanks & Regards,
Sathish
Maybe you are looking for
-
How do I get to the second page of a table of contents?
I have purchased several books that are long enough that their interactive tables of contents require more than one page. I have not been able to figure out how to get to the second or subsequent pages of the table of contents. Tapping or swiping the
-
HTML5 Zoom Are Shows Wrong Image
Hi All, I have a Captivate 6 Project that is being published ot HTML5. Some of the Zoom areas zoom into what that area looks like later. In other words, I wan to zoom into a menu, instead it sooms into an image that shows later in the slide. The s
-
I have two SSIDs on my Cisco 1242 APs. On one of the SSIDs i have clients that will constantly broadcast data (required). Will the brodcast traffic reach my other SSID? If so, is there a way to avoid it? Will creating a separate wireless VLAN on my A
-
SAp Solution for revised IAS 23 - Borrowing Costs
Does SAP has any solution to adopt/adhere to the revised IAS 23 which requries to capitalize the borrowing costs.This is effective from 01.01.2009. I can devide the required activities into below. 1. Determine borrowing cost u2013 Specific borrowings
-
Problems deploying native extensions on Android
I'm trying to test a native extension on Android, but I keep getting the following error when trying to build and push to the device: "An implentation for native extension 'extension name' required by the application was not found for the target plat