Create table statement will hang the State... in ODI... in the BI database

Our development team is trying to create an external tabe in the database of another schema. ODI is to create the inside connection bridge. I don't know how. But whenever they get from this request, he'll hang on State. When in the same code works fine in a different database.

Users whereby they are connceting to the source in the fire database this query have the same privileges.
For a database, it works fine that the table is created in the target database and in the correct schema but for another, it doesn't work and hung... (not giving any results)

Databases are used to the BI work and having almost the same configurations.
I checked the view target database v$ session. It gives me < enq: PS - contention > event
and three rows are back with < PX Deq: table Q narrow > event for others following two lines...

is - can anyone shed some light on this? What should I do now. like killing the session blocking is not solve problems


Here is an example of the executed query:

CREATE TABLE SCHEMA_NAME. C$ _0ODS_JDE_F0004
(C1_DTSY, C2_DTUCD1, C3_DTRT, C4_DTJOBN, C5_DTUPMJ_DT, C6_DTMRTY, C7_DTDL01, C8_DTPID,
C9_DTMRCT, C10_DTLN2, C11_DTCNUM, C12_DTUSEQ, C13_DTUSER, C14_DTCDL, JRN_SUBSCRIBER, JRN_FLAG, JRN_DATE)
EXTERNAL ORGANIZATION
(TYPE oracle_datapump
THE DEFAULT DIRECTORY DIR_SCHEMA_NAME
LOCATION ("X58030417C$ _0ODS_JDE_F0004_1.EXP", ' X58030417C$ _0ODS_JDE_F0004_2.EXP ')
)
2 PARALLEL AS
SELECT
NVL (TRIM (F0004. (DTSY), ' ') C1_DTSY, NVL (TRIM (F0004. (DTUCD1), ' ') C2_DTUCD1, F0004. DTRT C3_DTRT,
TRIM (F0004. C4_DTJOBN DTJOBN), J2DT (DTUPMJ, DTUPMT) C5_DTUPMJ_DT, NVL (TRIM (F0004. (DTMRTY), ' ') C6_DTMRTY;
TRIM (F0004. DTDL01) C7_DTDL01, TRIM (F0004. DTPID) C8_DTPID, F0004. DTMRCT C9_DTMRCT, F0004. DTLN2 C10_DTLN2,
F0004. DTCNUM C11_DTCNUM, F0004. DTUSEQ/10 C12_DTUSEQ, TRIM (F0004. C13_DTUSER DTUSER),
F0004. DTCDL C14_DTCDL, ' ' AS JRN_SUBSCRIBER, 'I' AS JRN_FLAG, SYSDATE AS JRN_DATE
OF SCHEMA_NAME. F0004 F0004 WHERE (1 = 1)

-Best regards,.
Saha

scratched...

-saha

Tags: Database

Similar Questions

  • ORA-14030: partitioning column does not exist in the CREATE TABLE statement

    Hi all

    We are trying to create a partition materialized view and get an error below.
    ORA-14030: partitioning column does not exist in the CREATE TABLE statement
    Our GL_BALANCES21 and GL_CODE_COMBINATIONS21 base tables is already divided by interval of the range on Code_combination_id.
    In the same way that we try to partition the view materialized
    We get the error.
    ORA-14030: partitioning column does not exist in the CREATE TABLE statement
    Where the clause there are 4 tables gl_balances21, gl_code_combinations21, gl_periods and gl_set_of_books.


    CREATE MATERIALIZED VIEW apps. BAL_PART
    PARTITION BY RANGE ("CODE_COMBINATION_ID")
    (SCORE LOWER (80000) VALUES,
    PARTITION OF LOWER VALUES (160000),
    PARTITION OF LOWER VALUES (240000),
    PARTITION OF LOWER VALUES (320000),
    PARTITION OF LOWER VALUES (400000),
    PARTITION OF LOWER VALUES (480000),
    PARTITION OF LOWER VALUES (560000),
    PARTITION OF LOWER VALUES (640000),
    PARTITION OF LOWER VALUES (720000),
    PARTITION OF VALUES LESS THAN (800000),
    PARTITION OF LOWER VALUES (880000),
    PARTITION OF LOWER VALUES (960000),
    PARTITION OF VALUES LESS THAN (10400000),
    PARTITION OF LOWER VALUES (11200000),
    PARTITION OF LOWER VALUES (12000000),
    PARTITION OF LOWER VALUES (12800000),
    PARTITION OF VALUES LESS THAN (13600000),
    PARTITION OF LOWER VALUES (14400000),
    PARTITION OF VALUES LESS THAN (15200000),
    PARTITION OF LOWER VALUES (16000000),
    PARTITION OF VALUES LESS THAN (16800000),
    PARTITION OF VALUES LESS THAN (17600000),
    PARTITION OF VALUES LESS THAN (18400000),
    PARTITION OF VALUES LESS THAN (19200000),
    PARTITION OF LOWER VALUES (20000000),
    PARTITION OF VALUES LESS THAN (20800000),
    PARTITION OF VALUES LESS THAN (21600000),
    PARTITION OF VALUES LESS THAN (22400000),
    PARTITION OF VALUES LESS THAN (23200000),
    PARTITION OF LOWER VALUES (24000000),
    PARTITION OF VALUES LESS THAN (24800000),
    PARTITION OF VALUES LESS THAN (25600000),
    PARTITION OF VALUES LESS THAN (26400000),
    PARTITION OF LOWER VALUES (27200000),
    PARTITION OF LOWER VALUES (28000000),
    PARTITION OF VALUES LESS THAN (28800000),
    PARTITION OF VALUES LESS THAN (29600000),
    PARTITION OF VALUES LESS THAN (30400000),
    PARTITION VALUES LESS THAN (MAXVALUE))
    QUICKLY REFRESH ON DEMAND
    SELECT the QUERY REWRITE as
    SELECT GL.GL_CODE_COMBINATIONS21. ROWID C1,
    GL.GL_BALANCES21. ROWID C2,
    "GL". "" GL_BALANCES21 ". "" ACTUAL_FLAG, "
    "GL". "" GL_BALANCES21 ". "" CURRENCY_CODE "
    "GL". "" GL_BALANCES21 ". "" PERIOD_NUM, "
    "GL". "" GL_BALANCES21 ". "" PERIOD_YEAR ".
    "GL". "" GL_BALANCES21 ". "" SET_OF_BOOKS_ID ""SOB_ID"
    "GL". "" GL_CODE_COMBINATIONS21 ". "" CODE_COMBINATION_ID ""CCID.
    "GL". "" GL_CODE_COMBINATIONS21 ". "" SEGMENT1 ",.
    "GL". "" GL_CODE_COMBINATIONS21 ". "" SEGMENT10, "
    "GL". "" GL_CODE_COMBINATIONS21 ". "" DIRECTION11, "
    "GL". "" GL_CODE_COMBINATIONS21 ". "" SEGMENT12, "
    "GL". "" GL_CODE_COMBINATIONS21 ". "" SEGMENT13, "
    "GL". "" GL_CODE_COMBINATIONS21 ". "" SEGMENT14, "
    "GL". "" GL_CODE_COMBINATIONS21 ". "" SEGMENT2 ",.
    "GL". "" GL_CODE_COMBINATIONS21 ". "" SEGMENT3. "
    "GL". "" GL_CODE_COMBINATIONS21 ". "" SEGMENT4, "
    "GL". "" GL_CODE_COMBINATIONS21 ". "" SEGMENT5, "
    "GL". "" GL_CODE_COMBINATIONS21 ". "" SEGMENT6, "
    "GL". "" GL_CODE_COMBINATIONS21 ". "" SEGMENT7. "
    "GL". "" GL_CODE_COMBINATIONS21 ". "" SEGMENT8, "
    "GL". "" GL_CODE_COMBINATIONS21 ". "" SEGMENT9, "
    "GL". "" "" GL_PERIODS '. "" PERIOD_NAME,"
    NVL ("GL". "GL_BALANCES21" "." " (BEGIN_BALANCE_CR', 0) Open_Bal_Cr,
    NVL ("GL". "GL_BALANCES21" "." " (BEGIN_BALANCE_CR', 0) +.
    NVL ("GL". "GL_BALANCES21" "." " (PERIOD_NET_CR', 0) Close_Bal_Cr,
    NVL ("GL". "GL_BALANCES21" "." " (BEGIN_BALANCE_DR', 0) Open_Bal_Dr,
    NVL ("GL". "GL_BALANCES21" "." " (BEGIN_BALANCE_DR', 0) +.
    NVL ("GL". "GL_BALANCES21" "." " (PERIOD_NET_DR', 0) Close_Bal_Dr,
    NVL ("GL". "GL_BALANCES21" "." " (BEGIN_BALANCE_DR', 0).
    NVL ("GL". "GL_BALANCES21" "." " (BEGIN_BALANCE_CR', 0) Open_Bal,
    NVL ("GL". "GL_BALANCES21" "." " (BEGIN_BALANCE_DR', 0).
    NVL ("GL". "GL_BALANCES21" "." " (BEGIN_BALANCE_CR', 0) +.
    NVL ("GL". "GL_BALANCES21" "." " (PERIOD_NET_DR', 0).
    NVL ("GL". "GL_BALANCES21" "." " (PERIOD_NET_CR', 0) Close_Bal,
    NVL ("GL". "GL_BALANCES21" "." " (PERIOD_NET_CR', 0) Period_Cr,
    NVL ("GL". "GL_BALANCES21" "." " (PERIOD_NET_DR', 0) Period_Dr
    OF GL.GL_CODE_COMBINATIONS21.
    GL.GL_BALANCES21,
    GL.GL_SETS_OF_BOOKS,
    GL.GL_PERIODS
    WHERE GL.GL_BALANCES21. CODE_COMBINATION_ID = GL.GL_CODE_COMBINATIONS21. CODE_COMBINATION_ID
    AND GL.GL_SETS_OF_BOOKS. SET_OF_BOOKS_ID = GL.GL_BALANCES21. SET_OF_BOOKS_ID
    AND GL.GL_PERIODS. PERIOD_NUM = GL.GL_BALANCES21. PERIOD_NUM
    AND GL.GL_PERIODS. PERIOD_YEAR = GL.GL_BALANCES21. PERIOD_YEAR
    AND GL.GL_PERIODS. PERIOD_TYPE = GL.GL_BALANCES21. PERIOD_TYPE
    AND GL.GL_PERIODS. PERIOD_NAME = GL.GL_BALANCES21. PERIOD_NAME
    AND GL.GL_PERIODS. PERIOD_SET_NAME = GL.GL_SETS_OF_BOOKS. PERIOD_SET_NAME
    and gl.GL_CODE_COMBINATIONS21.summary_flag! = « Y »

    ERROR on line 54:
    ORA-01013: user has requested the cancellation of the current operation

    I checked the metalink note saying that ensure that all columns in a partitioning column list are columns of
    the table being created.

    Partition is already there, on the column of code_combination_id of gl_balances21 and gl_code_combinations21.

    Please suggest.

    Thank you

    It's your mistake:

    PARTITION BY RANGE ("CODE_COMBINATION_ID") 
    

    but in your projection of column list, you have an alias he:

    "GL"."GL_CODE_COMBINATIONS21"."CODE_COMBINATION_ID" "CCID",
    

    You must use the alias as a partition key, not the name fom the secondary table column.
    --
    John Watson
    Oracle Certified Master s/n
    http://skillbuilders.com

  • How to specify the tablespace for a India primary key in create table statement

    How to specify the storage space for a primary key index in a create table statement?
    Does the following statement is true?
    CREATE TABLE 'GPS'||TO_CHAR(SYSDATE+1,'YYYYMMDD')
                ("ID" NUMBER(10,0) NOT NULL ENABLE, 
                "IP_ADDRESS" VARCHAR2(32 BYTE), 
                "EQUIPMENT_ID" VARCHAR2(32 BYTE), 
                "PACKET_DT" DATE, 
                "PACKET" VARCHAR2(255 BYTE), 
                "PACKET_FORMAT" VARCHAR2(32 BYTE), 
                "SAVED_TIME" DATE DEFAULT CURRENT_TIMESTAMP, 
                 CONSTRAINT "UDP_LOG_PK" PRIMARY KEY ("ID") TABLESPACE "INDEX_DATA"
                 )            
                 TABLESPACE "SBM_DATA";   
    Thank you

    Published by: qkc November 9, 2009 13:42

    As orafad noted, you can use the documentation using ESCALATION clause, i.e.

    SQL> ed
    Wrote file afiedt.buf
    
      1  CREATE TABLE GPS
      2              ("ID" NUMBER(10,0) NOT NULL ENABLE,
      3              "IP_ADDRESS" VARCHAR2(32 BYTE),
      4              "EQUIPMENT_ID" VARCHAR2(32 BYTE),
      5              "PACKET_DT" DATE,
      6              "PACKET" VARCHAR2(255 BYTE),
      7              "PACKET_FORMAT" VARCHAR2(32 BYTE),
      8              "SAVED_TIME" DATE DEFAULT CURRENT_TIMESTAMP,
      9               CONSTRAINT "UDP_LOG_PK" PRIMARY KEY ("ID") USING INDEX TABLESP
    ACE "USERS"
     10               )
     11*              TABLESPACE "USERS"
    SQL> /
    
    Table created.
    

    Justin

  • Create table statement bulk

    Hello

    I am facing the following problem:

    A database is running with a large number of tables.
    Database B must contain the same tables with different data (DB B is empty at the moment).
    So I have collected all the "create table" - statements and they crammed into a script.

    Because there are a several foreign key constraints in the DB A (not all may be delayed) it seems to be a problem to run the script.
    I searched on the internet how to disable constraints before the execution of the instructions, but I ' ve only found solutions for the deactivation of the constraints for existing tables already - don't disable forced verifies the determination to create.

    So, could you please give me a hint what keywords should I use to search?

    Thanks in advance.

    It seems you are interested only in the metadata DB A to B. DB

    If it is 10g, you can use METADATA_ONLY with expdp

    Otherewise, you can set lines = n with exp.

    and put the list of tables in a parameter file.

    HTH...

    Published by: SKU on December 7, 2009 11:05

  • Create table with data in the column

    Create a new table, just want to know if there is a way to add a new column to the table with a value in all areas of this column when new rows are added to that this column will always be the same value

    As...

    name | address | zip | assets



    Active will always be Yes.
    I do a trigger?

    Use the default...

    create table (test)
    name varchar2 (20).
    address varchar2 (40),
    zip number (7).
    Active VARCHAR2 (3) DEFAULT NULL NOT 'yes');

  • create table of references to the elements of the array to another

    I was trained by support OR read an array of image files in a table of indicators of the photo and then in order to save memory, establish a table of references in the table of elements "indicators photo so that I can use them in a subsequent loop."    Does anyone know a quick way to create this array of references to a table of indicators of the photo?

    That's what I think is meant by this recommendation, but it was written improperly.  I needed another view of people to him and got him - Thx

  • creating table using joins in the subquery

    can we create a table using joins in the subquery?
    Like this
    create table emp in select * from employee e, Department d
    where d.department_id = e.department_id
    ??
    We can?

    987018 wrote:
    We can?

    Yes, as long as you column alias names common to both tables to make them unique.

    SY.

  • A full import by using datapump will overwrite the target database data dictionary?

    Hello

    I have a 11G with 127 GB database. I did a full export using expdp as a user of the system. I'll import the created dump file (which is 33 GB) on the basis of data from 12 c target.

    When I do the full import on the 12 c database data dictionary is updated with new data. But as is it already contained data dictionary? It will also change?

    Thanks in advance

    Hello

    In addition to the responses of the other comrades

    To start, you need to know some basic things:

    The dictionary database tables are owned by SYS and must of these tables is created when the database is created.

    Thus, in the different versions of database Oracle there could be less or more data dictionary tables of different structure database,.

    so if this SYSTEM base tables are exported and imported between different versions of oracle, could damage the features of database

    because the tables do not correspond with the version of database.

    See the Ref:

    SYS, owner of the data dictionary

    Database Oracle SYS user is owner of all the base tables and a view of the data available to the user dictionary. No Oracle database user should never change (UPDATE, DELETE, or INSERT) ranks or schema objects contained in the SYS schema, because this activity can compromise the integrity of the data. Security administrator must keep strict control of this central account.

    Source: http://docs.oracle.com/cd/B28359_01/server.111/b28318/datadict.htm

    Prosecutor, the utilities for export cannot export the dictionary SYS base tables and is marked

    as a note in the documentation:

    Data Pump export Modes

    Note:

    Several patterns of system cannot be exported because they are not user patterns; they contain metadata and data managed by Oracle. Examples of system schemas that are not exported MDSYS SYS and ORDSYS.

    Source: https://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_export.htm#SUTIL826

    That's why import cannot modify/alter/drop/create dictionary database tables. If you can not export, so you can not import.

    Import just to add new Non - SYS objects/data in the database, therefore new data are added to the dictionary base tables (as new users, new tables, code pl/sql etc).

    I hope that this might answer your question.

    Kind regards

    Juan M

  • Among the data tables is missing from the 11g database. How to restore?

    Hello

    In my development 11G database, one database of tables is missed on Sept. 4.

    I have available valid RMAN backups, to restore the missing data in table I intend to do the following steps:-

    (1) create a new database
    (2) restore the fresh 3 taken rman sep to the DB Backup
    (3) now take the export of backup in the table whose data are not being met since the new database
    (4) import the exported backup of the old DB table.


    Is it the right way, I think? or any other alternative method that we have?

    Please suggest.


    Thanks in advance,
    Florine Reddy
    1) Create a fresh DB
    2) Restore the rman backup taken on 3rd sep to the fresh DB
    3) Now take the export backup of the table which the data is missed from the new DB
    4) Import the exported backup of the table to the old DB.
    

    fix!

  • satellite P30-109 with atheros AR5004G will hang the PC

    I have a P30, and when I'm on the internet of card wireless wil hang itself together with pc.
    When you restart the pc, it gives an erros:
    "conflict with pci slot 3 (pci bus 2, device 2, function 0).
    the only thing that helps is to screw open the pc remove the card wireless integrated, wait a second and mount it again. then wait a few hours until restart it wil happen again: (.)
    and start over al.
    some time, I'm lucky that I don't need to reinstall everything again but I get a little more on tires of this and I did not beleave it is normal.

    I also installed the last andso on drivers please help me

    Peter-jaap

    Hello Peter

    It is of course that there is a hardware conflict. I really don t say what you can do to solve this problem.

    If you want to be sure if there is everything well built into the Atheros card and reinstall the OS using the recovery CD. On this way, the operating system will be clean and after the first start will be detected and properly recognized all hardware components.

  • Maintain the table of errors in the Oracle database

    Hi all
    I want to save all the error record in database table of $ odi E,.
    Which step to do to achieve this goal.

    Thank you very much
    Ngoyi

    Good to know you found the solution to what you want. Remember to assign points (useful / Correct) accordingly to the thread before closing, which encouraged the experts to help you more quickly and efficiently. :)

  • How to create a table in a schema in the SOA database

    Hello

    can you please guide me how to create a table looks under custom schema available in the SOA database

    Thank you

    Valsaint

    Hello

    1. use JDeveloper to connect to your schema custom: view > Database > Database Navigator > new connection

    2. set the mpdel of your table column names, types of data, constraints (primary key, not null, foreign key, etc..)

    3. use this simplified tutorial to create the table according to your model of table create statement - Oracle/PLSQL: CREATE TABLE statement

    4. execute the statement in the SQL of JDeveloper journal for the custom connection (point 1 above).

    Let me know if you need help!

    HTH,

    A.

  • Add default column have Boolean when creating table

    Hello

    I am trying to create a table with the default value for boolean data, as shown below:


    CREATE TABLE test_users)
    user_id number (11) NOT NULL PRIMARY KEY,
    first name varchar2 (50).
    VARCHAR2 (50) last_name,.
    e-mail varchar2 (100),
    user_password varchar2 (100),
    Zip_code varchar2 (50).
    title varchar2 (100),
    Description varchar2 (2000).
    PICTURE_PATH varchar2 (2000).
    one_time_activation number (1) value default null check (one_time_activation in (0,1)).
    one_time_activation_code varchar2 (100),
    is_active number (1) value default null check (is_active in (0,1)).
    security_question_id number (11),
    security_answer varchar2 (100),
    inserted_date DateTime,
    DateTime MODIFIED_DATE,
    check the number IS_DELETED (1) default 0 (is_deleted in (0,1)).
    last_login_date DateTime,
    no_of_views number (20) default 0,.
    is_redirect_to_edit_profile number (1) 1 check default (is_redirect_to_edit_profile in (0,1)).
    present_login_date DateTime,
    check the is_interested_ab_membership number (1) default 0 (is_interested_ab_membership in (0,1)).
    joined_date DateTime,
    removed_date DateTime,
    is_admin_deleted number (1) default check 0 (is_admin_deleted in (0,1)).
    moderated_by number (11),
    is_subscribe_newsletter number (1) default check 0 (is_subscribe_newsletter in (0,1)).
    user_pagination number (3) 15 by DEFAULT
    );

    but I'm getting
    Error on line 1
    ORA-00902: invalid data type

    Thank you

    Whatever your question has to do with sql developer?

    You don't even tell what database you want to use.

    Oracle does not support a data type 'datetime' so your create table statement will not work in Oracle.

    If you replace "datetime" 'date' the table creates very well.

  • what need parameter should be ignored for creating table in LMT

    Hi all

    I have locally managed tablespace (LMT) with the type of ventilation SYSTEM and segment_space_management is AUTOMATIC. My database is Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi.

    I have for example:

    create table (ID)
    PCTFREE 5
    INITTRANS 2
    STORAGE (Initial...).


    Oracle documnetation, I found that it is recommended to omit the storage clause when you use LMT.

    I want to know, I do also omit PCTFREE 5, INITTRANS 2 of the create table statement?

    Thanks for any advice.

    Dear spur230,

    Yes, you can omit these parameters either.

    Here's the answer to your question;

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14231/tspaces.htm#sthref1153

    +"+
    * + Creating a locally managed Tablespace + *.

    + Create a locally managed tablespace by specifying IN clause of the CREATE TABLESPACE statement SCOPE MANAGEMENT. This is the default value for new permanent storage space, but you must specify the EXTENT MANAGEMENT LOCAL clause if you want to specify the AUTOALLOCATE or the UNIFORM clause. You can have the database to manage extensions for you automatically with the clause AUTOALLOCATE (default), or you can specify that the tablespace is managed with uniform extents of a specific size (UNIFORM). +

    + If you plan the tablespace contains objects of various sizes, requiring many scopes with different sizes, then AUTOALLOCATE is the best choice. AUTOALLOCATE is also a good choice if it is not important for you to have a lot of control over the allocation of space and the deallocation, because it simplifies the management of the table space. A space may be wasted with this parameter, but the advantage of having the Oracle database manage your space probably outweigh this disadvantage. +

    + If you want exact control on unused space, and you can predict exactly the space to allocate for an object or objects and the number and size of extensions, and then UNIFORM is a good choice. This setting ensures that you will never have the unusable space in your tablespace. +

    * + When you do not explicitly specify the type of management, database Oracle determines management extended as follows: + *.

    + * _If the CREATE TABLESPACE statement omits the DEFAULT storage clause, then the database creates a locally managed tablespace autoallocated. _ +
    + * _If the CREATE TABLESPACE statement includes a default storage clause, then the database considers the following: _ +.
    + O _If you specified AS MINIMUM clause, the database evaluates if MEASURE MINIMUM values, INITIAL, FOLLOWING are equal, and the value for PCTINCREASE is 0. If so, the database creates a locally managed tablespace uniform with size = INITIAL measurement. If the parameters to MEASURE MINIMUM INITIAL and NEXT are not equal, otherwise PCTINCREASE is not 0, the database ignores storage extent parameters you specify and creates a locally managed tablespace autoallocated. _ +
    + o _If you have not specified a MEASURE MINIMUM clause, the database evaluates only if the values of storage are the same INITIAL and NEXT and PCTINCREASE is 0. If so, the tablespace is locally managed and uniform. Otherwise, the tablespace is locally managed and autoallocated. _ +

    + The following statement creates a managed tablespace locally named lmtbsb and specifies AUTOALLOCATE: +.

    + CREATE TABLESPACE lmtbsb DATAFILE ' / u02/oracle/data/lmtbsb01.dbf' SIZE 50 +.
    + EXTENT MANAGEMENT LOCAL AUTOALLOCATE; +

    + AUTOALLOCATE causes tablespace system managed with a volume of minimum extent of 64K. +

    + The alternative to AUTOALLOCATE is UNIFORM. who says that the tablespace is managed with uniform size extents. You can specify the size of the uniform SIZE clause. If you omit the SIZE, the default size is 1 M. +

    + The following example creates a tablespace with uniform extents of 128 K. (In a database with 2 K blocks, each would amount to 64 blocks of data). Each measure 128K is represented by a bit in the bitmap extent for this file. +

    + CREATE TABLESPACE lmtbsb DATAFILE ' / u02/oracle/data/lmtbsb01.dbf' SIZE 50 +.
    + EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K; +

    + You can not specify the storage, TEMPORARY or MEASURE MINIMUM clause by DEFAULT when you explicitly specify EXTENT MANAGEMENT LOCAL. If you want to create a locally managed temporary tablespace, use the statement to CREATE a TEMPORARY TABLESPACE. +
    +"+

    Hope that helps.

    Ogan

  • Creating Tables with a Script

    I am trying to create tables using a script, but it seems that the consecutive statements in the script will not run - someone ' one can tell me what I need to use the syntax?

    ****************************************************************************
    Here is my script - I use SQL-Plus:

    CREATE TABLE parts
    (region_id NUMBER
    NOT NULL CONSTRAINT Region_id_nn
    , region_name VARCHAR2 (25)
    )

    CREATE TABLE countries
    (country_id TANK (2)
    NOT NULL CONSTRAINT Country_id_nn
    , country_name VARCHAR2 (40)
    region_id NUMBER
    CONSTRAINT Country_c_id_pk
    PRIMARY KEY (country_id)
    )
    INDEX OF THE ORGANIZATION

    Here's what I touch in:

    SQL > get c:\oracle\test.txt

    Here is the error that comes out:

    1 parts of CREATE TABLE
    2 (region_id NUMBER
    3 region_id_nn of CONSTRAINT NOT NULL
    4, region_name VARCHAR2 (25)
    5)
    6 countries in CREATE TABLE
    7 (country_id TANK (2)
    8 country_id_nn of CONSTRAINT NOT NULL
    9, country_name VARCHAR2 (40)
    10, region_id NUMBER
    11, CONSTRAINT country_c_id_pk
    12 PRIMARY KEY (country_id)
    13)
    14 * ORGANIZATION INDEX
    15 run;
    CREATE TABLE countries
    *
    ERROR on line 6:
    ORA-00922: missing or not valid option
    ****************************************************************************
    If trim down the script - just 1 create table command, none of the semicolons, this works:

    Script:

    CREATE TABLE parts
    (region_id NUMBER
    NOT NULL CONSTRAINT Region_id_nn
    , region_name VARCHAR2 (25)
    )

    Key in:
    SQL > get c:\oracle\test.txt
    1 parts of CREATE TABLE
    2 (region_id NUMBER
    3 region_id_nn of CONSTRAINT NOT NULL
    4, region_name VARCHAR2 (25)
    5 *)
    SQL > execute;

    Receive:

    1 parts of CREATE TABLE
    2 (region_id NUMBER
    3 region_id_nn of CONSTRAINT NOT NULL
    4, region_name VARCHAR2 (25)
    5 *)

    Table created.
    ****************************************************************************
    adding a semicolon between the instructions in create table does not solve this problem - anyone got any ideas?

    Thank you

    -Tom

    Please see this for more information on the GET sqlplus command.

    http://download.Oracle.com/docs/CD/A97630_01/server.920/a90842/ch13.htm#1009882

    Get command Loads a host operating system file into the SQL buffer.
    
    *The operating system file should contain a single SQL statement or PL/SQL block*.
    The statement should not be terminated with a semicolon. If a SQL*Plus command or
    more than one SQL statement or PL/SQL block is loaded into the SQL buffer from an
    operating system file, an error occurs when the RUN or slash (/) command is used to
    execute the buffer.
    

    I hope it is clear now. So if you want to run a script that may contain more then one of SQL statements, create a file * .sql, put all the instructions, complete with a semicolon and run as follows:

    SQL > @script_name.sql

Maybe you are looking for