How to generate incrementel DDL.
I'm an old Designer user and I appreciated very much the capability to generate incremental DDL agains a real Database.
Is it possible with SDDM ?
How?
Tks
Tullio
Hi Tullio,
Yes. It can be done by first opening your model in Data Modeler. Then use the Data Dictionary Import Wizard to import your current definitions from the database (using the "Swap target model" option in step 2) and when this shows the Compare Models dialog, use the DDL Preview button to generate the incremental DDL.
For more detail, I suggest you read this earlier message on this forum: Re: Generate DDL - change is a new column and I want to generate a alter table
David
Similar Messages
-
Hi,
can any body please tell me that how to generate the tables ddl.
or any possible way to generate it without DBMS_METADATA.GET_DDL because it takes a lot of time.
thanks in advance !Have you tried using Tools | Database Export?
It allows you to to select tables within a schema, or export the whole schema. -
How to generate the DDL script of all the schema objects.
Hi All,
I just wanted to make centralized repository for Oracle database and to create a base version, I need to create the DDL scripts of all the database objects so that i can check in the same ddl scripts (sql) files in to my central repository.
I need do this schedule job which will generate the ddl scripts once in a month(This should be automated process)
Please help me out about this.
Oracle version - 9i
Thanks in advance.
Thanks,
Santosh
Edited by: Santosh_Oracle on Feb 23, 2011 10:26 PMIt is definitely possible to revise the script.
Look at it, you already have 80 percent of it for free, and you didn't even need to Google.
Just ask a FAQ in a forum loaded with FAQs!
And Toad can save everything to one script per object.
Sybrand Bakker
Senior Oracle DBA -
How to generate schema DDL from SQLD 1.5?
There used to be "Tools -> Export DDL" to export DDLs for multiple objects of a schema.
It is not seen in my SQLD 1.5 (Version 1.5.0.53).
Has it got lost / navigation changed?
- JayantGot it.
Thanks for the help.
I have a suggestion though - Can the option to export data be made more prominant in the first screen along with DDL options, rather than it being hidden along with 20 other options in 3rd screen?
- Jayant -
How to Generate DDL Statement for PSAPROLL Tablespace on Oracle9i-HP_UX
Hi,
I am having SAP R3 46C installed with Oracle 9i on HP_UX 11i system.
I want to generate required DDL statements for PSAPROLL Tablespace/Rollback Segments as Backup/recovery purpose, before converting it into PSAPUNDO.
Its easy to find & store required DDL statements using OEM. But, I am not able to locate oemapp (under $ORACLE_HOME/bin directory) application in the installation.
The current patch level of installed oracle is
I want to start OEM in HP_UX system, if it is possible.
otherwise,
I want to know the other alternatives to generate the required DDL statements.
Thanks in advance.
Regards,
Bhavik G. ShroffHi Stefan,
On windows Platform it is very easy to get DDL info for any object of database.
But, I was not able to start OEM in HP_UX system.
I have done my job complete using this good package of Oracle9i, in this way.
SQL> SET heading off
SQL> SET long 10000
SQL> SET pages 100
SQL> SELECT dbms_metadata.get_ddl(u2019TABLESPACEu2019,'PSAPROLLu2019)
FROM DBA_TABLESPACES;
O/P:
CREATE TABLESPACE "PSAPROLL" DATAFILE
'/oracle/RQ1/sapdata1/roll_1/roll.data1' SIZE 681574400 REUSE ,
'/oracle/RQ1/sapdata1/roll_2/roll.data2' SIZE 3145719808 REUSE
LOGGING ONLINE PERMANENT BLOCKSIZE 8192
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1048576 SEGMENT SPACE MANAGEMENT MANUAL
SQL> SELECT dbms_metadata.get_ddl(u2019ROLLBACK_SEGMENTu2019,'PRS_0u2019)
FROM DBA_SEGMENTS;
CREATE ROLLBACK SEGMENT "PRS_0" TABLESPACE "PSAPROLL"
STORAGE(INITIAL 10485760 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 32765
Also follow this useful links:
[DDL Generation--Oracle's Answer to Save You Time and Money|http://www.dbasupport.com/oracle/ora9i/DDLgen2.shtml]
[DDL Generation--Oracle's Answer to Save You Time and Money|http://www.dbasupport.com/oracle/ora9i/DDLgen3.shtml]
Good.
Thanks a lot. -
How to generate a create tablespace ddl?
Hi guys
I would like to know where in Designer I can generate a ddl for JUST tablespaces. It looks like every time I try to generate it from the DbAdmin tab I get
this " CDS-11312 Warning: Tablespace 'MYTABLESPACE_DATA' property COMPLETE is 'N' " warning.
Can anybody help on this
Thanks
-AI go it. You need to set your property pallet "complete" attribute to yes (F4)
Thanks -
How to generate test data for all the tables in oracle
I am planning to use plsql to generate the test data in all the tables in schema, schema name is given as input parameters, min records in master table, min records in child table. data should be consistent in the columns which are used for constraints i.e. using same column value..
planning to implement something like
execute sp_schema_data_gen (schemaname, minrecinmstrtbl, minrecsforchildtable);
schemaname = owner,
minrecinmstrtbl= minimum records to insert into each parent table,
minrecsforchildtable = minimum records to enter into each child table of a each master table;
all_tables where owner= schemaname;
all_tab_columns and all_constrains - where owner =schemaname;
using dbms_random pkg.
is anyone have better idea to do this.. is this functionality already there in oracle db?Ah, damorgan, data, test data, metadata and table-driven processes. Love the stuff!
There are two approaches you can take with this. I'll mention both and then ask which
one you think you would find most useful for your requirements.
One approach I would call the generic bottom-up approach which is the one I think you
are referring to.
This system is a generic test data generator. It isn't designed to generate data for any
particular existing table or application but is the general case solution.
Building on damorgan's advice define the basic hierarchy: table collection, tables, data; so start at the data level.
1. Identify/document the data types that you need to support. Start small (NUMBER, VARCHAR2, DATE) and add as you go along
2. For each data type identify the functionality and attributes that you need. For instance for VARCHAR2
a. min length - the minimum length to generate
b. max length - the maximum length
c. prefix - a prefix for the generated data; e.g. for an address field you might want a 'add1' prefix
d. suffix - a suffix for the generated data; see prefix
e. whether to generate NULLs
3. For NUMBER you will probably want at least precision and scale but might want minimum and maximum values or even min/max precision,
min/max scale.
4. store the attribute combinations in Oracle tables
5. build functionality for each data type that can create the range and type of data that you need. These functions should take parameters that can be used to control the attributes and the amount of data generated.
6. At the table level you will need business rules that control how the different columns of the table relate to each other. For example, for ADDRESS information your business rule might be that ADDRESS1, CITY, STATE, ZIP are required and ADDRESS2 is optional.
7. Add table-level processes, driven by the saved metadata, that can generate data at the record level by leveraging the data type functionality you have built previously.
8. Then add the metadata, business rules and functionality to control the TABLE-TO-TABLE relationships; that is, the data model. You need the same DETPNO values in the SCOTT.EMP table that exist in the SCOTT.DEPT table.
The second approach I have used more often. I would it call the top-down approach and I use
it when test data is needed for an existing system. The main use case here is to avoid
having to copy production data to QA, TEST or DEV environments.
QA people want to test with data that they are familiar with: names, companies, code values.
I've found they aren't often fond of random character strings for names of things.
The second approach I use for mature systems where there is already plenty of data to choose from.
It involves selecting subsets of data from each of the existing tables and saving that data in a
set of test tables. This data can then be used for regression testing and for automated unit testing of
existing functionality and functionality that is being developed.
QA can use data they are already familiar with and can test the application (GUI?) interface on that
data to see if they get the expected changes.
For each table to be tested (e.g. DEPT) I create two test system tables. A BEFORE table and an EXPECTED table.
1. DEPT_TEST_BEFORE
This table has all EMP table columns and a TEST_CASE column.
It holds EMP-image rows for each test case that show the row as it should look BEFORE the
test for that test case is performed.
CREATE TABLE DEPT_TEST_BEFORE
TESTCASE NUMBER,
DEPTNO NUMBER(2),
DNAME VARCHAR2(14 BYTE),
LOC VARCHAR2(13 BYTE)
2. DEPT_TEST_EXPECTED
This table also has all EMP table columns and a TEST_CASE column.
It holds EMP-image rows for each test case that show the row as it should look AFTER the
test for that test case is performed.
Each of these tables are a mirror image of the actual application table with one new column
added that contains a value representing the TESTCASE_NUMBER.
To create test case #3 identify or create the DEPT records you want to use for test case #3.
Insert these records into DEPT_TEST_BEFORE:
INSERT INTO DEPT_TEST_BEFORE
SELECT 3, D.* FROM DEPT D where DEPNO = 20
Insert records for test case #3 into DEPT_TEST_EXPECTED that show the rows as they should
look after test #3 is run. For example, if test #3 creates one new record add all the
records fro the BEFORE data set and add a new one for the new record.
When you want to run TESTCASE_ONE the process is basically (ignore for this illustration that
there is a foreign key betwee DEPT and EMP):
1. delete the records from SCOTT.DEPT that correspond to test case #3 DEPT records.
DELETE FROM DEPT
WHERE DEPTNO IN (SELECT DEPTNO FROM DEPT_TEST_BEFORE WHERE TESTCASE = 3);
2. insert the test data set records for SCOTT.DEPT for test case #3.
INSERT INTO DEPT
SELECT DEPTNO, DNAME, LOC FROM DEPT_TEST_BEFORE WHERE TESTCASE = 3;
3 perform the test.
4. compare the actual results with the expected results.
This is done by a function that compares the records in DEPT with the records
in DEPT_TEST_EXPECTED for test #3.
I usually store these results in yet another table or just report them out.
5. Report out the differences.
This second approach uses data the users (QA) are already familiar with, is scaleable and
is easy to add new data that meets business requirements.
It is also easy to automatically generate the necessary tables and test setup/breakdown
using a table-driven metadata approach. Adding a new test table is as easy as calling
a stored procedure; the procedure can generate the DDL or create the actual tables needed
for the BEFORE and AFTER snapshots.
The main disadvantage is that existing data will almost never cover the corner cases.
But you can add data for these. By corner cases I mean data that defines the limits
for a data type: a VARCHAR2(30) name field should have at least one test record that
has a name that is 30 characters long.
Which of these approaches makes the most sense for you? -
How to generate columnar PDM for HANA?
Hi Folks,
I'm quite new to PowerDesigner and have been working on generating a HANA database from MS SQLServer.
Currently I've been able to import a source SQLServer system as a Physical Data Model in PowerDesigner. I was then able to generate SQL DDL scripts to generate the DB manually in HANA, and I also watched a video about how to generate the DB directly in HANA via a connection to the repository which seems straightforward.
The challenge that I'm current facing is how to alter the entire PDM to make *all* tables of type "column" rather than "row". Since SQLServer was the source system, rather than HANA, PowerDesigner appears to default to row store... (shouldn't PD's default storage type for HANA DB's be column store by default? This make substantially more sense than row store by default... but I'm digressing.)
I can see how to do this on a table-by-table basis, but haven't yet figured out how to cascade this setting to the whole PDM. Any assistance would be very much appreciated!
I also tried following this documentation, which didn't help much... it doesn't correspond with the windows/tabs/options that I'm seeing in PD 16.5 - http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc38058.1653/doc/html/oba1320752560336.html
Thanks!Hi
If what to want is globally change the Type of all the tables in a PDM, you can do it by using the List of Tables. You display the "Type" column in the grid and change the Type value from Row to Column while doing a multi selection
veronique -
How to view the DDL script prior to object deployment in OWB 10g R2?
How to view the DDL script prior to object deployment in OWB 10g R2?
Here is what I' looking for: in 10gR2, let's say I've built dimension X, but it's not deployed yet. I've selected one of the deployment options, let's say: "Deploy to Catalog only". Now, I'd like to see a DDL script that will be executed at the deployment time. Where can I find this script? What screen? What menu?
Thanks,
vrViewing the Scripts
After you have generated scripts for your target objects, you can open the scripts and
view the code. Warehouse Builder generates the following types of scripts:
■ DDL scripts: Creates or drops database objects.
■ SQL*Loader control files: Extracts and transports data from file sources.
■ ABAP scripts: Extracts and loads data from SAP systems.
To view the generated scripts:
1. From the Generation Results window, select an object in the navigation tree on the
left of the Generation Results dialog.
2. Select the Scripts tab on the right of this dialog.
The Scripts tab contains a list of the generated scripts for the object you selected.
3. Select a specific script and click the View Code button.
Regards,
Marcos -
"Generate in DDL" checked back after Export DDL
I have a table COUNTRY in a relational model with "Generate in DDL" flag unset. When I export the model with "File > Export > DDL File" the flag is set back and table is exported.
1) Is there a way to "convince" Data Modeler to leave the "Generate in DDL" flag unset and do not export the table?
2) Is this a bug?
There is a Foreign Key to table COUNTRY with the "Generate in DDL" flag set, but I would say this should not change the flag.I found the problem. When I do "File > Export > DDL File" , then Generate a small window shows with ticks for:
- Whole model
- - Assigned to Schemas
- - Not Assigned to Schemas
- - Schemas
- - Structured Types
- - Collection Types
All are selected and I only need to export objects "Not Assigned to Schemas". If I untick the "Whole Model" then I tick only "Not Assigned to Schemas" it will set all the tables/objects from the model, without using the "Generate in DDL" flag. More than this, it will set back the "Generate in DDL" flag for all objects in the model. Imagine that I have 100 objects into the model, how is to need to tick back the "Generate in DDL" flag for 30 objects of 100 all the time. This is an annoying bug if you agree. -
How to generate jasper report in pdf format using swing
hi all,
im new to swing and jasper.. can anybody provide me some example on how to generate the jasper report in pdf format? i will call the reportManager from sessionBean.. below is my code:
1)delegate:
public GenerateReportDto generateIntoPdfReport(String fileName, String outputFileName, Map parameters){
GenerateReportDto generateReportDto = getAuditTrailServiceRemote().generateIntoPdfReport(fileName, outputFileName, parameters);
return generateReportDto;
2)sessionBean:
public GenerateReportDto generateIntoPdfReport(String fileName, String outputFileName, Map parameters){
//Map parameters = new HashMap();
ReportManager reportManager = new ReportManager();
3)ReportManager()
public void generateIntoPdfReport(String fileName, String outputFileName, Map parameters) {
Connection conn = null;
try {
conn = dataSource.getConnection();
//Generate the report to bytes
File reportFile = new File(fileName);
byte[] bytes =
JasperRunManager.runReportToPdf(
reportFile.getPath(),
parameters,
conn
//conn.close();
//Write the bytes to a file
ByteBuffer buf = ByteBuffer.wrap(bytes);
File file = new File(outputFileName);
// (if the file exists)
boolean append = false;
// Create a writable file channel
FileChannel wChannel = new FileOutputStream(file, append).getChannel();
// Write the ByteBuffer contents; the bytes between the ByteBuffer's
// position and the limit is written to the file
wChannel.write(buf);
// Close the file
wChannel.close();
} finally {
if (conn != null) {
conn.close();
Any help would be highly appreciated. Thanks in advanceHi ,
One 'simple' way is by using the DBMS_SCHEDULER db package and the procedure CREATE_JOB(....) using as job_type the value 'EXECUTABLE'...
Read for further info in 'PL/SQL Packages and Types Reference'.
If you have access to OEM ... you can configure this there using wizard.....
Other way is to use the External Procedure call capabiblity of Oracle DB Server...:
http://www.oracle.com/pls/db102/ranked?word=external+procedure+call&remark=federated_search
My greetings,
Sim -
Best Practices:: How to generate XML file from a ResultSet
Hi all,
Could someone please suggest the best practices of how to generate an XML file from a resultset? I am developing a web application in Java with Oracle database and one of my tasks is to generate an XML file when the user, for example, click a "download as XML" button on the JSP. The application is basically like an Order with line items. I am using Struts and my first thought has been to have an action class which will extend struts's DownloadAction and through StAX's Iterator API to create an XML file. I intend to have a POJO which will have properties of all columns of my order and line items tables so that for each order I get all line items and:
1. Write order details then
2. Through an iterator write line items of that order to an XML file.
I will greatly appreciate for comments or suggestions on the best way to do this through any pointers on the Web.
alexUse a OracleWebRowSet in which an XML representation of the result set may be obtained.
http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/oracle10g/webrowset/Readme.html
http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/jcrowset.htm -
How to Generate Statistic Graph in Report??
Hi, i am developing an questionnaire program together with 19 question... i am able to get value for each value..
Now my problem is how to generate a statistic graph whenever user can check their report ??
Can anyone help?? Thank you very much......
from bscsThe easy way is to use your values to set the width or height of an image dynamically in HTML, but you can only do bar charts using this method.
For real reports and measures have a look at
http://www.jfree.org/jfreechart/index.php
http://www.jfree.org/jfreereport/index.php -
How to generate multiple output pdf's from one oracle reports
how to generate multiple output pdf's from one oracle reports.
I have a report where I have to generate more than one output files from the same report based on a parameter.
Each output file is for each parameter.
Is this possible in oracle reports, is so how ?You can better post your question in the reports forum instead of this pl/sql forum.
-
How to generate a row in report to compute total?
Hi:
I need help to generate a report. In an accounting report, I need to make sum for each client regarding outstanding balance. The format of report is following:
invoice#, invoice date, invoice amount, paid amount paid date, write off, outstanding balance
Client Name: Baker Express / Debtor Name: Kurt Weiss inc.
137308001, 04/18/2012, 438.07, 537.07, 06/05/2012, , (99)
137308002, 04/18/2012, 100, 90, 06/05/2012, 10,
client Total: total payment:627.07, total outstanding balance: (99)
another client and debtor pair
My question is how to generate total payment and total outstanding balancefor every pair of client and debtor. And there are multiple pairs. I tried to use group by, but how can I display every invoice tuple as well in the report?
Any help would be appreciated.
SamOne method would be to use ROLLUP in your SQL
http://www.oracle-base.com/articles/misc/rollup-cube-grouping-functions-and-grouping-sets.php
Maybe you are looking for
-
hi , sql developer 4.0.2 i want to run a batch file (.bat) every day , so i did that " scheduler > job(wizard) > job type(executable) > selected the .bat file > when to execute a job(Repeating) > clicked the edit button for " repeat interval " > in t
-
Dreamweaver Images look fine in view but messed up in BROWSER !!!
Hello Guys I have been getting this weird messed up images since i started my project. This is giving me a headache so i thought this is best place to solve my problme. I'm not pro website designer just newbie. HELP ME !!! <!DOCTYPE html PUBLIC "-//W
-
I can not upgrade to Java J2SE 5.0
When I click on the package I follow the step and it gets to selecting a disk to install too and gives me this error message: "You cannot instal J2SE 5.0 release 1 package on this volume. The volume contains a new version of Java 1.5. A Java folder d
-
I can receive e-mails but I can't open them. I tried turning the wi-fi on and off but that did not help. Has anyone had a similar problem?
-
This is on a an Acer Veriton DuoCore with 1 GB RAM. I've never had PSCS2 or any beta versions. I ran the CS3CleanUp [level 2] because I failed to install PSCS3 months ago and gave up. I downloaded a new copy of PSCS3. Installer runs smoothly but ends