Real Application Tesing Create table(DDL) captures or skips

Hi,
We are testing using Oracle Real Application Testing. We were able to capture and replay successfully. However on the capture side the application creates lot of tables during batch load and then drops them. It appears like these create table statements are not getting replayed on replay database.
Can any help me know if RAT(Real Application Testing) Capture the Create table (DDL) statements and replay's it successfully.
Thanks,
Ranga

Then make sure the parsing schema of that other workspace has create table privilege granted directly to it. Better yet, review the system privileges of the working schema and make sure the broken schema has the same privs. Do not grant privileges using roles.
Scott

Similar Messages

  • Help! 10g logical standby not replicating "create table" on standby

    Hi,
    I'm setting up a logical standby environment and everything works, except when I tried to create a simple table on the primary, the table doesn't show up on the standby. I tried creating a new tablespace on the primary and it shows up right away on the standby. I checked the error logs on both primary and standby and no errors.
    create table test1 (id number(10) primary key, col1 varchar(20), col2 varchar(20));
    The table is created successfully on primary and I also inserted couple of rows and all committed.
    I even tried the following query on the standby to check any failed events and the "create table" DDL doesn't show up , even if it failed:
    select event_time, status, event from dba_logstdby_events order by event_timestamp, commit_scn
    So I'm now confused. The logical standby is active and applying. What would be the issue? How do I find out ?
    Thanks

    had you started apply using this syntax
    real time apply
    alter database start logical standby apply immediate;
    check lag:
    alter session set nls_date_format='dd/mm hh24:mi';
    select newest_time || chr(22)|| newest_scn||chr(10)||applied_time||chr(22)||applied_scn||chr(13)||chr(16)||(newest_scn-applied_scn) lag from dba_logstdby_progress
    /

  • When I try to create table Application ,I am getting an error message .

    create table College(cName varchar2(200) NOT NULL PRIMARY KEY,
              state varchar2(20) NOT NULL,
         enrollment int NOT NULL (enrollment > 0);
    create table Student(sID int NOT NULL, sName varchar2(200) NOT NULL,
    GPA real NOT NULL CHECK(gpa >0 AND gpa < 4.0),
              sizeHS int NOT NULL,
              CONSTRAINT Primary_Key_SID PRIMARY KEY (SID));
    create table Application(sID int NOT NULL,
    cName varchar2(200) NOT NULL,
                   major varchar2(20) NOT NULL,
         decision varchar2(10)) NOT NULL CHECK(decision ='y'OR decision = 'n');
                   CONSTRAINT fk_Sid FOREIGN KEY (SID) REFERENCES Student(SID),
                   CONSTRAINT fk_Cname FOREIGN KEY(CNAME) REFERENCES college(CNAME));
    Error starting at line 5 in command:
    CONSTRAINT fk_Sid FOREIGN KEY (SID) REFERENCES Student(SID),
    Error report:
    Unknown Command
    Error starting at line 6 in command:
    CONSTRAINT fk_Cname FOREIGN KEY(CNAME) REFERENCES college(CNAME))
    Error report:
    Unknown Command
    Edited by: 974970 on Dec 4, 2012 12:54 PM

    a couple of side observations ..
    First, it is much easier to read code when it is (1) formatted, and (2) that formatting is preserved in the forum by use of the \ tag.CREATE
    TABLE College
    cName VARCHAR2(200) NOT NULL
    , state VARCHAR2(20) NOT NULL
    , enrollment INT NOT NULL (enrollment > 0);
    CREATE
    TABLE Student
    sID INT NOT NULL
    , sName VARCHAR2(200) NOT NULL
    , GPA REAL NOT NULL CHECK(gpa >0 AND gpa < 4.0)
    , sizeHS INT NOT NULL
    , CONSTRAINT Primary_Key_SID PRIMARY KEY (SID)
    CREATE
    TABLE Application
    sID INT NOT NULL
    , cName VARCHAR2(200) NOT NULL
    , major VARCHAR2(20) NOT NULL
    , decision VARCHAR2(10)
    NOT NULL CHECK
    decision ='y'OR decision = 'n'
    CONSTRAINT fk_Sid FOREIGN KEY (SID) REFERENCES Student(SID),
    CONSTRAINT fk_Cname FOREIGN KEY(CNAME) REFERENCES college(CNAME));
    Now,
    First, drop the mixed case names.  Oracle isn't going to store them in mixed case in the dictionary, and if your force it to do so you just create bigger problems for yourself.  You may have learned mixed case in the MS world, but this is Oracle.  When in Rome
    Second, you have a column named SID  (yes, you entered it as "sID", but to oracle it is SID.  And to oracle, it is a key word.  Find an alternative.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Create tables insert something inside and then connect my application to db

    thank you to be patient with me. ok since the beginning I think I have learned a lot with the people responses. so my database is mounted now. I used the cmd.exe command line. i have create an instance, a service, and the database. Now, I need to do two things:create tables inside of my database and insert something inside but I only have the sql script (I will add it at the end of the thread).it is just a part of my huge script.. but this cript can not be open with the command line. So I want to know if you could help me change some stuff inside in the aim to run this script with the command line.that's the first point
    secondly, I have an application named lifetrack. i want to connect this application with my database. so how can I change my settings file to be able to do that?(I will add the settings file I have at the end.It is the one I use for sql server). thanks a lot.I'm a french student so I try my best to answer you in a good english. and believe me if I have the exact way to create table,insert something inside like indicate in the part of my script and connect an application to the database you will never see my thread again. thank you
    1) sql script to create tables
    CREATE TABLE [admin_table] (
         [Can_highlight] [float] NULL ,
         [User_name] [nvarchar] (30) COLLATE Latin1_General_CI_AS NULL ,
         [User_passwd] [nvarchar] (10) COLLATE Latin1_General_CI_AS NULL ,
         [User_group] [nvarchar] (30) COLLATE Latin1_General_CI_AS NULL ,
         [Can_consolidate] [smallint] NULL ,
         [Can_edit_autorpt] [smallint] NULL ,
         [Can_edit_disturbance] [smallint] NULL
    ) ON [PRIMARY]
    GO
    INSERT INTO [admin_table] ([Can_highlight],[User_name],[User_passwd],[User_group],[Can_consolidate],[Can_edit_autorpt],[Can_edit_disturbance])
         VALUES (1.0,'A Andrews','A','both',0,0,1)
    GO
    2) sql server settings file
    ' NOTES:
    ' ======
    ' The parameters in this file are used to specify the following configuration features for the system
    ' 1. the plant profile
    ' 2. the default database as well as the available searchable databases
    ' 3. the paths for accessing particular files used or generated by the system
    ' The Panels Configuration Mode has either of two values: "Embedded" or "External". It is a setting that determines
    ' whether the system loads configuration data for the sections of subjects buttons, which are already embedded
    ' within it, or whether it loads them from the external file:
    ' "Lifetrack Subjects Panel Configuration.dat"
    ' The System Database is an index value (zero-based) that determines which of the listed available databases
    ' is the main active one. In the DATABASES section, the parameters in each comma separated string
    ' designate the following (in this order):
    ' DB Index, DB Name, DB Type, DB Filepath, Server Name, Username, Password
    PLANT SUBJECTS PANEL:
    Panels Configuration Mode: Embedded
    DATABASES:
    System Database: 0
    Available Databases: 1
    0,abc_plant,SQL-Server,SQLSERVER_DATABASE,(local),sa,password
    FOLDERS:
    Saved_Log_Folder: .\
    Saved_NOB_Folder: .\
    Saved_Log&NOB_Together_Folder: .\
    MICROSOFT OFFICE PATHNAME:
    Pathname: C:\Program Files\Microsoft Office\Office11\

    Yet another thread and yet another cut & paste job.

  • Create Tables on Very Furst Run of the Application

    Hi,
    I'm trying to create a derby(Java DB) database and its tables on the very first run of the application, but when I run second time, obviously it throws an exception of TABLE/VIEW already exists.
    So, once the database and its tables are created, how do I check for the second time so that it does not try to create it again.
    heres the code
                System.setProperty("derby.system.home", System.getProperty("user.dir"));
                Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
                Global.con = DriverManager.getConnection("jdbc:derby:emails;create=true");
                Statement stat = Global.con.createStatement();
                stat.executeUpdate("CREATE TABLE emails(" +
                        "email VARCHAR(100) DEFAULT ''," +
                        "category VARCHAR(80) DEFAULT ''," +
                        "status VARCHAR(30) DEFAULT ''," +
                        "website VARCHAR(100) DEFAULT ''" +
                stat.executeUpdate("INSERT INTO emails(email, status, website) VALUES('[email protected]', 'unsubscribed', 'alsharia.org')");
                ResultSet rs = stat.executeQuery("Select * from emails");
                while (rs.next()) {
                    System.out.println(rs.getString("email"));
                    System.out.println(rs.getString("status"));
                    System.out.println(rs.getString("website"));
                }

    Great. Heres the complete code with the solution.
            try {
                System.setProperty("derby.system.home", System.getProperty("user.dir"));
                Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
                Global.con = DriverManager.getConnection("jdbc:derby:emails;create=true");
                metaData = Global.con.getMetaData();
                rs = metaData.getTables(null, null, "%", null);
                while (rs.next()) {
                    if (rs.getString(3).equals("EMAILS")) {
                        System.out.println("database found");
                        databaseFound = true;
                if (databaseFound == false) {
                    System.out.println("creating database");
                    stat = Global.con.createStatement();
                    stat.executeUpdate("CREATE TABLE emails(" +
                            "email VARCHAR(100) DEFAULT ''," +
                            "category VARCHAR(80) DEFAULT ''," +
                            "status VARCHAR(30) DEFAULT ''," +
                            "website VARCHAR(100) DEFAULT ''" +
                    stat.executeUpdate("INSERT INTO emails(email, category, status, website) VALUES('[email protected]', 'Education', 'subscribed', 'website.org')");
                rs = stat.executeQuery("Select * from emails");
                while (rs.next()) {
                    System.out.println(rs.getString("email"));
                    System.out.println(rs.getString("status"));
                    System.out.println(rs.getString("website"));
            } catch (Exception e) {
                e.printStackTrace();
            }

  • How to see DDL script(create table) from view

    i want to view create table script(DDL command)
    can u suggest me any view for that.

    Hi
    There's no view where the DDL statement is directly available. It must be reconstructed from many views...
    If you use 9i the simpler way to do that is with DBMS_METADATA. Below and example....
    SQL&gt; SET LONG 1000000
    SQL&gt; SELECT dbms_metadata.get_ddl('TABLE','EMP') FROM dual;
    DBMS_METADATA.GET_DDL('TABLE','EMP')
    CREATE TABLE "SCOTT"."EMP"
    ( "EMPNO" NUMBER(4,0) NOT NULL ENABLE,
    "ENAME" VARCHAR2(10),
    "JOB" VARCHAR2(9),
    "MGR" NUMBER(4,0),
    "HIREDATE" DATE,
    "SAL" NUMBER(7,2),
    "COMM" NUMBER(7,2),
    "DEPTNO" NUMBER(2,0),
    CONSTRAINT "EMP_PK" PRIMARY KEY ("EMPNO")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ENABLE,
    CONSTRAINT "EMP_DEPT_FK" FOREIGN KEY ("DEPTNO")
    REFERENCES "SCOTT"."DEPT" ("DEPTNO") ENABLE
    ) 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 "USERS"
    Chris

  • DDL captured for Table Rules

    Is there a list of DDL that is captured for the different rules in the DBMS_STREAMS_ADM subprograms. For example, the ADD_GLOBAL_RULES probably captures more DDL than ADD_TABLE_RULES will.
    Basically, I have table rules set up and want to replicated or ignore certain DDL commands. However, I'd like to know which DDL commands I either need to ignore or apply in the DDL handler.
    Thanks!

    Thanks for the reply, but it's not helpful.
    I know where the Oracle doc is located and it doesn't answer my question, that's why I posted here.
    I also realize Global rules apply to the database, Schema rules apply to a schema, and Table rules apply to a table. That's easy to find in the doc.
    Here's an example - you have a Streams capture rule configured for a table and you specify you also want to capture DDL. Obviously any 'ALTER TABLE' DDL will be captured and applied.
    But what about the creation of indexes, triggers, views, synonyms, procedures, functions, and packages based on the table? These are the specifics that I'm unable to find in Oracle's doc - hence the question posted here.

  • Sql ddl replication strange behavior with create table

    Hello, I create the following table on my oracle DB server:
    CREATE TABLE test (a NUMBER(*,0) DEFAULT 0 NOT NULL,
    b DATE DEFAULT SYSDATE NOT NULL));
    ALTER TABLE test
    ADD CONSTRAINT pk_test PRIMARY KEY (a);
    when I deploy and sync, on the mobile I have the table well created, but the not null and default sysdate on the b column on are not set. It's null with no default values.
    Have anyone an idea ?
    Thank's for reply.

    We do not replicate not null or default values on Oracle Lite 5.0.2.x. This functionality will be available in the 10g release of Oracle Lite.
    - Junius

  • Need Help!!  Cannot Create Table

    Hi,
    I just installed Oracle XE and APEX 4.0.2. I REALLY need to create an application with 3 tables where I can update these tables via a form like found in Application Express. The install and configuration went very smoothly until I went to create an application built on my .csv files of the tables. When I try to add the table when building the application I get this error:
    ORA-20001: Unable to create modules. ORA-20001: create_table error: ORA-20001: Excel load run ddl error: ORA-01003: no statement parsed
    Can someone give me an idea how I can fix this error?
    Thanks so much for your help! It's greatly appreciated!!
    NS

    The user is system.Are you saying that the parsing schema for the application is the standard SYSTEM schema? This should not be possible, and is certainly not recommended. If this is somehow the case, create a new schema and use it instead.
    (Please update your forum profile with a better handle than "user649041".)

  • CREATE TABLE for another OWNER/SCHEMA and in another TABLESPACE?

    I am logged in a SYSTEM user. Now I want to create a table aaa. The owner of this table should not be SYSTEM but user KARL. and the TABLESPACE should not be SYSTEM but the (existing) TABLESPACE tttt.
    As far as I know I can achieve this by issuing the following command:
    CREATE TABLE KARL.aaa ( a INTEGER, .......) TABLESPACE tttt;
    Regarding the TABLESPACE parameter I am not sure. Is it possible to allocate a TABLE for User Karl in a TABLESPACE which is not assigned to him?
    Furthermore I have an additional problem.
    I have a script with hundreds of CREATE TABLE + ALTER TABLE + CREATE INDEX DDL statements.
    All of them are not prepended with Schema/Owner and an TABLESPACE clause.
    Can I put somehow one single instruction at the top of the script which telles Oracle
    to use
    - OWNER Karl as Schema/Owner for all subsequent DDL stements
    - TABLESPACE tttt as TABLESPACE for all subsequent DDL stements
    In MYsql there is a "use <database>" statement. Is there soemthing similar for Oracle?
    Thank you
    Peter

    Yes... you can do that. Take for example a user A who has a secret password that you don't wish to give out... like an application schema. User B needs to make tables/objects in schema A and you want to track what user B is doing. First setup Oracles Fine Grained Auditing and then grant "connect through" from user A to user B as follows:
    SQL> create user b identified by abc123
      2    quota unlimited on users;
    User created.
    SQL> grant create session to b;
    SQL> create user a identified by abc123
      2    quota unlimited on users;
    User created.
    SQL> grant create table
      2      , create session
      3     to a;
    Grant succeeded.
    SQL> alter user a grant connect through b;
    User altered.
    SQL> connect b[a]/abc123@a486
    Connected.
    SQL> show user
    USER is "A"
    SQL> create table a.my_proxy_table
      2  ( c1 number
      3  , c2 varchar2(50)
      4  , c3 date
      5  );
    Table created.-----
    See that I connected using the "username[proxyuser]" syntax. Also notice that user B is by proxy user A, illustrated by my "show user" command. The connect through can be granted/revoked as needed without divulging A's password to B. In addition, your audit tables or xml logs will track the fact that user B created table a.my_proxy_table.
    Hope this helps,
    John

  • EXEC SQL & CREATE TABLE

    Hi,
    I am trying to create table using EXEC SQL. But, the table that I had created using EXEC SQL is not shown in data dictionary. I can not see that table from SE11. If I run the same program again, then gives error about there is already a table that I want to create. So, How can see it? Is seeing that table possible?
    EXEC SQL.
    CREATE TABLE ZCOPYTABLE(
    NAME CHAR(15) NOT NULL,
    SURNAME CHAR(15) NOT NULL,
    TEL CHAR(10) NOT NULL,
    PRIMARY KEY (NAME, SURNAME)
    ENDEXEC.

    Hello Huseyin,
    I don't think you can use the Native SQL statements for DDL (data definition language) statements in SQL.
    The reason is that the Native SQL statements by-pass the SAP Application Server and are executed directly at the Database Server. You will find more information on the SAP Online Help Documentation site.
    Since the ABAP Dictionary is very much an application, it fails to recognize the tables which were not created through it.
    The DDL statements in Native SQL are only for advanced database adminstration tasks.
    Hope this helps.
    Regards,
    Anand Mandalika.

  • ORA-47401: Realm violation for create table on SYS.REGISTRY$HISTORY

    Hi i have 10.2.0.4 db with db vault on RHEL4. I am applying jan2010 patch on it. After applying patch when i am trying to recompile views i am facing the below error.(I am executing this after starting up database in upgrade mode)
    SQL> @$ORACLE_HOME/cpu/view_recompile/view_recompile_jan2008cpu.sql
    BEGIN
    ERROR at line 1:
    ORA-47401: Realm violation for create table on SYS.REGISTRY$HISTORY
    ORA-06512: at line 16
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, Oracle Label Security, OLAP, Data Mining,
    Oracle Database Vault and Real Application Testing options
    [oracle@rac1 view_recompile]$
    Plese help me on this.
    Regards,
    snp

    Perhaps you are tripping over Bug 6928496. I suspect best bet is to open a SR with Oracle rather than hope for similar occurance within the user community.

  • Create Table from Spreadsheet Error / Privileges

    Using Application Express 2.2.0.00.32.
    I can create a table using the Object Browser or via the SQL Command utility. If I try to load data from a csv or create an application from a spreadsheet, I get the following:
    ORA-20001: Unable to create modules. ORA-20001: create_table error: ORA-20001: Excel load run ddl error: ORA-01031: insufficient privileges
    I've tried searching the forums, but haven't found the needle in this haystack yet.
    Probably a common problem but it has me perplexed.
    What piece of the puzzle am I not understanding?
    Thanks.
    cagora

    Then make sure the parsing schema of that other workspace has create table privilege granted directly to it. Better yet, review the system privileges of the working schema and make sure the broken schema has the same privs. Do not grant privileges using roles.
    Scott

  • Create table script by passing value from table

    I Have a procedure to check if the table exists, if yes drop and re-create else create table.
    CREATE OR REPLACE
    PROCEDURE test_proc authid current_user
    AS
    v_cnt NUMBER:=0;
    BEGIN
    SELECT COUNT(*)
    INTO v_cnt
    FROM all_tables
    WHERE table_name='T1'
    AND owner = 'WORKSPACE';
    IF v_cnt = 1 THEN
    EXECUTE immediate 'DROP TABLE WORKSPACE.T1';
    END IF;
    EXECUTE immediate 'CREATE TABLE WORKSPACE.T1
    ITM_NBR NUMBER ,
    LCT_NBR NUMBER
    SELECT COUNT(*)
    INTO v_cnt
    FROM all_tables
    WHERE table_name='T2'
    AND owner = 'WORKSPACE';
    IF v_cnt = 1 THEN
    EXECUTE immediate 'DROP TABLE WORKSPACE.T2';
    END IF;
    EXECUTE immediate 'CREATE TABLE WORKSPACE.T2
    LCT_NBR NUMBER(5, 0) NOT NULL ,
    PRY_CD NUMBER(5, 0) NOT NULL )';
    END;
    Requirement: Instead of passing the Owner,tablename & the create table scripts directlyin the query, it should be passed from a database table which will be in given format.
    TableName Query Owner
    T1 CREATE TABLE WORKSPACE.T1(ITM_NBR NUMBER, LCT_NBR NUMBER) WORKSPACE
    T2 CREATE TABLE WORKSPACE.T2(LCT_NBR NUMBER(5, 0) NOT NULL ,PRY_CD NUMBER(5, 0) NOT NULL) WORKSPACE

    user12276240 wrote:
    Excuse all. The database columns are yet to be finalized and every time changes come in we are currently dropping and re-creating the tables which leads in changing the script, hence we are going in for this approach.
    Moreover if i am going to have this script everytime i have to drop and re-create all the tables which can be elimated by this way.So why not have a SQL script as follows?
    drop table emp purge;
    create table emp(
    create index .. on emp( .. );
    ..It drops the existing table (if exists). It then creates the table with constraints and indexes. This script is now the master definition of the table. You can slap a change log header to it. Any changes that needs the table to be redefined and recreated are done via this script. Which means it is also checked into the source code repository as it is part of the code of that system/application.
    I would however remove the drop table from it in case some developer accidentally run it at the wrong time and trash the table.
    The bottom line is that DDL code is part and parcel of the installation, configuration and setup code - and that this is as important as the source code. This code also needs to be "formalised" in proper scripts, checked into SVN/CVS/etc, and used to bootstrap the system (or parts of it), as and when needed.

  • Way to programmatically drop-and-create-tables?

    Hi all,
    I have a persistence unit which exists to provide lookup information to my application. It is populated by data that is available at runtime. It takes a long time to parse this data, and therefore my intention is to only parse it once at the deployment target. To do this, I have created a main method that does all the parsing, and I do not set the toplink.ddl-generation property in persistence.xml. This causes the application to fail if the database is not created.
    However, this means that during the population stage, I must drop and create any existing tables. I had thought it would be possible to do this by obtaining an EntityManagerFactory which has a property map sent to it, containing the property toplink.ddl-generation set to drop-and-create-tables. But this does not work... the tables are not dropped (if they exist) and are not created (if the database is empty).
    Is it possible to do the drop-and-create-tables programmatically using the JPA?
    I may have another EntityManagerFactory open at the same time, which has been opened with the default options... would this be conflicting?

    I don't think there is any easy way to generate the default tables once your have created the EntityManagerFactory. You could use the EclipseLink/TopLink schemaframework or TableCreator to create tables using a EclipseLink/TopLink DatabaseSession.
    There is a DefaultTableGenerator in org.eclipse.persistence.tools.schemaframework, which may give you what you are looking for.
    -- James : http://www.eclipselink.org

Maybe you are looking for