confusion on the clause nologging - for create table

Hi guys,.

just 1 simple question.

T1) when I create a table with no record, is the CREATION of the table not connected as well?


Kind regards
Noob

OracleWannabe wrote:
T1) when I create a table with no record, is the CREATION of the table not connected as well?

If the table is created empty (as do not use a create table as select or DEC) then there is no difference in the design stage. The difference between REGISTRATION and NOLOGGING intervenes for direct path operations.

The Oracle documentation provides a very good explanation:
http://download.Oracle.com/docs/CD/B28359_01/server.111/b28313/usingpe.htm#i1009116

Kind regards
Greg Rahn
http://structureddata.org

Tags: Database

Similar Questions

  • How to find the child level for each table in a relational model?

    Earthlings,

    I need your help, and I know that, "Yes, we can change." Change this thread to a question answered.

    So: How to find the child level for each table in a relational model?

    I have a database of relacional (9.2), all right?
    .
         O /* This is a child who makes N references to each of the follow N parent tables (here: three), and so on. */
        /↑\ Fks
       O"O O" <-- level 2 for first table (circle)
      /↑\ Fks
    "o"o"o" <-- level 1 for middle table (circle)
       ↑ Fk
      "º"
    Tips:
    -Each circle represents a table;
    -Red no tables have foreign key
    -the picture on the front line of tree, for example, a level 3, but when 3 becomes N? How is N? That is the question.

    I started to think about the following:

    First of all, I need to know how to take the kids:
    select distinct child.table_name child
      from all_cons_columns father
      join all_cons_columns child
     using (owner, position)
      join (select child.owner,
                   child.constraint_name fk,
                   child.table_name child,
                   child.r_constraint_name pk,
                   father.table_name father
              from all_constraints father, all_constraints child
             where child.r_owner = father.owner
               and child.r_constraint_name = father.constraint_name
               and father.constraint_type in ('P', 'U')
               and child.constraint_type = 'R'
               and child.owner = 'OWNER') aux
     using (owner)
     where child.constraint_name = aux.fk
       and child.table_name = aux.child
       and father.constraint_name = aux.pk
       and father.table_name = aux.father;
    Thought...
    We will share!

    Thanks in advance,
    Philips

    Published by: BluShadow on April 1st, 2011 15:08
    formatting of code and hierarchy for readbility

    Have you looked to see if there is a cycle in the graph of dependence? Is there a table that has a foreign key to B and B has a back of A foreign key?

    SQL> create table my_emp (
      2    emp_id number primary key,
      3    emp_name varchar2(10),
      4    manager_id number
      5  );
    
    Table created.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  create table my_mgr (
      2    manager_id number primary key,
      3    employee_id number references my_emp( emp_id ),
      4    purchasing_authority number
      5* )
    SQL> /
    
    Table created.
    
    SQL> alter table my_emp
      2    add constraint fk_emp_mgr foreign key( manager_id )
      3         references my_mgr( manager_id );
    
    Table altered.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1   select level lvl,
      2          child_table_name,
      3          sys_connect_by_path( child_table_name, '/' ) path
      4     from (select parent.table_name      parent_table_name,
      5                  parent.constraint_name parent_constraint_name,
      6                  child.table_name        child_table_name,
      7                  child.constraint_name   child_constraint_name
      8             from user_constraints parent,
      9                  user_constraints child
     10            where child.constraint_type = 'R'
     11              and parent.constraint_type = 'P'
     12              and child.r_constraint_name = parent.constraint_name
     13           union all
     14           select null,
     15                  null,
     16                  table_name,
     17                  constraint_name
     18             from user_constraints
     19            where constraint_type = 'P')
     20    start with child_table_name = 'MY_EMP'
     21*  connect by prior child_table_name = parent_table_name
    SQL> /
    ERROR:
    ORA-01436: CONNECT BY loop in user data
    

    If you have a cycle, you have some problems.

    (1) it is a NOCYCLE keyword does not cause the error, but that probably requires an Oracle version which is not so far off support. I don't think it was available at the time 9.2 but I don't have anything old enough to test on

    SQL> ed
    Wrote file afiedt.buf
    
      1   select level lvl,
      2          child_table_name,
      3          sys_connect_by_path( child_table_name, '/' ) path
      4     from (select parent.table_name      parent_table_name,
      5                  parent.constraint_name parent_constraint_name,
      6                  child.table_name        child_table_name,
      7                  child.constraint_name   child_constraint_name
      8             from user_constraints parent,
      9                  user_constraints child
     10            where child.constraint_type = 'R'
     11              and parent.constraint_type = 'P'
     12              and child.r_constraint_name = parent.constraint_name
     13           union all
     14           select null,
     15                  null,
     16                  table_name,
     17                  constraint_name
     18             from user_constraints
     19            where constraint_type = 'P')
     20    start with child_table_name = 'MY_EMP'
     21*  connect by nocycle prior child_table_name = parent_table_name
    SQL> /
    
           LVL CHILD_TABLE_NAME               PATH
    ---------- ------------------------------ --------------------
             1 MY_EMP                         /MY_EMP
             2 MY_MGR                         /MY_EMP/MY_MGR
             1 MY_EMP                         /MY_EMP
             2 MY_MGR                         /MY_EMP/MY_MGR
    

    (2) If you try to write on a table and all of its constraints in a file and do it in a valid order, the entire solution is probably wrong. It is impossible, for example, to generate the DDL for MY_EMP and MY_DEPT such as all instructions for a table come first, and all the instructions for the other are generated second. So even if NOCYCLE to avoid the error, you would end up with an invalid DDL script. If that's the problem, I would rethink the approach.

    -Generate the DDL for all tables without constraint
    -Can generate the DDL for all primary key constraints
    -Can generate the DDL for all unique key constraints
    -Can generate the DDL for all foreign key constraints

    This is not solidarity all the DOF for a given in the file object. But the SQL will be radically simpler writing - there will be no need to even look at the dependency graph.

    Justin

  • How to force the data type in create table field?

    Hi all

    I need to force my table to create as follows

    Create table XYZ

    (Test varchar2 (10 CHAR)

    ...

    );

    When I run my Interface the script is

    Create table XYZ

    (Test varchar2 (10))

    ...

    );

    and the DBMS translated into

    Create table XYZ

    (Test varchar2 (10 BYTE),

    ...

    );

    I have the same problem with I$, C$, and so on.

    Best regards

    Marco

    Hi all

    I fix my problem:

    In Phisical Tecnology, under ORACLE Tecnology, data TYPE, I modified the definition of VARCHAR2 in VARCHAR2(%L CHAR).

    (Before it was VARCHAR2 (%)).

    Thank you all.

    Marco

  • How to use PS to judge the existence of a file in the directory specified and how to use PS to the directory specified for create to create the file? (javascript)

    1, how to use PS to judge of the existence of a file in the specified directory? (using javascript)

    2, how to use PS to the directory specified for create to create the folder? (using javascript)


    Thank you!

    If (Folder(/*_insert_the_path_here_*/).exists == false) {Folder(/*_insert_the_path_here_*/).create()}

  • monitor the DML operation for a table, that is, monitor the type time and DML operation

    Hello expert,

    I want to follow the DML operation for a table, i.e. monitor the time to type and the DML operation. you tell please how do I get that?

    Thank you very much

    See if this can help you:

    http://Oracle-Apps-DBA.blogspot.com/2007/07/monitoring-DML-operations.html

    Kind regards

  • export the schema, but for two tables, export only 20 rows

    11.2.0.2/RHEL 5.4

    Using expdp, I want to export an entire schema. But for the 2 large tables (say the EMP and DEPT tables) in this diagram, I want to export only 20 records (at random) for them. Is it possible for expdp and impdp?

    If this is not possible then, is there any option to have no any line for these 2 tables?

    Christian Christmas Pal Singh says:
    possible, but you must create two files dmp means export of run 2 times.
    1. for complete schema to exclude these 2 tables by the exclusion clause.
    2. use the query clause to filter the data in the second export for these 2 tables.

    Really? is not something that similar work? instead of rownum, if you want truly random, then use example of clause, but it should be based on the amount of sample would make 20 lines for you, then a bit of work there.

    schemas=my_schema
    QUERY=my_schema.table1:"where rownum < 21"
    QUERY=my_schema.table3:"where rownum < 21"
    

    Published by: rjamya on Sep 19, 2012 08:32

  • 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

  • How to use the clause type conditionally create new lines

    This question is just for learning - no object other than to start real world to create versions of some queries known to learn how to measure the performance of the MODEL clause clause of the MODEL versions.

    The question is: How can you write a STANDARD clause that pivots (updates) ONLY the lines that actually need to rotate and do NOT change the lines that have no value and cannot be rotated.

    I found a good site that has about two dozen example articles on different pieces. This first link is the beginning of the series.

    SQL features tutorials - Clause TYPE

    http://www.sqlsnippets.com/en/topic-11663.html

    This link is to a clause of FAQ of BluShadow MODEL version "how to convert rows to columns."

    Line - MODEL method string

    http://www.sqlsnippets.com/en/topic-11987.html

    The solution to this link uses this line of source:

    POSITION KEY VAL

    --- ---------- ----------

    R08 0 v1, v2, v3,.

    and this result set:

    POSITION KEY VAL

    --- ---------- ----------

    R08 1 v1

    R08 2 v2

    R08 3 v3

    The reason why it produces that result set is this clause of the statement of MODEL

    RETURN THE UPDATED LINES

    If you comment on this article, you will see that the original lines are all in position 0. This means that the solution reproduced EACH SOURCE LINE even if there is only one item in the list of values.

    Thus, even a line source with a single value (for example, the r01 'a') will be updated and updated this line is returned.

    For a large number of data sources with only a few lines that actually need to rotate it would be a great performance of infringement.

    This is the sample data source

    with t as (button 1, 'a' value 'abc' col2, col3 'def' of the double
    Select Union all 2, 'b', 'ghi', 'jkl' from dual
    Union all select 3, 'c, d, e, 'mno', 'pqr' from dual.
    Union all select 4, 'f', 'stu', 'vwx' from dual
    )
    Select the key, value, col2, col3
    t

    KEY, VALUE, COL2, COL3
    1, a, abc, def
    2, b, GHI, jkl
    3, "c, d, e, mno, pqr.
    4, f, stu, vwx

    Lines 1, 2 and 4 only have a value of (a, b, c respectively.

    Only line 3 must rotate. It contains "c, d, e" and which must become 3 lines in the result set

    Value of the key, col2 col3
    1 an abc def
    2B ghi jkl
    3 c mno, pqr
    3 d mno, pqr
    3 e mno, pqr
    4 f stu vwx

    The nut of the problem is that if the clause 'RETURN UPDATED ROWS' is used, then the lines 1, 2 and 4 must be updated in order to be returned in the result set. And if this clause is NOT used, then line 3 must be updated by 'c', d, e 'c' and two new product lines: one line for a ' and one for 'e '.

    How can you do this with the TYPE clause without the help of the clause "Return LINES UPDATE"? I don't have a solution to sample showing what I tried because I can't understand what it takes to even try.

    I have a solution that uses "RETURN UPDATED ROWS" but I want to compare this performance to the exercise, when this clause is NOT used.

    We ask BluShadow to add the solution of MODEL clause to this FAQ with other similar solutions.

    Like this?

    SQL > with t as
    () 2
    3 select the 1 key, 'a' val, 'abc' col2, col3 'def' of the double


    Select 4 Union all 2, 'b', 'ghi', 'jkl' from dual
    5 union all select 3, 'c, d, e, 'mno', 'pqr' from dual.
    Select 6 Union all the 4 'f', 'stu', 'vwx' from dual
    7)
    8. Select the key
    9, key_1
    10, val
    11, regexp_substr (val, ' [^,] +', 1, key_1) val_new
    12, col2
    13, col3
    14 t
    model 15
    16 partition by (key)
    dimension (1 key_1) 17
    18 measures (val, col2, col3, (length (val) - length (replace (val, ",")) + 1) as len)
    19 rules
    (20)
    21 val [for 1 to increment of len key_1 [1] 1] = val [1]
    22, col2 [for 1 to increment of len key_1 [1] 1] = col2 [1]
    23, col3 [for 1 to increment of len key_1 [1] 1] = col3 [1]
    24)
    25 order
    26 by key
    27, key_1;

    KEY KEY_1 VAL VAL_N NECK NECK
    ---------- ---------- ----- ----- --- ---
    1 1 has an abc def
    2 b 1 b ghi jkl
    3 1 c, d, e c mno pqr
    3 2 c, d, e d mno pqr
    3 3 c, d, e e mno pqr
    4 1 f f stu vwx

    6 selected lines.

  • No space in the Bulletin Board for connection Table

    My tuxedo client, when trying to connect to the tuxedo, I get error in the newspaper of Tuxedo below and the connection is refused:

    * 104946.IDCCMS01! tcpiptic.146964.146968.0: LIBTUX_CAT:328: ERROR: no space in the scoreboard for connection table *.
    * 104946.IDCCMS01! tcpiptic.146964.146968.0: LIBTUX_CAT:1079: ERROR: could not create the link *.

    Can someone help me what parameter needs change in order to avoid the mistake?

    Concerning

    Hello

    I would check the values of MAXWSCLIENTS and MAXACCESSERS.

    Kind regards
    Todd little
    Chief Architect of Oracle Tuxedo

  • What is the best way to create tables in Illustrator cs5

    Hi all

    I am currently working on the contribution of a project for a printer Board. He must have rows and columns so that a project can be followed and assigned on a day to day basis. I thought I would just create a table for this. Is there a good way to create tables in Illustrator cs5?

    You can also copy and paste the ID table to HAVE, but since they cannt be bound as pdf or eps he ae limits to how much you can edit

  • SQLPLUS set variables for creating table.

    I do the following in SQLPLUS

    set l_date = to_char (sysdate, 'yyyy')
    define l_name = "«mytable"»
    set l_tn = & l_name | & l_date

    SQL > select & l_name | & double l_date;
    old 1: select & l_name | & l_date of the double
    new 1: select 'mytable '. TO_CHAR (sysdate, 'yyyy') of the double

    "MYTABLE".
    -----------
    mytable2010

    But when I use that way, I don't get the YEAR.

    SQL > select ' & l_tn' double.
    old 1: select ' & l_tn' of the double
    new 1: select 'mytable' of the double

    ' MYTABL
    -------
    MyTable


    I want to create table in sqlplus by using the following command:
    create table & l_tn (x number)

    Please let me know what I'm doing wrong here.

    Hello

    (Like TO_CHAR) SQL functions and operators (as |) are not executed in SQL * most orders (as DEFINED).
    Test your variables after you set you will see what I mean

    define l_date = to_char(sysdate,'yyyy')
    PROMPT     &l_date = l_date
    

    Output:

    to_char(sysdate,'yyyy') = l_date
    

    "In other words, l_date is used for a 23 character string, which starts with 't' and contains ' (',',' and ' ')', ', which are not allowed in file names (probably; depending on the system).
    I think you want that it set to a string of 4 characters, such as "2010".

    Use the COLUMN... New_value (or... Order OLD_VALUE) to define a variable substitution to the results of a calculation of SQL.

    I think you are trying to do something like this:

    COLUMN     year_col     NEW_VALUE     l_date
    
    SELECT     TO_CHAR (SYSDATE, 'YYYY')     AS year_col
    FROM     dual;
    
    define l_name = mytable
    
    CREATE TABLE  &l_name&l_date
    ...
    
  • What are the best practices for creating only time data types, and not the Date

    Hi gurus,

    We use 12 c DB and we have a requirement to create the column with datatype of time only, if someone please describe what are the best practices for the creation of this.

    I would strongly appreciate ideas and suggestions.

    Kind regards
    Ranjan

    Hello

    How do you intend to use the time?

    If you are going to combine with DATEs or timestamps from a other source, then an INTERVAL DAY TO SECOND or NUMBER may be better.

    Will you need to perform arithmetic operations on time, for example, increase the time to 20%, or take an average?   If so, the NUMBER would be preferable.

    You are just going to display it?  In this case, DAY INTERVAL in SECONDS, DATE or VARCHAR2 would work.

    As Blushadow said, it depends.

  • Give advice on the best way to create tables

    Hello

    I'm just after the best method to create a pdf document that got charts?

    I have an order form which must be converted to an editable pdf form that users can fill in electronically and email back. Currently, the document is in Excel, and while I can convert it to PDF, I prefer to create the whole thing using the PDF.

    Should what tools I use for this?

    Kind regards

    Peter

    PDF files should not be created from scratch and if you try to do you will soon discover that it is extremely difficult and heavy.

    Stick with the creation of the file in Excel (or any other similar application, such as Word, InDesign, etc.) and then convert to PDF and add form fields in Acrobat.

    Be sure to keep a copy of the Excel file, well, in case you need to make any changes to the layout of the file later.

    If you don't do this then you can order replace Pages use in Acrobat to insert new pages (static) on the 'old' in your PDF file, that will keep all the form fields and scripts of tact. You need to just adjust the locations or the size of the fields, where this is necessary.

  • Get all the current statements for a table

    Hi all

    I would like to know if its possible to retrieve all select, insert, delete, instructions update for a table at a given time or for a period of approximately 10 seconds.

    as something like that

    Select username, ORDER MACHINE, SQL_ID, SQL_EXEC_START session $ v where sql_id in)
    Select sql_id in v$ sql where sql_text like '% MYTABLENAME %');

    I know there are several requests for this table, but with this query, I see only my own queries!
    Why?

    Perhaps the best way is using audit or FGA. If you are looking for in the library cache, older statements do not exist. Depends or you install Grid Control/DB Console can help too but if you have the default values you have only one month.

    HTH
    Antonio NAVARRO

  • Confused on the project settings for the Blu - Ray?

    Worked w\Encore (5.1) a lot of time as the DVD, but this is my first w\BR try so I want to make sure I get this right (thanks in advance for the help!).

    The project has a static image (1920 x 1080) and then several animate button video HD which will take you to a video loop "intro" at 1920 x 1080. On this video track, I have a pop-up menu (1920 x 1080 I guess?) which will allow you to select other videos.

    My questions;

    Static & pop - up menu is correct?

    The intro videos are 1920 x 1080 so no problem there, but the rest of the videos of the project (link to context menus) is all in SD (720 x 480 29.97) until the 'final project defining' should be?

    Thus, away from it all seems logical for me until I have to project default settings, they list it as the Blu - Ray (H.264), 1920 x 1080 & 29.97 FPS?

    I did a quick test of the only menu & intro videos and it converted the static menu in 1920 x 1080 29.97 but it takes 23.976?

    I imported a few SD videos say "do not transcode" according to BR.

    Still using the project settings for the menus and slideshows. So if you want a 23.976, then when you create a project, you can choose the frequency of images such as 23.976 in the drop-down menu in the default conversion settings.

    As far as video is concerned, if still says not to transcode, then he will write them to disk as it is and yet also creates a calendar based on the properties of the assets. If the dimensions of the asset are legal, then the dimensions of the chronology would be identical to that of the assets.

    -Riou.

Maybe you are looking for