Generating XSDs From Oracle Tables

Oct 2, 2012

Is there any API to generate XSDs from Oracle tables? DBMS_XMLSCHEMA.GENERATESCHEMA accepts only Types and not the Table names. I want to generate XSD from the tables including length, null and default validations.

View 6 Replies


ADVERTISEMENT

SQL & PL/SQL :: Oracle - Generating Combination Of Numbers?

Oct 25, 2010

I have to write a stored procedure/function which has to generate the combination of numbers
For eg: IF I/p is an array of numbers a(i) = [1,2,3]

I want to get various combinations of numbers with these three digits.

writing the stored procedure generating the output for this

View 18 Replies View Related

SQL & PL/SQL :: Generating Hourly Report From Oracle Database

Jun 30, 2011

I am working on SQL Developer 1.5.1, i need to prepare hourly record of the activity on the database, for that i have a sql query that gives me the report as per selected columns on hourly basis.I need to prepare 24 reports a day.

Each time i have to go to the query , change the date as per hours like form 22:06:2011 10:00:00 to 22:06:2011 11:00:00 and get the report and export it in excel.

I want to automate the script so that whenever i run the script , it just asks me the date and runs the script 24 times and fetch me the hourly report of whole day.

the query syntax is something like this

Select
............................
...........................
..........................
from
..........................
........................
........................
where
And.......................
And...................
And......................

And req date between to-date( 22:06:2011 10:00:00) And to-date(22:06:2011 11:00:00)
Order by 7,1,2,3,4,5

Is there any possibility that i can automate the script to automatically change the hour itself and generate a report in excel 24 times?

View 6 Replies View Related

Implementation Where Data From DB2 Tables Are Moved To Oracle Tables

Sep 3, 2012

I came across an implementation where data from DB2 tables are moved to Oracle tables, for BI solutioning, using some oracle procedures called from MS SQL DTS packages which are scheduled jobs.Just being curious, can this be done using OWB or ODI rather than the above detour. I suppose there are some changes being done in those procedures before the data is being loaded into Oracle tables, can't this be done using OWB/ODI? Can it be scheduled too as jobs using OWB/ODI?

View 1 Replies View Related

Generating XML Using SQL Query?

Oct 13, 2011

I am facing the following issue while generating xml using a sql query. I get the below given table using a query.

CODE ID MARK
==================================
1 4 2331 809
2 4 1772 802
3 4 2331 845
4 5 2331 804
5 5 2331 800
6 5 2210 801

I need to generate the below given xml using a query

<data>
<CODE>4</CODE>
<IDS>
<ID>2331</ID>
<ID>1772</ID>
</IDS>
<MARKS>

[code].....

NOTe: IDS which are distinct needs to be displayed. ALL MARKS should be displayed though there are duplicates.

View 1 Replies View Related

SQL & PL/SQL :: Generating A Key For Grouping?

Mar 27, 2013

In the below data, a container is moving from one city to another. 1,2 ,3 can be any number which i want to generate and use as keys to group the cities. Eg: AUH, JEB, CIW belong to the same key=2; SIN, IKT belong to a new group 4. The City where difference between the Seq# is greater than 1 (eg between S8W and AUH), a new group starts.

Conotainer #CitySeqI want this
-------------------------------------------
Container1S8W5251
Container1S8W5261
Container1AUH5362
Container1AUH5372
Container1JEB5382
Container1JEB5392

[code]....

View 4 Replies View Related

SQL & PL/SQL :: Generating XML From Procedure?

Mar 11, 2012

Below is the procedure I created to generate csv file from oracle procedure.

PROCEDURE proc_csv(p_path varchar2 , p_separator varchar2 default ',')
AS
CURSOR c_data
IS
select * FROM product ;
v_file UTL_FILE.file_type;
BEGIN

[code]...

I have two doubts about this procedures

1) In one schema this procedure is generating empty csv file with zero bytes, while in other schem It's working fine, It's showing data. I am unable to make what's the difference.

2) The csv file is not displaying column headings. I want column headings to be displayed on csv file.

View 4 Replies View Related

PL/SQL :: Generating XML In Query

Sep 11, 2012

Im generating some xml from a table which works fine. Here is an example of what I'm doing.

Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product

create table "VTEST"(
"PROJECT_NUMBER" VARCHAR2(50 BYTE),
"ORDER_NUMBER" VARCHAR2(50 BYTE),
"PART_NUMBER" VARCHAR2(50 BYTE),
[code]....

so each section would list its unique values.

View 3 Replies View Related

Generating Schema From XSD Files?

Jul 7, 2010

generating oracle table definitions from XML .xsd files?

View 5 Replies View Related

SQL & PL/SQL :: Generating Weekly Report

Apr 1, 2013

I know I am using a outdated Oracle what to do my company are not willing to upgrade because of the economic situtation.

I need generating weekly report.

I have a condition for monthly like this

invoice_date BETWEEN TO_DATE('01-JAN-13 00:00:00', 'dd-mon-yy hh24:mi:ss')
AND TO_DATE('31-JAN-13 23:59:59', 'dd-mon-yy hh24:mi:ss')

now if I want a weekly report Monday - Saturday, How to go about it?

View 2 Replies View Related

SQL & PL/SQL :: Generating Unique Code

Jun 27, 2011

I have data like this:

a1 a2 a3 a4
ABC ABC xx zz
ABC xx mm mm
fg ui ok pl

I want to give them unique codes like :

Code for column
a1 Code1
ABCC-1
ABCC-1
fg C-2

then column
a2 Code2
ABC C-1
xxC-3
uiC-4

then column
a3 Code3
xxC-3
mmC-5
okC-6

then column
a4 Code4
zzC-7
mmC-5
plC-8

I can add these `columns in the table Code1 , Code2 etc columns to update.

View 1 Replies View Related

SQL & PL/SQL :: Generating Dates In A Table

Mar 1, 2010

I have emp table

Empno from_date to_date ScaleBonus_pct Salary
101 31/01/2010 14/02/2010Grade120,10,10,15,25,205000

Reqd. o/p

Emp nofrom_dateScaleEach_WeeK_Sal
10131/01/2010Grade11000(from 20 %X5000
1017/2/2010Grade1500(from 10 %X5000
10114/02/2010Grade1500(from 10 % X5000
10121/02/2010Grade1750(from 15 % X5000
10128/10/2010Grade11250(from 25 % X5000
1017/2/2010Grade11000(from 20 % X5000

we have to split the date by 7 days,should be on Sunday...and if we split by 7 days we have upto 31/01,07/02 and 14/02...but we have to generate 6 days because 20,10,10,15,25,20 (since comma separated value is 6 ).

View 8 Replies View Related

ODI Invoke Is Not Generating XML Properly

Feb 5, 2013

In weblogic server Axis2 is deployed and it is showing Active.And we have uploaded ODI invoke service also in AXIS2 succesfully and it is showing Active status also...By using the soap its generating the XML with below mentioned error..

some info:- We rae using ODI 10g.
Weblogic 10.3.5.0

XML GENERATING:--_

<xs:element name="inPhasesUptoAndIncludingPostDispatch" nillable="true" type="xs:anyType" />
<xs:element name="key" nillable="true" type="xs:anyType" />
<xs:element name="localPolicyAssertions" nillable="true" type="xs:anyType" />

[code]...

The XML page cannot be displayed Cannot view XML input using XSL style sheet. correct the error and then click the Refresh button, or try again later.

The operation completed successfully. Error processing resource [URL]

</xs:schema></wsdl:types><wsdl:message name="invokeScenarioMessage"><wsdl:part name="part1" element="ns...

View 2 Replies View Related

JDeveloper, Java & XML :: Generating XML From XSD At Runtime?

Aug 13, 2012

I Have got a requirement where we have to generate an xml conforming to a particular XSD.

What i will be having already in place is an XSD document.

We are thinking of making a procedure which will be recieving the set of inputs required for creating that xml.(Data content of that XML.)We would have to make the XML according to that XSD.

Everytime Parsing the XSD is not feasible.We are looking at a solution which would be easy to make the xml from xsd at runtime.These values (DATA) will be available at run time.

View 7 Replies View Related

SQL & PL/SQL :: How To Exclude Value From Random Generating Function

Jun 25, 2011

I am in urgent need of Generating Random numbers for one of the application .The number once generated is getting stored in table

For this purpose i am using Oracle In-Built function

Quote:Select round(dbms_random.value(1,30)) into a from dual;

Problem is :How to eliminate those numbers to generate which are already stored in Table.

View 6 Replies View Related

SQL & PL/SQL :: Generating (time Taken) Data At Row Level?

May 1, 2013

I have a requirement where i have data spread in rows which i have to pivot kind off operation to find the time taken using a Log table.

below is the existing data is present.

col0 col1 col2 col3 col4
30003695/1/2013 8:41Batch Startedproc_unalloc1345
30003705/1/2013 8:41blah proc_unalloc1345
30003715/1/2013 8:46blah proc_unalloc1345
30003725/1/2013 8:46blah proc_unalloc1345
30003735/1/2013 8:56blah proc_unalloc1345
30003745/1/2013 8:57Unalloc Endedproc_unalloc1345

[code].....

Below is what I am trying to find from the above data.

col1Unalloc Alloc Metric
13450.16 1.07 1.3

the result is Hours.Minutes.

I am trying to minus the two dates and find the time taken for a particular section( eg, unalloc ).

I tried using three union queries .

Select block,timestamp From (
Select 'Unalloc' As Block ,col1,col4 From table_1
Where col2 = 'Batch Started' And col3 = 'proc_unalloc' And
Parms Like '1345'
Union
Select 'Unalloc' As Block ,col1,col4 From table_1
Where col2 = 'Unalloc Ended' And col3 = 'proc_unalloc' And

[code].....

I will minus the start and end time for unalloc to get time taken for un alloc. Then i will minus end time of unalloc and end time for alloc to get time taken for alloc... like wise for metric.

View 6 Replies View Related

XML DB :: Generating XML Data From A Table In XML Format

May 3, 2013

generating an xml file using the below data.Table name is T_Data having 4 columns as given below with some data.

Region Divison District Store
---------- ----------------------- ----------- -----------
Northwest Northern California San Jose SJStore1
Northwest Northern California San Jose SJStore2
Northwest Northern California North LA LAStore1
Northwest Northern California North LA LAStore2
Northwest Northern California North LA LAStore3

I want to generate an XML File using SQL/XML Functions and the XML File should look like as given below.

<Region>
<Region Name>Northwest</Region Name>
<Divison>
<Division Name> Northern California </Division Name>
<District>
[code]...

View 3 Replies View Related

Generating MD5 If There Are Any Special Characters In The CLOB

Nov 30, 2012

We are using dbms_crypto.hash to generate the MD5 hash value for a CLOB that will be sent to other feeder systems. The feeder systems validate the file by generating the MD5 hash value on their end and compare with the MD5 generated in Oracle and accept the file only if the MD5 hash value matches.

The MD5 file matches between both the systems except in the case where there are special characters in the CLOB. Somehow, MD5 is prefixing  character before any special character and calculating the MD5 value. In our case, our special characters being ®, §, ™, ©....

This is a high priority issue for us and it is holding our UAT. We are using Oracle 11.2.0.2.0.

View 1 Replies View Related

Server Administration :: SQL For Generating Roles

Dec 18, 2012

I am looking for the below one.SQL for generating roles needs to be spooled by automated script.

View 4 Replies View Related

Generating Script For Roles For Schema Import?

May 19, 2011

I want to import schema1 from sourcedb to targetdb. For this I need to generate create sripts and grant scripts for roles related to schema. For example schema1 has role1; rol1 has rol2; rol2 has rol3 and some system privileges and object privileges. How can I generate this script from sourcedb?

View 1 Replies View Related

Select Query With Four Table Its Generating Around 650 Rows?

Feb 20, 2013

i have a select query with four table its generating around 650 rows. and i need to update these 650 rows only.

for example

update ps_po_lining b
set y.recv_req = 'N'
where recv_req in

[Code]....

this query runs but its updating 6000 rows. which is not right. we need to update what ever the select query is retrieving.

View 5 Replies View Related

Server Administration :: Archive Log File Generating?

Jan 10, 2011

I want to know how many archive log generating in One hour at the peak time. We have 6 nodes RAC multiplex 2.

Is there are any query through which I can achieve the above purpose.

Note: As this is a prod instance client is not happy to implement Log Miner utility.

View 9 Replies View Related

Client Tools :: Generating Tkprof From SQL Developer

May 8, 2013

How do i get tkprof trace file in sqldeveloper tool ? I donot have access sql in command mode.

View 5 Replies View Related

Forms :: Generating Sequence - Get Serial Number?

Dec 21, 2011

i want to get serial numbers in oracle forms. i have one data block with 10 rows and a non database display item with corresponding length as that of the original data block .

when ever i am executing the form i want to see the serial number generated in the display item and when i inserted a new item or row it should show the corresponding rownum.

eg:

empno name serialno
5 tom 1
4 tinil 2
6 sofy 3
7 john 4
1 albert 5
2 michel 6

i want to get the above answer using forms.

View 7 Replies View Related

SQL & PL/SQL :: Generating Increasing Number In Insert Statement

Mar 6, 2012

we are inserting a data in table by selecting data from another table.This is part of a very big procedure and the code is like

Loop
SELECTMAX(biz_trn_no) + 1
INTOv_biz_tran_no
FROMnew_business_transactions
WHEREnb_srno = nb_sr_no;
[code]....

Is there any way I can get this functionality without using a sequence? I assume corelated query would be slow and analytic.

View 6 Replies View Related

Generating ADDM Reports Automatically Every Hour?

Jun 9, 2012

I have been trying to develop a script for generating ADDM Reports every hour and save it in a directory on the server. I was able to develop a script to run the AWR Reports for every hour and save them in a directory, but I ran into troubled waters in the ADDM script.

Database Version : Oracle Database Enterprise Edition 10.2.0.3
OS : IBM AIX 5.3

I'm trying to debug the script below to generate ADDM reports on a per hour basis and save them in a folder as well as mail than to a particular entity.

########################################################################################
# Set up Oracle environment variables...
#------------------------------------------------------------------------------
export PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/oracle/app/oracle/product/10.2.0/bin:/usr/bin/X11:/sbin:.:/oracle/app/oracle/product/10.2.0/bin
export ORACLE_HOME=/oracle/app/oracle/product/10.2.0
export ORACLE_SID=sarcotest2.ora
export ORAENV_ASK=NO

[Code].....

Initially, the script did return me an ADDM report, but the problem was that it generated the report for only a set of two snapshots (eg: 410110 and 410111). later when the snapshots advanced further, it still generated the same report for the same snapshots.

Now, it seems it have made several changes to the script in the declare and dbms_advisor section and the reports are not being generated anyway.

One problem I am facing is

ORA-13605: The specified task or object ADDM_UAT does not exist for the current user.
ORA-06512: at "SYS.PRVT_ADVISOR", line 2043
ORA-06512: at "SYS.DBMS_ADVISOR", line 560
ORA-06512: at line 1

It seems the task is not being generated at all in my user's schema.

View 1 Replies View Related

Performance Tuning :: Redo Logs Generating After Every 3 Min

Aug 13, 2010

This morning when I checked my archive logs, I suprised that the redo files are generating after every 3 min and each of file size is 50M, which is the actual size of both log members. I m using RAC database with DR server.Usally the total redo logs quantity for one day is 4 to 5. but since 10 pm of yesterday to 7 am today, the quantity of log files are 109, each of 50 M .

View 2 Replies View Related

SQL & PL/SQL :: Sequence Generating Random Values After Increment By 1

Jan 28, 2011

DECLARE
P_LAST_UPDATE_DATE KPC_MMS_STD_CHKPOINTS.LAST_UPDATE_DATE%TYPE;
BEGIN
INSERT INTO KPC_MMS_STD_CHKPOINTS (CHK_POINT_CODE,CHK_POINT_DESC,CHK_POINT_FREQUENCY,CREATED_BY,
CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE)
VALUES (:P13_CHK_POINT_CODE,:P13_CHK_POINT_DESC,:P13_CHK_POINT_FREQUENCY,:P13_CREATED_BY,:P13_CREATION_DATE,
:P13_LAST_UPDATED_BY,:P13_LAST_U PDATE_DATE);
COMMIT;
END;

View 1 Replies View Related

Security :: Database Hung While Generating AWR Report

Apr 13, 2013

My database is hung while generating the AWR report. I observe the mmon is running for long time. is it okay if i kill, will that have any impact to database.

View 2 Replies View Related

ORA-1403 Encountered When Generating Server Alert?

Jun 7, 2012

how to resolve the below error.. I am getting this error on the alert log .. oracle DB version is 11.2.0.1 and os is AIX6.1

ORA-1403 encountered when generating server alert SMG-4121 Thu Jun 07 13:38:27 2012
ORA-1403 encountered when generating server alert SMG-4121 Thu Jun 07 13:39:00 2012
ORA-1403 encountered when generating server alert SMG-3503 Thu Jun 07 13:43:27 2012
ORA-1403 encountered when generating server alert SMG-4121 Thu Jun 07 13:48:27 2012

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved