Table schema level insert

Could you please suggest what happens in the script below?

User A user B

Table T T

Proc P1

(insert into T values (...) ;)

Proc P1 has execute priv on user B

exec A.P1 ();

If we execute the Proc P1 in diagram B, it will fill T table a or B?

Hello

It is based on the right of the author and the Summoner (AUTHID CURRENT_USER AS).

By default the PROCEDURE executes with the right to DEFINE (who created the procedure and the laws on the only definers object)

If we specify AUTHID CURRENT_USER in the procedure, then the one who executes the procedure, must act on the user object who invoked the procedure.

In your case, if you specify authid clause in Proc P1 then it will fill table T which is this one, regardless of the user running it.

See the link below:

http://docs.Oracle.com/CD/B19306_01/AppDev.102/b14261/subprograms.htm#i18574

Tags: Database

Similar Questions

  • Merits and demerits of the replication of schema-level and Table

    Hello

    We evaluate the streams for our needs of replication. We reproduce nearly 2000 two-way tables. Most of the tables are in a schema. The main schema has a few tables that are not replicated.

    Replicate us schema level? Or at the level of the table? What are the advantages and disadvantages?

    Replication of level schema included with a handful of exclusionary rules seems simpler.

    In water courses at the level of the tables as well as creating 2000 table rules in the beginning, add a new table to an existing configuration of streams, will require additional steps to stop capture/apply/spread, creating new rules for the new table and restart replication. However, it seems that level replication table offering flexibility in terms of group tables. We wanted to group tables about 10 groups of 20 to 300 tables in each group. Each group will have its own capture, propagate and apply. In this way, we can isolate large groups of those unimportant?

    Who is a better setup in terms of maneuverability, flexibility, parallelism and performance?

    Thank you.

    Hello Stargaze,

    OK, so I understand that the grouping is based on the type of transactions and its importance. In this case the grouping would help you in many ways such as:

    1. If you encounter a problem or a bug with one of the processes of capture/apply then the other groups would work fine. Therefore, you have the opportunity to shoot a game of capture, propagation and applies until solve you the problem.

    2. in case if you perform any load batch where the transaction will affect over 10000 + records then it is possible that you could get stuck at 'SUSPENDED for FLOW CONTROL' on any of the feed items. With different groups would give you more flexibility to solve this problem by activating and deactivating groups.

    For more information on this please check the following:

    Apply process is active, inactive, and just stopped in change application

    3. with the schema level replication even if you have the advantage of being simple and have fewer rules in the set of rules, you must consider the 2 points above before you implement it. You need to test both diagrams and tables with a typical load (simulation of the production) and need to identify potential problems in both. Some more points to consider:

    -apply the game patches 10.2.0.4 or at least 10.2.0.3
    -apply all the patches required streams (Note: 437838.1> on metalink)
    -follow the recommendations as indicated:
         Note: 418755.1 broadcast 10.2.0.x.x of recommendations
         Note: 335516.1 Performance of flow recommendations
    Note: 413353.1 10.2 best practices for streams in RAC environment

    Thank you
    Florent

  • Syntax to create the Type of registration at the schema level.

    Hello

    Could you let me know the syntax to create the type of registration at the schema level.

    I tried to help below.

    create or replace

    TYPE "SR_TBL_TYPE" AS THE SR_REC_TYPE TABLE;

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

    create or replace

    BODY OF TYPE 'SR_REC_TYPE' AS

    CONSTRUCTOR FUNCTION SR_REC_TYPE RETURN SELF AS RESULT

    IS

    BEGIN

    task_status: = NULL; -jtf_task_statuses_tl. Name % type

    task_type: = NULL; -jtf_task_types_tl. Name % type

    jt_new_res_id: = NULL; --jtf_task_assignments_audit_b.new_resource_id%type

    jt_source_name: = NULL; --jtf_rs_resource_extns.source_name%type

    jt_sch_start_date: = NULL; -VARCHAR2 (50)

    jt_task_number: = NULL; --jtf_tasks_b.task_number%type

    jt_appointment_scheduled_agent: = NULL; --fnd_user.user_name%type

    cs_old_prblm_code: = NULL; --cs_incidents_audit_b.old_problem_code%type

    cs_problem_code: = NULL; --cs_incidents_audit_b.problem_code%type

    qa_scenario_estimate_rec: = qa_scenario_est_type();

    qa_recall_rec: = qa_recall_type();

    RETURN;

    END SR_REC_TYPE;

    PROCEDURE of MEMBER log_sr_rec_values (SELF IN SR_REC_TYPE)

    IS

    BEGIN

    NULL;

    END log_sr_rec_values;

    END;

    Thank you

    Could you let me know the syntax to create the type of registration at the schema level.

    You do not have - record types are PL/SQL. In SQL, you create OBJECT types. It works for me:

    create or replace TYPE AS OBJECT SR_REC_TYPE)
    task_status varchar2(1),--jtf_task_statuses_tl.name%TYPE
    task_type varchar2(1),--jtf_task_types_tl.name%TYPE
    jt_new_res_id varchar2(1),--jtf_task_assignments_audit_b.new_resource_id%TYPE
    jt_source_name varchar2(1),--jtf_rs_resource_extns.source_name%TYPE
    qa_scenario_estimate_rec emp_table_type,
    qa_recall_rec emp_table_type,
    CONSTRUCTOR FUNCTION SR_REC_TYPE RETURN SELF AS RESULT
    )
    /

    create or replace TYPE of BODY SR_REC_TYPE AS
    CONSTRUCTOR FUNCTION SR_REC_TYPE RETURN SELF AS A RESULT
    BEGIN
    Self.task_status: = null;


    Self.task_type: = null;
    Self.jt_new_res_id: = null;
    Self.jt_source_name: = null;
    Self.qa_scenario_estimate_rec: = emp_table_type();
    Self.qa_recall_rec: = emp_table_type();
    return;
    END;
    END;
    /

    create or replace TYPE SR_TBL_TYPE AS TABLE OF SR_REC_TYPE;

    See 'Definition and Implementing User-Defined constructors' in the object-relational doc

    http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28371/adobjadv.htm#sthref751

  • Create the Table without authorization Insert

    Is it possible in the DBMS oracle for a user to have the permission to create a table, but does not have permission to insert, even if the same user has just created? Thank you in advance!

    Suppose that the user spends just the
    create table command
    and just after that he tries to insert in the table created, just apply it the case, as you said? (without defining the tablespace option)

    Like I said it depends on in which the created table schema. Simply speaking
    (a) create table T (...);
    or
    (b) create table otherschema. T(...);

    Here is the completely different scenarios.
    Scenario b) is supported and is explained in my previous post.
    The scenario (a) is not directly supported (owner of a table can do something with it) and a workaround solution is explained in the post of JohnWatson.

    Could you explain a requirement of the company?

  • Concatenation of the name of the table in the Insert query

    Greetings,

    Oracle Version - Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64 bit Production


    I want to write a procedure in which we give the name of the table in the Insert at runtime through cursor


    But the problem is

    insert into tra_temp

    Select * tra_smi23 of

    in statement above 23 must be dynamic like tra_smi | 23


    Here is my code, but something is not

    Kindly help


    create or replace procedure as

    cursor c1 is

    Select op_ID, operators OP_NAME where OP_NAME like '% TRA '.

    and OP_ID <>9;

    Start

    run immediately 'truncate table tra_temp;

    for rec in c1

    loop

    insert into tra_temp

    Select * from tra_SMI | ' recomm. OP_ID';

    commit;

    When exit c1% notfound;

    end;

    Hello

    Then you must change the insert statement for: run immediately ' insert into tra_temp select * from tra_SMI'| recomm. OP_ID;

    Concerning

    Mr. Mahir Quluzade

  • Redirect data to another table using before insert trigger.

    Dear all,
    How can I redirect the data to another table in a before Insert trigger? My database is Oracle10g.
    I have a table EMP (EMP_ID, LAST_NAME, SALARY).
    I have another EMP_COPY table with the same structure. I also have a before Insert trigger on the EMP table.
    Based on a condition that I have to redirect the data in table EMP_COPY. Let's say the condition is EMP_ID = 100.
    I fire an insert on EMP table for example INSERT IN EMP(EMP_ID,LAST_NAME,SALARY) VALUES(100,'Dev',500).
    On the inside of the front Insert trigger on the EMP table, I have the code
    IF EMP_ID = 100 THEN
    INSERT INTO EMP_COPY (EMP_ID, LAST_NAME, SALARY)
    VALUES(:NEW.) EMP_ID,: NEW. LAST_NAME,: NEW. SALARY);
    COMMIT;
    ON THE OTHER
    NULL;
    END IF;
    But the problem here is that data goes to EMP table of origin also although I don't want. He should do an Insert into EMP table only if EMP_ID! = 100.

    One way has been to raise a user-defined exception inside the If statement and not handle it so that the original insert on table EMP fails but INSERT comes in the EMP_COPY table. But in this solution since the inside the trigger unhandled exception, it propagates to the calling environment. And I can't stand outside relaxation as the calling environment is a form of Oracle Apps standard that cannot be customized.

    Any kind of help will be highly appreciated that I am fighting for more than two weeks.

    Thanks in advance
    Dev

    Remove the autonomous transaction pragma... and then try again.

  • Table nested @ schema - level how to extract the first clue?

    Hello

    My version of oracle database: 11g

    I present to you the code here and here are the steps by which I created a table and theres a regular column to the number, but the 2nd column is a nested table.

    (1) create or replace type s_def_NT_DepEmployees is table of the varchar2 (100);

    2)

    create the table employees_NT_test

    (number of department_id

    c_of_s_def_NT_DepEmployees s_def_NT_DepEmployees)

    nested as NTs_c_of_s_def_NT_DepEmployees table c_of_s_def_NT_DepEmployees store

    (3) now, I inserted 2 records:

    insert into employees_NT_test values (1, s_def_NT_DepEmployees ('Rahul', 'Myra'));

    insert into employees_NT_test values (2, s_def_NT_DepEmployees ('Rashi', 'Gaurav'));

    (4) now get me this sql allows employees of department_id: 1

    Select column_value

    table (select c_of_s_def_NT_DepEmployees in the employees_NT_test where department_id = 1);

    Output:

    Rahul

    Myra

    Now my question: I want to just choose the first clue: IE: rahul (and not myra) and it should be compatible such that if I select the two departments I should get my output like:

    Department_id | employees

    1                    | Rahul

    2                    | Rashi

    PS: I am looking for a sql query, I hope I presented my question clearly, if there are doubts please let me know.

    Thanks in advance

    Rahul

    Now my question: I want to just choose the first clue: IE: rahul(and not myra) and should be consistent

    You can only do in a deterministic manner, given the current design.

    Unlike PL/SQL, SQL has no way to access the items in the collection of their indices.

    We can think about using ROWNUM (or ROW_NUMBER) in a subquery, but the SCOREBOARD operator and later join operations do not guarantee that the order will remain the same in the different calls.

    You must redefine the collection 's_def_NT_DepEmployees' as an array of objects, and this object would include an index attribute explicitly on which you can filter.

    The alternative is to create a function that takes the collection and the index for the arguments and returns the element at index - but even in this case I'm not sure that oracle could rebuild deterministically collection either.

    Why use a table nested at all?

  • table col name get the details of the table column and inserting of values depending on the data type of the column

    Hello

    I am train to write a procedure where I would spend the table as a parameter name and then the code would determine it is column names, and then he would insert records in each column depending on the data type. could someone help me with this.

    Thank you

    SM

    Hello

    Perhaps you need to dummy data just for the table.

    Here is my exercise

    create or replace
    procedure generate_rows(p_table_name varchar2, p_count number)
    is
      --
      function insert_statement(p_table_name varchar2) return clob
      is
        l_columns clob;
        l_expressions clob;
        l_sql clob default
          'insert into p_table_name (l_columns) select l_expressions from dual connect by level <= :p_count';
      begin
        select
          -- l_columns
          listagg(lower(column_name), ',') within group (order by column_id),
          -- l_expressions
          listagg(
            case
            when data_type = 'DATE'
              then  'sysdate'
            when data_type like 'TIMESTAMP%'
              then  'systimestamp'
            when data_type = 'NUMBER'
              then  replace('dbms_random.value(1,max)',
                      'max', nvl(data_precision - data_scale, data_length)
                    )
            when data_type = 'VARCHAR2'
              then  replace(q'|dbms_random.string('a',data_length)|',
                      'data_length', data_length
                    )
            else
                    'NULL'
            end, ',') within group (order by column_id)
        into
          l_columns,
          l_expressions
        from user_tab_columns
        where table_name = upper(p_table_name);
        --
        l_sql := replace(replace(replace(l_sql,
          'p_table_name', p_table_name),
          'l_columns', l_columns),
          'l_expressions', l_expressions);
        -- debug
        dbms_output.put_line(l_sql);
        --
        return l_sql;
      end;
    begin
      execute immediate insert_statement(p_table_name) using p_count;
    end;
    /
    
    -- test
    create table mytable(
      id number(4,0),
      txt varchar2(10),
      tstz timestamp with time zone,
      dt date,
      xml clob
    )
    ;
    set serveroutput on
    exec generate_rows('mytable', 10);
    select id, txt from mytable
    ;
    drop procedure generate_rows
    ;
    drop table mytable purge
    ;
    
    Procedure GENERATE_ROWS compiled
    Table MYTABLE created.
    PL/SQL procedure successfully completed.
    
    insert into mytable (id,txt,tstz,dt,xml) select dbms_random.value(1,4),dbms_random.string('a',10),systimestamp,sysdate,NULL from dual connect by level <= :p_count
            ID TXT
    ---------- ----------
             3 WnSbyiZRkC
             2 UddzkhktLf
             1 zwfWigHxUp
             2 VlUMPHHotN
             3 adGCKDeokj
             3 CKAHGfuHAY
             2 pqsHrVeHwF
             3 FypZMVshxs
             3 WtbsJPHMDC
             3 TlxYoKbuWp
    
    10 rows selected
    
    Procedure GENERATE_ROWS dropped.
    Table MYTABLE dropped.
    

    and here is the vision of Tom Kyte for the same https://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:2151576678914

    Edit: to improve my code, it must use p_count as bind as Tom.

  • Tablespace level export, import of schema level - is it possible?

    Hello

    If I have an export level DataPump tablespace (played to = < the tablespaces list > STORAGE space), it is possible to import only tables and dependent objects to a specific schema residing in exported tablespaces? DB version is 11.2.0.3.0. According to the documentation, it should be possible: http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_import.htm#i1011943 : a schema import is specified using the SCHEMAS. Source can be a full, table, tablespace, or schema mode export dump file set or another database.  

    Perform a quick test seems, however, that it is not so:

    (1) source DB - I have two tablespaces (TS1, TS2) and two schemas (USER1, USER2):

    SQL > select nom_segment, nom_tablespace, segment_type, owner

    from dba_segments

    where owner in ("USER1", "User2");

    2 3

    OWNER NOM_SEGMENT SEGMENT_TYPE TABLESPACE_NAME

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

    USER1 UQ_1 INDEX TS1

    USER1 T2 TABLE TS1

    USER1 T1 TABLE TS1

    USER2 T4 TABLE TS2

    USER2 T3 TABLE TS2

    (2) I am not a tablespace level to export:

    Expdp system directory $ = dp_dir = ts1 tablespaces, ts2 dumpfile = test.dmp

    Export: Release 11.2.0.3.0 - Production on Fri Jul 11 14:02:54 2014

    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

    Password:

    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    Start "SYSTEM". "" SYS_EXPORT_TABLESPACE_01 ": System / * Directory = dp_dir tablespaces = ts1, ts2 dumpfile = test.dmp

    Current estimation using BLOCKS method...

    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

    Total estimation using BLOCKS method: 256 KB

    Object type TABLE_EXPORT/TABLE/TABLE processing

    Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX

    Object type TABLE_EXPORT/TABLE/CONSTRAINT/treatment

    Object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS of treatment

    . . exported "USER1". "" T1 "5,007 KB 1 lines

    . . exported "USER1". "" T2 "5,007 KB 1 lines

    . . exported "user2". "" T3 "5,007 KB 1 lines

    . . exported "user2". "" T4 "5,007 KB 1 lines

    Main table 'SYSTEM '. "' SYS_EXPORT_TABLESPACE_01 ' properly load/unloaded

    ******************************************************************************

    "(3) I'm trying to import only the objects belonging to User1 and I get the 'ORA-39039: schema '(' USER1')' expression contains no valid schema" error: "

    Impdp system directory $ = dp_dir patterns = USER1 dumpfile = test.dmp

    Import: Release 11.2.0.3.0 - Production on Fri Jul 11 14:05:15 2014

    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

    Password:

    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    ORA-31655: no data or metadata of objects selected for employment

    ORA-39039: pattern Expression "(' USER1')" contains no valid schema.

    (4) However, the dump file contains clearly the owner of the tables:

    Impdp system directory = dp_dir dumpfile = test.dmp sqlfile = imp_dump.txt

    excerpt from imp_dump.txt:

    -path of the new object type: TABLE_EXPORT/TABLE/TABLE

    CREATE TABLE "USER1". "" T1 ".

    ("DUMMY" VARCHAR2 (1 BYTE)

    )

    So is it possible to somehow filter the objects belonging to a certain pattern?

    Thanks in advance for any suggestions.

    Swear

    Hi swear,.

    This led a small survey of me I thought I was worthy of a blog in the end...

    Oracle DBA Blog 2.0: A datapump bug or a feature and an obscure workaround

    Initially, I thought that you made a mistake, but that doesn't seem to be the way it behaves. I've included a few possible solutions - see if one of them responds to what you want to do...

    See you soon,.

    Rich

  • Schema level

    The one you suggest the steps of level schema statistics collection?

    See the statistics of optimizer gathering in doc PL/SQl Packages and Types
    http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28419/d_stats.htm

    There is a section for GATHER_SCHEMA_STATS procedures with an example
    See table 127-43 GATHER_SCHEMA_STATS procedure parameters to the default values for each parameter

    >
    Examples

    Apply a filter to the object list

    The following example specifies that any table with the prefix "T" in the EXAMPLE of schema and any table in the SYS schema, if bland, statistics collected on him.

    DECLARE
    filter_lst, DBMS_STATS. OBJECTTAB: = DBMS_STATS. OBJECTTAB();
    BEGIN
    filter_lst.extend (2);
    filter_lst (1) .ownname: = "SAMPLE";
    filter_lst (1) .objname: = '% t';
    filter_lst (2) .ownname: = "SYS."
    DBMS_STATS. GATHER_SCHEMA_STATS (NULL, obj_filter_list,-online filter_lst,
    options of-online 'gather_stale');
    END;
    >
    You have any specific questions?

  • How to find - including the table - the data insertion

    Hi all

    We have oracle 10g need to table name which records the last "data inserted the name of the table.

    Any help on this query,

    Thank you

    My understanding is correct

    1 sales man Insert customer details

    2. this information is stored in a DB with 200 + tables

    3. sales manager need a report for review and approve the details of the customer entered by sales man.

    4. you are asked to prepare this report

    5. you have no idea of what are the paintings to study to get information

    If this is true the correct way is the look in the design of your application document.

  • [ADF, JDev12.1.3] Mastering the form with detail tables: questions about Insertion/deletion, commit / rollback, primary key, handling,...

    Hallo,

    I have a panelTabbed with 4 tabs. In the 1st tab, there is a master form while each of the other tabs, there is a secondary table. Each tab "reads" vo.

    Please see here http://digilander.libero.it/flattit82/OTN_FILES/VoInTabs.png

    I created the graphichs/layout and now it's time to take care of the management of the transaction.

    In the master tab / form

    1)

    Here, I would put a button to remove the master record.

    When I delete a record in the primary table an automatism in the database (MS SQL Server) will automatically delete any registration which are linked to it in the detail tables.

    Could the automated system as this causes problems?

    In the Details tabs / tables

    2)

    I would put a button in each row to delete the line delivering. Can I just drag-and - drop, like button, af line: table the operation "Delete" of the VO istance detail used to create the af: table?

    3)

    If Yes, by clicking on the button performs the default delete operation. But if need to perform some actions before you run the deletion (or, in General, any other operation), how can I do?

    4)

    To create a folder that I use Create or CreateInsert? And what are the differences between them?

    5)

    When I create a new record I need set the value of a field of the VO on which is based the af: table. He filed, let's call it RowDetNumber, is not displayed in the af: table, because it doesn't have be filled in by the user. Mut value is calculated and set "secretly" before posting the new line to the database table. In particular, its value must be calculated as

    Select max (RowDetNumber) + 1

    of table_on_which_VO_is_based

    where some_conditions_on_fields_of_the_same_VO


    For example

    The VO selects all of the records that have FkId =: value. If value = 3, VO selection records:

    ID RowDetNumber OtherFields FkId

    1   3     1             ...

    2   3     2             ...

    3   3     3             ...

    4   3     4             ...

    The new record must be RowDetNumber = 5.

    I would like to know how permorm this.

    In general

    6)

    If the database tables have 1 or more triggers I have to take care of something?

    7)

    On the book "development of Web Applications with Oracle ADF Essentials - Sten E. Vesterli", I have read it could be problems when you use tables of database non-Oracle with auto-increment fields.

    The advice of author uncheck the 'Required' box in the model.

    All tables in my database have a primary keys that are auto-increment... so I uncheck the "mandatory"?

    8)

    In general how do I set these fields? I have to put in OT, VO or both?

    Thank you

    Federico

    Hello

    (1) you will need to re - question child iterators so that they do not look stale data

    (2) Yes. Ensure that the table is PPRed after deleting the line (should happen automatically if ChangeEventPolicy on iterator is set to ppr)

    (3) double click on the button and it creates a bean managed for you. It allows you to check a box to generate the code he would run to remove the line. Everything you put in front of the generated code is your code before

    (4) in the case of tables, use createInsert as it adds the new line to the rowset (transaction)

    (5) suggest to do this use a database trigger and the data attribute value DBSequence VO type

    (6) do not 'drop table' issue in SQL (sorry, couldn't resist ;-))

    (7) If you follow the advice of the author, Yes. What it does, I have it does not throw an exception if a value is missing in the validation of the line

    (8) usually you set whatever it is at the level of the OS and put only things on VO if you want to override the default value for a specific behavior


    Frank

  • create the user who can update another table schema

    Hello

    We have a system of prod in which we need to update the schema of the application running the declaration different update and create/run function, procedure, package bodies. It is very easy if you use the schema owner. But I need to run the activities of another user due to some restrictions. How can I do?

    Can u suggested to update any table privilege... but this would give all access table dictionary also.

    Is there any privilege that would allow any other user update another schema table without using the schema name before the name of the table?

    PLSS suggest

    John,

    Can we use public synonym for that?  I don't know if the risk of security for her:

    SQL > connect h/h

    Connected.

    SQL > select * from scott.emp;

    Select * from scott.emp

    *

    ERROR on line 1:

    ORA-00942: table or view does not exist

    SQL > connect scott/tiger

    Connected.

    SQL > create public synonym scotemp for scott.emp;

    The synonym is created.

    SQL > connect HR/hr;

    Connected.

    SQL > select * from scotemp;

    Select * from scotemp

    *

    ERROR on line 1:

    ORA-00942: table or view does not exist

    SQL > connect scott/tiger

    Connected.

    SQL > grant select on emp to HR;

    Grant succeeded.

    SQL > connect h/h

    Connected.

    SQL > select * from scotemp;

    ..

    ..

    14 selected lines.

    SQL > show user;

    The USER is 'hr '.

    SQL > update of ename set scotemp = 'SMITHX"where empno = 7369;

    setting a day of scotemp set ename = 'SMITHX"where empno = 7369

    *

    ERROR on line 1:

    ORA-01031: insufficient privileges

    SQL > connect scott/tiger

    Connected.

    SQL > grant update on HR emp;

    Grant succeeded.

    SQL > connect h/h

    Connected.

    SQL > update of ename set scotemp = 'SMITHX"where empno = 7369;

    1 line update.

    SQL > rollback;

    Complete restoration.

    SQL >

    Concerning

    Girish Sharma

  • Settings in table containing only inserts

    I'm on 11.2 DB and need to create an audit table that will be filled by DB triggers other tables (after Insert, Update, and Delete). Triggers will be only ever be inserting data in the audit table. I read to insert only tables, you must set the 'pctfree' 0. Is this correct? Do I need to put any other params (such as pct_used) to never be inserted in the tables?

    Thank you

    >
    I'm on 11.2 DB and need to create an audit table that will be filled by DB triggers other tables (after Insert, Update, and Delete). Triggers will be only ever be inserting data in the audit table. I read to insert only tables, you must set the 'pctfree' 0. Is this correct?
    >
    Yes - there is no need to book space for future updates which could extend the line if there will be no future updates.

    >
    The PCTFREE parameter

    The PCTFREE parameter sets the minimum percentage of a block of data to reserve as space available for possible updates for records that already exist in this block.
    >
    http://docs.Oracle.com/CD/B28359_01/server.111/b28318/logical.htm#i19164
    >
    Do I need to put any other params (such as pct_used) to never be inserted in the tables?
    >
    No - you won't be deleting lines.
    >
    The PCTUSED parameter

    The PCTUSED parameter sets the minimum percentage of a block that can be used for row data more overhead before new rows are added to the block. After that a block of data is filled up to the limit set by PCTFREE, Oracle database considers the block not available for inserting new rows until the percentage of this block is located under the PCTUSED parameter. Until this value is reached, Oracle database uses free space in the data block only to updates of lines already contained in the data block.

  • How to value all the sequence all the table schema/user

    Hello

    I use the Oracle 11 g server. I have a table close to 100. I want to know all the current sequence value ("Currval")
    of all the paintings in particular schema/user

    Please help me how can I get with this query

    Thanks in advance
    karmaya

    nordine B wrote:
    Try this...

    SELECT sequence_name, last_number FROM all_sequences
    where lower(sequence_owner) = '';
    

    HTH
    Vanessa B.

    Published by: Vanessa B December 3, 2012 13:25

    It is not always correct (again that depends on the condition)

    create sequence seq1 cache 100;
    
    SELECT sequence_name, last_number
    FROM all_sequences
    where sequence_name = 'SEQ1';
    
    SEQUENCE_NAME                  LAST_NUMBER
    ------------------------------ -----------
    SEQ1                                     1 
    
    select seq1.nextval from dual;
    
    NEXTVAL
    -------
          1
    
    SELECT sequence_name, last_number
    FROM all_sequences
    where sequence_name = 'SEQ1';
    
    SEQUENCE_NAME                  LAST_NUMBER
    ------------------------------ -----------
    SEQ1                                   101 --"Showing 101"
    
    select seq1.currval from dual;
    
    CURRVAL
    -------
          1 --"CURRVAL is different"
    

Maybe you are looking for

  • Airport Express does not work

    I need help. I have an Apple Airport Extreme and extend it with an Apple Airport Express. One day I needed to my extreme, which I did, forward port (which was for the xbox, and I followed this: Xbox NAT open (Apple routers)) I then updated my Airport

  • Add target project by program specific class

    Hello I am creating a vi that can programmatically create a project and add a device target (PXI-7954R). Currently I have no problem to create a project and add a FPGA target, but this isn't class specific, that is. This isn't the 7954R. I found a re

  • my email is block I can only read the calibre

    When I log on my Inbox I have no new messages I is CAREB only the old and at the top a response of yours to thank you unlock the registered on the left is

  • How to install the tcp/ip

    I'm trying to connect to the Internet, but I had this "failed to query the connecton tcp/ip parameters" somebady can helpme please

  • Is there an easy way to copy all of a Hotmail folder in a folder of Windows?

    Copy of one of Hotmail mails in the folder Windows is terrible. Is there a way to copy all of a Hotmail folder in a folder of Windows?