Generate a script to recreate all grants

Hi anybody has a script to generate the grants for all database? grants ike this example :
..........ablespace Quotas for CANTOR
ALTER USER CANTOR QUOTA UNLIMITED ON CV_TEMP;
ALTER USER CANTOR QUOTA UNLIMITED ON CV_DATA;
-- 166 Object Privileges for CANTOR
GRANT EXECUTE ON FRSQ.FFFR TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRAVI_INT TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRBOBF2 TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRBOBMPST TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRBOCBCJ TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRBOCN TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRBOTERM TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRDIRBF TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRDIRCBCJ TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRDIRCN TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRDIRTERM TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRLET_INT TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRLST TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRSUBFA TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRSUBFF TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRSUBPFIZ TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRSUBPR TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRSUBRITS TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRSUBTERM TO CANTOR;
GRANT EXECUTE ON FRSQ.FFFRVAL TO CANTOR;
GRANT EXECUTE ON FRSQ.FFUTIL TO CANTOR;
GRANT SELECT ON FRSQ.INFO_DEMANDE TO CANTOR;
GRANT SELECT ON FRSQ.INFO_PROGRAMME TO CANTOR;
GRANT DELETE, INSERT, SELECT, UPDATE ON GDEM.ACCES_DOSSIER TO CANTOR;
GRANT SELECT ON GDEM.ACCES_NON_AUTORISE TO CANTOR;
GRANT EXECUTE ON GDEM.ACCES_UDA TO CANTOR;
GRANT SELECT ON GDEM.AUDIT_ACCES TO CANTOR;
GRANT EXECUTE ON GDEM.COMPOSITION_EQUIPE TO CANTOR;
GRANT EXECUTE ON GDEM.COMPOSITION_EQUIPE_LI TO CANTOR;
GRANT SELECT ON GDEM.COMPOSITION_LI TO CANTOR;
GRANT SELECT, UPDATE ON GDEM.COMPOSITION_SUBV TO CANTOR;
GRANT SELECT, UPDATE ON GDEM.COMPO_TEMP TO CANTOR;
GRANT SELECT ON GDEM.COURRIEL_SEQ TO CANTOR;
GRANT SELECT ON GDEM.DATE_LIMITE TO CANTOR;
GRANT SELECT ON GDEM.DATE_LIMITE TO CANTOR;
GRANT SELECT ON GDEM.DATE_LIMITE_BR TO CANTOR;
GRANT REFERENCES, SELECT ON GDEM.DEMANDE TO CANTOR;
GRANT REFERENCES, SELECT ON GDEM.DEM_LI TO CANTOR;
GRANT SELECT ON GDEM.DOCUMENT_FCAR TO CANTOR;
GRANT EXECUTE ON GDEM.FAFR TO CANTOR;
GRANT EXECUTE ON GDEM.FAFRACB3 TO CANTOR;
GRANT EXECUTE ON GDEM.FAFRACBO TO CANTOR;
GRANT EXECUTE ON GDEM.FAFRACDE TO CANTOR;
GRANT EXECUTE ON GDEM.FAFRACDEL TO CANTOR;
GRANT EXECUTE ON GDEM.FAFRACDELSC TO CANTOR;
GRANT EXECUTE ON GDEM.FAFRACDESC TO CANTOR;
GRANT EXECUTE ON GDEM.FAFRACNP TO CANTOR;
Edited by: Jpmill on Aug 7, 2009 11:05 AM

Hi.
Then use all these below views to get the grants:-
ALL_TAB_PRIVS          All object grants where the user or public is grantee
ALL_TAB_PRIVS_MADE     All object grants made by user or on user owned objects
ALL_TAB_PRIVS_RECD     All object grants to user or public
DBA_SYS_PRIVS          System privileges granted to users and roles
DBA_ROLES          List of all roles in the database
DBA_ROLE_PRIVS          Roles granted to users and to other roles
ROLE_ROLE_PRIVS          Roles granted to other roles
ROLE_SYS_PRIVS          System privileges granted to roles
ROLE_TAB_PRIVS          Table privileges granted to roles
SESSION_PRIVS          All privileges currently available to user
SESSION_ROLES          All roles currently available to user
USER_SYS_PRIVS          System privileges granted to current user
USER_TAB_PRIV          Grants on objects where current user is grantee, grantor, or ownerAnand

Similar Messages

  • Generate script to delete all schemas

    Hello All,
    I'm going to do a reimport and i want to delete all the schemas in the db....
    I've written this script:
    select 'DROP TABLE schemaname.' || TABLE_NAME || ' CASCADE CONSTRAINTS;'
    from dba_tables
    where owner = 'schemaname'
    order by TABLE_NAME;
    how can i generate the script for all the schemas? The above will only list one schema...
    Basically i want to do another import and get a clean log (as clean as possible).
    Thanks.

    You modify your query to select a distinct list of object owners. In fact you might want to look for some other objects besides tables. If you are only interested in tables you should probably change the subquery to look at dba_tables.
    select 'DROP TABLE '||owner||'.' || TABLE_NAME || ' CASCADE CONSTRAINTS;'
    from dba_tables
    where owner in (select distinct owner from dba_objects
    where owner not in ('SYS','SYSTEM','OUTLN','PUBLIC')
    order by TABLE_NAME;
    You should look the list of owners over very carefully before running the resulting DDL commands. There are other owners, depending on your Oracle version and features in use, that you will not want to touch.
    HTH -- Mark D Powell --

  • TIPS(18) : CREATING SCRIPTS TO RECREATE A TABLE STRUCTURE

    제품 : SQL*PLUS
    작성날짜 : 1996-11-12
    TIPS(18) : Creating Scripts to Recreate a Table Structure
    =========================================================
    The script creates scripts that can be used to recreate a table structure.
    For example, this script can be used when a table has become fragmented or to
    get a defintion that can be run on another database.
    CREATES SCRIPT TO RECREATE A TABLE-STRUCTURE
    INCL. STORAGE, CONSTRAINTS, TRIGGERS ETC.
    This script creates scripts to recreate a table structure.
    Use the script to reorganise a table that has become fragmented,
    to get a definition that can be run on another database/schema or
    as a basis for altering the table structure (eg. drop a column!).
    IMPORTANT: Running the script is safe as it only creates two new scripts and
    does not do anything to your database! To get anything done you have to run the
    scripts created.
    The created scripts does the following:
    1. save the content of the table
    2. drop any foreign key constraints referencing the table
    3. drop the table
    4. creates the table with an Initial storage parameter that
    will accomodate the entire content of the table. The Next
    parameter is 25% of the initial.
    The storage parameters are picked from the following list:
    64K, 128K, 256K, 512K, multiples of 1M.
    5. create table and column comments
    6. fill the table with the original content
    7. create all the indexes incl storage parameters as above.
    8. add primary, unique key and check constraints.
    9. add foreign key constraints for the table and for referencing
    tables.
    10.Create the table's triggers.
    11.Compile any depending objects (cascading).
    12.Grant table and column privileges.
    13.Create synonyms.
    This script must be run as the owner of the table.
    If your table contains a LONG-column, use the COPY
    command in SQL*Plus to store/restore the data.
    USAGE
    from SQL*Plus:
    start reorgtb
    This will create the scripts REORGS1.SQL and REORGS2.SQL
    REORGS1.SQL contains code to save the current content of the table.
    REORGS2.SQL contains code to rebuild the table structure.
    undef tab;
    set echo off
    column a1 new_val stor
    column b1 new_val nxt
    select
    decode(sign(1024-sum(bytes)/1024),-1,to_char((round(sum(bytes)/(1024*1
    024))+1))||'M', /* > 1M new rounded up to nearest Megabyte */
    decode(sign(512-sum(bytes)/1024), -1,'1M',
    decode(sign(256-sum(bytes)/1024), -1,'512K',
    decode(sign(128-sum(bytes)/1024), -1,'256K',
    decode(sign(64-sum(bytes)/1024) , -1,'128K',
    '64K'
    a1,
    decode(sign(1024-sum(bytes)/4096),-1,to_char((round(sum(bytes)/(4096*1
    024))+1))||'M', /* > 1M new rounded up to nearest Megabyte */
    decode(sign(512-sum(bytes)/4096), -1,'1M',
    decode(sign(256-sum(bytes)/4096), -1,'512K',
    decode(sign(128-sum(bytes)/4096), -1,'256K',
    decode(sign(64-sum(bytes)/4096) , -1,'128K',
    '64K'
    b1
    from user_extents
    where segment_name=upper('&1');
    set pages 0 feed off verify off lines 150
    col c1 format a80
    spool reorgs1.sql
    PROMPT drop table bk_&1
    prompt /
    PROMPT create table bk_&1 storage (initial &stor) as select * from &1
    prompt /
    spool off
    spool reorgs2.sql
    PROMPT spool reorgs2
    select 'alter table '||table_name||' drop constraint
    '||constraint_name||';'
    from user_constraints where r_constraint_name
    in (select constraint_name from user_constraints where
    table_name=upper('&1')
    and constraint_type in ('P','U'));
    PROMPT drop table &1
    prompt /
    prompt create table &1
    select decode(column_id,1,'(',',')
    ||rpad(column_name,40)
    ||decode(data_type,'DATE' ,'DATE '
    ,'LONG' ,'LONG '
    ,'LONG RAW','LONG RAW '
    ,'RAW' ,'RAW '
    ,'CHAR' ,'CHAR '
    ,'VARCHAR' ,'VARCHAR '
    ,'VARCHAR2','VARCHAR2 '
    ,'NUMBER' ,'NUMBER '
    ,'unknown')
    ||rpad(
    decode(data_type,'DATE' ,null
    ,'LONG' ,null
    ,'LONG RAW',null
    ,'RAW' ,decode(data_length,null,null
    ,'('||data_length||')')
    ,'CHAR' ,decode(data_length,null,null
    ,'('||data_length||')')
    ,'VARCHAR' ,decode(data_length,null,null
    ,'('||data_length||')')
    ,'VARCHAR2',decode(data_length,null,null
    ,'('||data_length||')')
    ,'NUMBER' ,decode(data_precision,null,' '
    ,'('||data_precision||
    decode(data_scale,null,null
    ,','||data_scale)||')')
    ,'unknown'),8,' ')
    ||decode(nullable,'Y','NULL','NOT NULL') c1
    from user_tab_columns
    where table_name = upper('&1')
    order by column_id
    prompt )
    select 'pctfree '||t.pct_free c1
    ,'pctused '||t.pct_used c1
    ,'initrans '||t.ini_trans c1
    ,'maxtrans '||t.max_trans c1
    ,'tablespace '||s.tablespace_name c1
    ,'storage (initial '||'&stor' c1
    ,' next '||'&stor' c1
    ,' minextents '||t.min_extents c1
    ,' maxextents '||t.max_extents c1
    ,' pctincrease '||t.pct_increase||')' c1
    from user_Segments s, user_tables t
    where s.segment_name = upper('&1') and
    t.table_name = upper('&1')
    and s.segment_type = 'TABLE'
    prompt /
    select 'comment on table &1 is '''||comments||''';' c1 from
    user_tab_comments
    where table_name=upper('&1');
    select 'comment on column &1..'||column_name||
    ' is '''||comments||''';' c1 from user_col_comments
    where table_name=upper('&1');
    prompt insert into &1 select * from bk_&1
    prompt /
    set serveroutput on
    declare
    cursor c1 is select index_name,decode(uniqueness,'UNIQUE','UNIQUE')
    unq
    from user_indexes where
    table_name = upper('&1');
    indname varchar2(50);
    cursor c2 is select
    decode(column_position,1,'(',',')||rpad(column_name,40) cl
    from user_ind_columns where table_name = upper('&1') and
    index_name = indname
    order by column_position;
    l1 varchar2(100);
    l2 varchar2(100);
    l3 varchar2(100);
    l4 varchar2(100);
    l5 varchar2(100);
    l6 varchar2(100);
    l7 varchar2(100);
    l8 varchar2(100);
    l9 varchar2(100);
    begin
    dbms_output.enable(100000);
    for c in c1 loop
    dbms_output.put_line('create '||c.unq||' index '||c.index_name||' on
    &1');
    indname := c.index_name;
    for q in c2 loop
    dbms_output.put_line(q.cl);
    end loop;
    dbms_output.put_line(')');
    select 'pctfree '||i.pct_free ,
    'initrans '||i.ini_trans ,
    'maxtrans '||i.max_trans ,
    'tablespace '||i.tablespace_name ,
    'storage (initial '||
    decode(sign(1024-sum(e.bytes)/1024),-1,
    to_char((round(sum(e.bytes)/(1024*1024))+1))||'M',
    decode(sign(512-sum(e.bytes)/1024), -1,'1M',
    decode(sign(256-sum(e.bytes)/1024), -1,'512K',
    decode(sign(128-sum(e.bytes)/1024), -1,'256K',
    decode(sign(64-sum(e.bytes)/1024) , -1,'128K',
    '64K'))))) ,
    ' next '||
    decode(sign(1024-sum(e.bytes)/4096),-1,
    to_char((round(sum(e.bytes)/(4096*1024))+1))||'M',
    decode(sign(512-sum(e.bytes)/4096), -1,'1M',
    decode(sign(256-sum(e.bytes)/4096), -1,'512K',
    decode(sign(128-sum(e.bytes)/4096), -1,'256K',
    decode(sign(64-sum(e.bytes)/4096) , -1,'128K',
    '64K'))))) ,
    ' minextents '||s.min_extents ,
    ' maxextents '||s.max_extents ,
    ' pctincrease '||s.pct_increase||')'
    into l1,l2,l3,l4,l5,l6,l7,l8,l9
    from user_extents e,user_segments s, user_indexes i
    where s.segment_name = c.index_name
    and s.segment_type = 'INDEX'
    and i.index_name = c.index_name
    and e.segment_name=s.segment_name
    group by s.min_extents,s.max_extents,s.pct_increase,
    i.pct_free,i.ini_trans,i.max_trans,i.tablespace_name ;
    dbms_output.put_line(l1);
    dbms_output.put_line(l2);
    dbms_output.put_line(l3);
    dbms_output.put_line(l4);
    dbms_output.put_line(l5);
    dbms_output.put_line(l6);
    dbms_output.put_line(l7);
    dbms_output.put_line(l8);
    dbms_output.put_line(l9);
    dbms_output.put_line('/');
    end loop;
    end;
    declare
    cursor c1 is
    select constraint_name, decode(constraint_type,'U',' UNIQUE',' PRIMARY
    KEY') typ,
    decode(status,'DISABLED','DISABLE',' ') status from user_constraints
    where table_name = upper('&1')
    and constraint_type in ('U','P');
    cname varchar2(100);
    cursor c2 is
    select decode(position,1,'(',',')||rpad(column_name,40) coln
    from user_cons_columns
    where table_name = upper('&1')
    and constraint_name = cname
    order by position;
    begin
    for q1 in c1 loop
    cname := q1.constraint_name;
    dbms_output.put_line('alter table &1');
    dbms_output.put_line('add constraint '||cname||q1.typ);
    for q2 in c2 loop
    dbms_output.put_line(q2.coln);
    end loop;
    dbms_output.put_line(')' ||q1.status);
    dbms_output.put_line('/');
    end loop;
    end;
    declare
    cursor c1 is
    select c.constraint_name,c.r_constraint_name cname2,
    c.table_name table1, r.table_name table2,
    decode(c.status,'DISABLED','DISABLE',' ') status,
    decode(c.delete_rule,'CASCADE',' on delete cascade ',' ')
    delete_rule
    from user_constraints c,
    user_constraints r
    where c.constraint_type='R' and
    c.r_constraint_name = r.constraint_name and
    c.table_name = upper('&1')
    union
    select c.constraint_name,c.r_constraint_name cname2,
    c.table_name table1, r.table_name table2,
    decode(c.status,'DISABLED','DISABLE',' ') status,
    decode(c.delete_rule,'CASCADE',' on delete cascade ',' ')
    delete_rule
    from user_constraints c,
    user_constraints r
    where c.constraint_type='R' and
    c.r_constraint_name = r.constraint_name and
    r.table_name = upper('&1');
    cname varchar2(50);
    cname2 varchar2(50);
    cursor c2 is
    select decode(position,1,'(',',')||rpad(column_name,40) colname
    from user_cons_columns
    where constraint_name = cname
    order by position;
    cursor c3 is
    select decode(position,1,'(',',')||rpad(column_name,40) refcol
    from user_cons_columns
    where constraint_name = cname2
    order by position;
    begin
    dbms_output.enable(100000);
    for q1 in c1 loop
    cname := q1.constraint_name;
    cname2 := q1.cname2;
    dbms_output.put_line('alter table '||q1.table1||' add constraint ');
    dbms_output.put_line(cname||' foreign key');
    for q2 in c2 loop
    dbms_output.put_line(q2.colname);
    end loop;
    dbms_output.put_line(') references '||q1.table2);
    for q3 in c3 loop
    dbms_output.put_line(q3.refcol);
    end loop;
    dbms_output.put_line(') '||q1.delete_rule||q1.status);
    dbms_output.put_line('/');
    end loop;
    end;
    col c1 format a79 word_wrap
    set long 32000
    set arraysize 1
    select 'create or replace trigger ' c1,
    description c1,
    'WHEN ('||when_clause||')' c1,
    trigger_body ,
    '/' c1
    from user_triggers
    where table_name = upper('&1') and when_clause is not null
    select 'create or replace trigger ' c1,
    description c1,
    trigger_body ,
    '/' c1
    from user_triggers
    where table_name = upper('&1') and when_clause is null
    select 'alter trigger '||trigger_name||decode(status,'DISABLED','
    DISABLE',' ENABLE')
    from user_Triggers where table_name='&1';
    set serveroutput on
    declare
    cursor c1 is
    select 'alter table
    '||'&1'||decode(substr(constraint_name,1,4),'SYS_',' ',
    ' add constraint ') a1,
    decode(substr(constraint_name,1,4),'SYS_','
    ',constraint_name)||' check (' a2,
    search_condition a3,
    ') '||decode(status,'DISABLED','DISABLE','') a4,
    '/' a5
    from user_constraints
    where table_name = upper('&1') and
    constraint_type='C';
    b1 varchar2(100);
    b2 varchar2(100);
    b3 varchar2(32000);
    b4 varchar2(100);
    b5 varchar2(100);
    fl number;
    begin
    open c1;
    loop
    fetch c1 into b1,b2,b3,b4,b5;
    exit when c1%NOTFOUND;
    select count(*) into fl from user_tab_columns where table_name =
    upper('&1') and
    upper(column_name)||' IS NOT NULL' = upper(b3);
    if fl = 0 then
    dbms_output.put_line(b1);
    dbms_output.put_line(b2);
    dbms_output.put_line(b3);
    dbms_output.put_line(b4);
    dbms_output.put_line(b5);
    end if;
    end loop;
    end;
    create or replace procedure dumzxcvreorg_dep(nam varchar2,typ
    varchar2) as
    cursor cur is
    select type,decode(type,'PACKAGE BODY','PACKAGE',type) type1,
    name from user_dependencies
    where referenced_name=upper(nam) and referenced_type=upper(typ);
    begin
    dbms_output.enable(500000);
    for c in cur loop
    dbms_output.put_line('alter '||c.type1||' '||c.name||' compile;');
    dumzxcvreorg_dep(c.name,c.type);
    end loop;
    end;
    exec dumzxcvreorg_dep('&1','TABLE');
    drop procedure dumzxcvreorg_Dep;
    select 'grant '||privilege||' on '||table_name||' to '||grantee||
    decode(grantable,'YES',' with grant option;',';') from
    user_tab_privs where table_name = upper('&1');
    select 'grant '||privilege||' ('||column_name||') on &1 to
    '||grantee||
    decode(grantable,'YES',' with grant option;',';')
    from user_col_privs where grantor=user and
    table_name=upper('&1')
    order by grantee, privilege;
    select 'create synonym '||synonym_name||' for
    '||table_owner||'.'||table_name||';'
    from user_synonyms where table_name=upper('&1');
    PROMPT REM
    PROMPT REM YOU MAY HAVE TO LOG ON AS SYSTEM TO BE
    PROMPT REM ABLE TO CREATE ANY OF THE PUBLIC SYNONYMS!
    PROMPT REM
    select 'create public synonym '||synonym_name||' for
    '||table_owner||'.'||table_name||';'
    from all_synonyms where owner='PUBLIC' and table_name=upper('&1') and
    table_owner=user;
    prompt spool off
    spool off
    set echo on feed on verify on
    The scripts REORGS1.SQL and REORGS2.SQL have been
    created. Alter these script as necesarry.
    To recreate the table-structure, first run REORGS1.SQL.
    This script saves the content of your table in a table
    called bk_.
    If this script runs successfully run REORGS2.SQL.
    The result is spooled to REORGTB.LST.
    Check this file before dropping the bk_ table.
    */

    Please do NOT cross-postings: create a deep structure for dynamic internal table
    Regards
      Uwe

  • Installation Problem on 11g, RHEL 5 - Unable to generate temporary script

    Hello all,
    This is for the first time i am encountering this kind of error on 11g. Half way through installation i get this error.
    All parameters set correct, used the official installation technique (works fine previously), except for this time i am getting a weird error, which does not allow me to continue with the installation.
    Please help.
    Environment
    Oracle 11g
    RHEL 5
    Error on GUI -
    OUI-10053: Unable to generate temporary script: {0}. Unable to continue install
    Error on command prompt -
    OUI-10053:Unable to generate temporary script: /u01/app/oraInventory/orainstRoot.sh. Unable to continue install.
    Help appreciated.
    Thanks

    Hi Monu Koshy
    Can you please control the user rights and also the df ?
    ls -al /u01/app/oraInventory/
    df -h /u01/app/oraInventory/
    Regards,
    Hub

  • ERR  Agent Clone Failed SEVERE:OUI-10053:Unable to generate temporary script: {0}. Unable to continue install

    ==============>deploy log information:
    2015-04-27_14-50-42:INFO:Install Args AGENT_PORT=3872
    2015-04-27_14-50-42:INFO:Action description 在主机 expquery03 上执行命令 /bin/sh -c '/u01/app/agent_12c/ADATMP_2015-04-27_14-18-30-PM/agentDeploy.sh -ignorePrereqs ORACLE_HOSTNAME=expquery03 AGENT_BASE_DIR=/u01/app/agent_12c OMS_HOST=oragc12c.yto.net.cn EM_UPLOAD_PORT=4903 AGENT_INSTANCE_HOME=/u01/app/agent_12c/agent_inst b_doDiscovery=false b_startAgent=false b_forceInstCheck=true AGENT_PORT=3872'
    2015-04-27_14-50-42:INFO:Attempt :1 pty required false  with no inputs
    2015-04-27_15-11-47:INFO:/bin/sh -c '/u01/app/agent_12c/ADATMP_2015-04-27_14-18-30-PM/agentDeploy.sh -ignorePrereqs ORACLE_HOSTNAME=expquery03 AGENT_BASE_DIR=/u01/app/agent_12c OMS_HOST=oragc12c.yto.net.cn EM_UPLOAD_PORT=4903 AGENT_INSTANCE_HOME=/u01/app/agent_12c/agent_inst b_doDiscovery=false b_startAgent=false b_forceInstCheck=true AGENT_PORT=3872' execution failed on host expquery03
    2015-04-27_15-11-47:INFO:Pattern ERROR: found in file /opt/app/oem12c/gc_inst/em/EMGC_OMS1/sysman/agentpush/2015-04-27_14-18-30-PM/logs/expquery03/install.log Line ERROR: Agent Clone Failed SEVERE:OUI-10053:Unable to generate temporary script: {0}. Unable to continue install.
    2015-04-27_15-11-47:INFO:Error Message found  Agent Clone Failed SEVERE:OUI-10053:Unable to generate temporary script: {0}. Unable to continue install.
    2015-04-27_15-11-47:INFO: ACTION 在主机 expquery03 上执行命令 /u01/app/agent_12c/ADATMP_2015-04-27_14-18-30-PM/agentDeploy.sh -ignorePrereqs ORACLE_HOSTNAME=expquery03 AGENT_BASE_DIR=/u01/app/agent_12c OMS_HOST=oragc12c.yto.net.cn EM_UPLOAD_PORT=4903 AGENT_INSTANCE_HOME=/u01/app/agent_12c/agent_inst b_doDiscovery=false b_startAgent=false b_forceInstCheck=true AGENT_PORT=3872
    2015-04-27_15-11-47:INFO: OUT null
    2015-04-27_15-11-47:INFO: ERR  Agent Clone Failed SEVERE:OUI-10053:Unable to generate temporary script: {0}. Unable to continue install.
    2015-04-27_15-11-47:INFO: EXIT CODE1
    2015-04-27_15-11-47:INFO:InvocationTargetException Exception
    2015-04-27_15-11-47:INFO:Printing Exception :java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at oracle.sysman.core.agentpush.ui.deployer.BaseDeployerOps.executeActions(BaseDeployerOps.java:1924)
            at oracle.sysman.core.agentpush.ui.deployer.NewAgentDeployer.deploy(NewAgentDeployer.java:59)
            at oracle.sysman.core.agentpush.ui.deployfwk.DeploymentWorker.run(DeploymentWorker.java:26)
            at oracle.sysman.util.threadPoolManager.WorkerThread.run(Worker.java:311)
    Caused by: CommandException: err:  Agent Clone Failed SEVERE:OUI-10053:Unable to generate temporary script: {0}. Unable to continue install. out: null exitcode: 1
    stacktrace:
    null
            at oracle.sysman.core.agentpush.ui.deployer.DeployerOps.executeCommandOnNodeInteractive(DeployerOps.java:1204)
            at oracle.sysman.core.agentpush.ui.deployer.DeployerOps.executeCommandOnNodeInteractive(DeployerOps.java:1050)
            at oracle.sysman.core.agentpush.ui.deployer.DeployerOps.executeCmdOnNode(DeployerOps.java:644)
            at oracle.sysman.core.agentpush.ui.deployer.DeployerOps.executeCmdOnNode(DeployerOps.java:593)
            at oracle.sysman.core.agentpush.ui.deployer.BaseDeployerOps.doInstall(BaseDeployerOps.java:484)
    oem@oragc12c bin]$ more /u01/app/agent_12c/core/12.1.0.4.0/cfgtoollogs/agentDeploy/agentDeploy_2015-04-27_15-10-25-PM.log
    /u01/app/agent_12c/core/12.1.0.4.0/cfgtoollogs/agentDeploy/agentDeploy_2015-04-27_15-10-25-PM.log: No such file or directory
    [oem@oragc12c bin]$ more /opt/app/oem12c/gc_inst/em/EMGC_OMS1/sysman/agentpush/2015-04-27_14-18-30-PM/logs/expquery03/install.log
    -e Validating the OMS_HOST & EM_UPLOAD_PORT
    Executing command : /u01/app/agent_12c/core/12.1.0.4.0/jdk/bin/java -classpath /u01/app/agent_12c/core/12.1.0.4.0/jlib/agentInstaller.jar:/u01/app/agent_12c/core/12.1.0.4.0/oui/jlib/OraInstaller.jar oracle.s
    ysman.agent.installer.AgentInstaller /u01/app/agent_12c/core/12.1.0.4.0 /u01/app/agent_12c/ADATMP_2015-04-27_14-18-30-PM /u01/app/agent_12c -prereq
    Validating oms host & port with url: http://oragc12c.yto.net.cn:4903/empbs/genwallet
    Validating oms host & port with url: https://oragc12c.yto.net.cn:4903/empbs/genwalletReturn status:3-oms https port is passedUnzipping the agentcoreimage.zip to /u01/app/agent_12c ....12.1.0.4.0_PluginsOneof
    fs_197.zip
    Executing command : /u01/app/agent_12c/ADATMP_2015-04-27_14-18-30-PM/unzip -o /u01/app/agent_12c/ADATMP_2015-04-27_14-18-30-PM/12.1.0.4.0_PluginsOneoffs_197.zip -d /u01/app/agent_12cExecuting command : /u01/
    app/agent_12c/core/12.1.0.4.0/jdk/bin/java  -d64 -classpath /u01/app/agent_12c/core/12.1.0.4.0/oui/jlib/OraInstaller.jar:/u01/app/agent_12c/core/12.1.0.4.0/oui/jlib/xmlparserv2.jar:/u01/app/agent_12c/core/12
    .1.0.4.0/oui/jlib/srvm.jar:/u01/app/agent_12c/core/12.1.0.4.0/oui/jlib/emCfg.jar:/u01/app/agent_12c/core/12.1.0.4.0/jlib/agentInstaller.jar:/u01/app/agent_12c/core/12.1.0.4.0/oui/jlib/share.jar oracle.sysman
    .agent.installer.AgentInstaller /u01/app/agent_12c/core/12.1.0.4.0 /u01/app/agent_12c/ADATMP_2015-04-27_14-18-30-PM /u01/app/agent_12c /u01/app/agent_12c/agent_inst AGENT_BASE_DIR=/u01/app/agent_12c
    Failed to read the inventory
    Failed to read the inventory=====================>but the inventory no problem
    Cloning the agent home...
    Executing command: /u01/app/agent_12c/core/12.1.0.4.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=/u01/app/agent_12c/core/12.1.0.4.0   AG
    ENT_BASE_DIR=/u01/app/agent_12c ORACLE_HOSTNAME=expquery03 AGENT_BASE_DIR=/u01/app/agent_12c OMS_HOST=oragc12c.yto.net.cn EM_UPLOAD_PORT=4903 AGENT_INSTANCE_HOME=/u01/app/agent_12c/agent_inst b_doDiscovery=f
    alse b_startAgent=false b_forceInstCheck=true AGENT_PORT=3872 -noconfig  ORACLE_HOME_NAME=agent12c1 -force b_noUpgrade=true
    ERROR: Agent Clone Failed SEVERE:OUI-10053:Unable to generate temporary script: {0}. Unable to continue install.
    Agent Deploy Log Location:/u01/app/agent_12c/core/12.1.0.4.0/cfgtoollogs/agentDeploy/agentDeploy_2015-04-27_15-10-25-PM.log
    ============>agent client privage and "/tmp" information  at hp-unix
    $ bdf
    Filesystem          kbytes    used   avail %used Mounted on
    /dev/vg00/lvol3    5242880  384784 4820160    7% /
    /dev/vg00/lvol1    1835008  376272 1447400   21% /stand
    /dev/vg00/lvol7    20971520 8977200 11902024   43% /var
    /dev/vg00/lvol9    7864320 3213136 4614904   41% /usr
    /dev/vg00/lvol6    85983232 63055260 21527575   75% /u01
    /dev/vg00/lvol5    10485760 2268216 8153768   22% /tmp===============>
    /dev/vg00/lvol8    10354688 6536024 3788952   63% /opt
    /dev/vg00/lvol4    52428800 13319488 38803816   26% /home
    $ ls -lt
    total 6
    drwxr-xr-x   2 oem        oinstall      1024 Apr 27 15:14 agent_12c
    drwxrwx---   5 grid       oinstall      1024 Apr 27 15:11 oraInventory
    drwxr-xr-x   3 oem        oinstall        96 Apr 22 16:16 agent
    drwxrwxr-x   8 grid       oinstall      1024 Apr 21 14:58 grid
    drwxrwxr-x   6 grid       oinstall        96 Aug  7  2013 oracle
    drwxr-xr-x   3 root       oinstall        96 Aug  2  2013 11.2.0
    $ cd oraInventory
    $ ls -lt
    total 44
    drwxrwx---   2 grid       oinstall     16384 Apr 27 15:10 logs
    drwxrwx---   3 grid       oinstall      2048 Apr 22 10:36 backup
    drwxrwx---   2 grid       oinstall      1024 Apr  3  2014 ContentsXML
    -rwxrwx---   1 grid       oinstall      1686 Aug  6  2013 orainstRoot.sh
    -rw-rw----   1 grid       oinstall        56 Aug  6  2013 oraInst.loc
    $ cd ContentsXML
    $ ls
    comps.xml      inventory.xml  libs.xml
    $ ls -lt
    total 6
    -rw-rw----   1 grid       oinstall       842 Apr 21 10:31 inventory.xml
    -rw-rw----   1 grid       oinstall       329 Apr 20 17:32 comps.xml
    -rw-rw----   1 grid       oinstall       292 Apr 20 17:32 libs.xml
    I view some oms document ,don't know the case

    agent client's apeloy log:
    $ more /u01/app/agent_12c/core/12.1.0.4.0/cfgtoollogs/agentDeploy/agentDeploy_2015-04-27_16-22-23-PM.log
    INFO: /u01/app/agent_12c/core/12.1.0.4.0
    INFO: /u01/app/agent_12c/ADATMP_2015-04-27_15-33-29-PM
    INFO: /u01/app/agent_12c
    INFO: /u01/app/agent_12c/agent_inst
    INFO: AGENT_BASE_DIR=/u01/app/agent_12c
    INFO: -ignorePrereqs
    INFO: ORACLE_HOSTNAME=expquery03
    INFO: AGENT_BASE_DIR=/u01/app/agent_12c
    INFO: OMS_HOST=oragc12c.yto.net.cn
    INFO: EM_UPLOAD_PORT=4903
    INFO: AGENT_INSTANCE_HOME=/u01/app/agent_12c/agent_inst
    INFO: b_doDiscovery=false
    INFO: b_startAgent=false
    INFO: b_forceInstCheck=true
    INFO: AGENT_PORT=3872
    INFO: AGENT_BASE_DIR=/u01/app/agent_12c
    INFO: ORACLE_HOSTNAME=expquery03
    INFO: AGENT_BASE_DIR=/u01/app/agent_12c
    INFO: OMS_HOST=oragc12c.yto.net.cn
    INFO: EM_UPLOAD_PORT=4903
    INFO: AGENT_INSTANCE_HOME=/u01/app/agent_12c/agent_inst
    INFO: b_doDiscovery=false
    INFO: b_startAgent=false
    INFO: b_forceInstCheck=true
    INFO: AGENT_PORT=3872
    INFO:  Setting the system property ORACLE_HOSTNAME to:expquery03
    INFO:  Setting the system property oracle.installer.oui_loc to:/u01/app/agent_12c/core/12.1.0.4.0/oui
    INFO: Agent Base Directory is : /u01/app/agent_12c
    INFO: Agent Home is : /u01/app/agent_12c/core/12.1.0.4.0
    INFO: Sbin Home is : /u01/app/agent_12c/sbin
    INFO: Logs Location is : /u01/app/agent_12c/core/12.1.0.4.0/cfgtoollogs/agentDeploy
    SEVERE: User has specified -ignorePrereqs when invoking the installer.  All pre-requisite checks will be ignored for this installation session.  Configuration failures may result if proper pre-requisites are
    not satisfied.
    INFO:
    Setting system property CUSTOM_INVENTORY to /u01/app/oraInventory
    INFO: Clone start time:2015-04-27_16-22-24-PM
    INFO: Executing command: /u01/app/agent_12c/core/12.1.0.4.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=/u01/app/agent_12c/core/12.1.0.4.
    0   -noconfig  ORACLE_HOME_NAME=agent12c1 -force
    INFO: Starting Oracle Universal Installer...
    INFO:
    INFO: Checking swap space: must be greater than 500 MB.   Actual 61440 MB    Passed
    INFO: Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-04-27_04-22-24PM. Please wait ...Oracle Universal Installer, Version 11.1.0.12.0 Production
    INFO: Copyright (C) 1999, 2014, Oracle. All rights reserved.
    INFO:
    INFO: org.xml.sax.SAXParseException: <Line 1, Column 38>: XML-20100: (Fatal Error) Expected '?>'.
    INFO:   at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:422)
    INFO:   at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:287)
    INFO:   at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:345)
    INFO:   at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:307)
    INFO:   at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:212)
    INFO:   at oracle.sysman.oii.oiii.OiiiInstallXMLReader.readHomes(OiiiInstallXMLReader.java:150)
    INFO:   at oracle.sysman.oii.oiii.OiiiInstallXMLReader.readHomes(OiiiInstallXMLReader.java:88)
    INFO:   at oracle.sysman.oii.oiii.OiiiInstallInventory.readHomes(OiiiInstallInventory.java:708)
    INFO:   at oracle.sysman.oii.oiii.OiiiInstallAreaControl.loadPartialInstallInv(OiiiInstallAreaControl.java:766)
    INFO:   at oracle.sysman.oii.oiii.OiiiInstallAreaControl.initInstallInv(OiiiInstallAreaControl.java:811)
    INFO:   at oracle.sysman.oii.oiii.OiiiInstallAreaControl.loadInstallInventory(OiiiInstallAreaControl.java:582)
    INFO:   at oracle.sysman.oii.oiii.OiiiInstallAreaControl.initAreaControl(OiiiInstallAreaControl.java:1965)
    INFO:   at oracle.sysman.oii.oiii.OiiiInstallAreaControl.initAreaControl(OiiiInstallAreaControl.java:1929)
    INFO:   at oracle.sysman.oii.oiic.OiicCloneSession.setAreaControls(OiicCloneSession.java:1309)
    INFO:   at oracle.sysman.oii.oiic.OiicCloneSession.<init>(OiicCloneSession.java:932)
    INFO:   at oracle.sysman.oii.oiic.OiicSessionWrapper.createNewSession(OiicSessionWrapper.java:878)
    INFO:   at oracle.sysman.oii.oiic.OiicSessionWrapper.<init>(OiicSessionWrapper.java:189)
    INFO:   at oracle.sysman.oii.oiic.OiicInstaller.init(OiicInstaller.java:511)
    INFO:   at oracle.sysman.oii.oiic.OiicInstaller.runInstaller(OiicInstaller.java:967)
    INFO:   at oracle.sysman.oii.oiic.OiicInstaller.main(OiicInstaller.java:905)
    INFO: org.xml.sax.SAXParseException: <Line 1, Column 38>: XML-20100: (Fatal Error) Expected '?>'.
    INFO:   at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:422)
    INFO:   at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:287)
    INFO:   at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:345)
    INFO:   at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:307)
    INFO:   at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:212)
    INFO:   at oracle.sysman.oii.oiii.OiiiInstallXMLReader.readHomes(OiiiInstallXMLReader.java:150)
    INFO:   at oracle.sysman.oii.oiii.OiiiInstallXMLReader.readHomes(OiiiInstallXMLReader.java:88)
    INFO:   at oracle.sysman.oii.oiii.OiiiInstallInventory.readHomes(OiiiInstallInventory.java:708)
    INFO:   at oracle.sysman.oii.oiii.OiiiInstallAreaControl.loadPartialInstallInv(OiiiInstallAreaControl.java:766)
    INFO:   at oracle.sysman.oii.oiii.OiiiInstallAreaControl.initInstallInv(OiiiInstallAreaControl.java:811)
    INFO:   at oracle.sysman.oii.oiii.OiiiInstallAreaControl.loadInstallInventory(OiiiInstallAreaControl.java:582)
    INFO:   at oracle.sysman.oii.oiii.OiiiInstallAreaControl.initAreaControl(OiiiInstallAreaControl.java:1965)
    INFO:   at oracle.sysman.oii.oiii.OiiiInstallAreaControl.initAreaControl(OiiiInstallAreaControl.java:1929)
    INFO:   at oracle.sysman.oii.oiic.OiicCloneSession.setAreaControls(OiicCloneSession.java:1309)
    INFO:   at oracle.sysman.oii.oiic.OiicCloneSession.<init>(OiicCloneSession.java:932)
    INFO:   at oracle.sysman.oii.oiic.OiicSessionWrapper.createNewSession(OiicSessionWrapper.java:878)
    INFO:   at oracle.sysman.oii.oiic.OiicSessionWrapper.<init>(OiicSessionWrapper.java:189)
    INFO:   at oracle.sysman.oii.oiic.OiicInstaller.init(OiicInstaller.java:511)
    INFO:   at oracle.sysman.oii.oiic.OiicInstaller.runInstaller(OiicInstaller.java:967)
    INFO:   at oracle.sysman.oii.oiic.OiicInstaller.main(OiicInstaller.java:905)
    INFO: OUI-10053:Unable to generate temporary script: /tmp/orainstRoot.sh. Unable to continue install.
    INFO: SEVERE:OUI-10053:Unable to generate temporary script: {0}. Unable to continue install.
    INFO: Plugin homes:
    INFO:
    INFO: LD_LIBRARY_PATH environment variable :
    INFO: -------------------------------------------------------
    INFO: Total args: 42
    INFO: Command line argument array elements ...
    INFO: Arg:0:/tmp/OraInstall2015-04-27_04-22-24PM/jre/bin/java:
    INFO: Arg:1:-Doracle.installer.library_loc=/tmp/OraInstall2015-04-27_04-22-24PM/oui/lib/hpia64:
    INFO: Arg:2:-Doracle.installer.oui_loc=/tmp/OraInstall2015-04-27_04-22-24PM/oui:
    INFO: Arg:3:-Doracle.installer.bootstrap=TRUE:
    INFO: Arg:4:-Doracle.installer.startup_location=/u01/app/agent_12c/core/12.1.0.4.0/oui/bin:
    INFO: Arg:5:-Doracle.installer.jre_loc=../../jre:
    INFO: Arg:6:-Doracle.installer.nlsEnabled="TRUE":
    INFO: Arg:7:-Doracle.installer.prereqConfigLoc= :
    INFO: Arg:8:-Doracle.installer.unixVersion=B.11.31:
    INFO: Arg:9:-d64:
    INFO: Arg:10:-mx96m:

  • Script to open all PST files in a directory and open with Outlook.

    Hi!  I am looking for a script that opens all PST files in a directory, opens it in outlook, and writes to a log to see if it completed correctly.  I'm new to VBscript and just want to see how the script would be written.
    Thank you!!

    Thank you for all the input!  JRV, I went through the repository and couldn't find anything about importing into Outlook.  I will use it for future references and I appreciate you directing me there.
    Grant, I need to be able to locate all PST files within a directory, not point it to a specific pst.  I also need it written to a log file.  Here is what I have...Don't laugh, I'm very new...
    const ForAppending = 8
    set objTextFile = objFSO.OpenTextFile ("C:\Users\jimmy.nguyen\Desktop\Lucky.txt", ForAppending, True)
    set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("WScript.Shell")
    strCommand = "C:\Program Files (x86)\Microsoft Office\Office12\outlook.exe"
    Set objExecObject = objShell.Exec(strCommand)
    wscript.sleep 4000
    Set myOlApp = CreateObject("Outlook.Application")
    Set myNS = myolapp.GetNamespace("MAPI")
    myNS.AddStore "objfile.name"
    Sub ShowSubFolders(fFolder)
    Set objFolder = objFSO.GetFolder(fFolder.Path)
    Set colFiles = objFolder.Files
    For Each objFile in colFiles
    If UCase(objFSO.GetExtensionName(objFile.name)) = "pst" Then
    objFile.Name
    End If
    Next
    For Each Subfolder in fFolder.SubFolders
    ShowSubFolders(Subfolder)
    Next
    End Sub
    strResults = ShowSubFolders(fFolder)
    objTextFile.WriteLine(strResults)
    objTextFile.Close

  • How to automatically create the custom migration scripts after recreating SSMA project?

    How to automatically create the custom data migration scripts after recreating SSMA project?
    There is number of tables ( big tables with BLOBS)  which I want to set up automatically to be migrated with custom migration scripts (replacing e.g. attribute named "FILE" with "TO_BLOB('') AS FILE" ).
    So the question is how to open MB file (I think that it should be standard db of some destktop RDBMS) ? 

    Hi Roman.Pokrovskij,
    According
    to your description, we can use SSMA tool to migrate data from one database (including Access, Oracle and so on) to SQL Server via GUI or the scripts. There is an example about migrating Access database to SQL Server via the
    custom migration scripts, you can review refer to them.
    <?xml version="1.0" encoding="utf-8"?>
    <ssma-script-file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Microsoft SQL Server Migration Assistant for Access\Schemas\A2SSConsoleScriptSchema.xsd">
    <config>
    <output-providers>
    <output-window suppress-messages="false"
    destination="stdout"/>
    <upgrade-project action="yes"/>
    <data-migration-connection source-use-last-used="true"
    target-server="target_1"/>
    <progress-reporting enable="false"
    report-messages="false"
    report-progress="off"/>
    <object-overwrite action="skip" />
    </output-providers>
    </config>
    <servers>
    <!-- Server definition for Sql server target server-->
    <sql-server name="target_1">
    <sql-server-authentication>
    <server value="$SQLServerName$"/>
    <database value="$SQLServerDb$"/>
    <user-id value="$SQLServerUsrID$"/>
    <password value="$SQLServerPassword$"/>
    <encrypt value="true"/>
    <trust-server-certificate value="true"/>
    </sql-server-authentication>
    </sql-server>
    </servers>
    <script-commands>
    <create-new-project project-folder="$project_folder$ "
    project-name="$project_name$"
    overwrite-if-exists="true"/>
    <connect-target-database server="target_1"/>
    <load-access-database database-file="$AccessDbFolder$\$AccessDatabaseFile$"/>---
    <!--Schema Mapping-->
    <map-schema source-schema="$AccessDatabase$" sql-server-schema="$SQLServerDb$.dbo" />
    <!-- Convert schema -->
    <!-- Example: Convert entire Schema (with all attributes)-->
    <convert-schema object-name="$AccessDatabase$"
    object-type="Databases"
    conversion-report-overwrite="true"
    verbose="true"
    report-errors="true" />
    <!-- Synchronize target -->
    <!-- Example: Synchronize target entire Database with all attributes-->
    <synchronize-target object-name="$SQLServerDb$.dbo"
    on-error="fail-script" />
    <!-- Data Migration-->
    <!--Example: Data Migration of all tables in the schema (with all attributes)-->
    <migrate-data object-name="$AccessDatabase$.Tables"
    object-type="category"
    report-errors="true"
    verbose="true"/>
    </script-commands>
    </ssma-script-file>
    There is a similar scripts about migrating Oracle database to SQL Server, you can use powershell script to automatically run the console for scripts/variable files, saved in the specified folder. For more information, review the following
    article.
    http://blogs.msdn.com/b/ssma/archive/2010/09/09/performing-database-migration-assessment-using-ssma-console-application.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • When we generated a script in which language it will be stored

    Hi,
    when we generated a script in which language it will be stored.
    Thanks
    Rama

    Hi Rama,
    Whenever we generate a script, it is maintained in all languages, by default, if we tick the <b>maintain in all languages</b> checkbox.
    The original script is always maintained in the original langauge,i.e. <b>DE</b>.
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • Generate SQL scripts from Designer 6

    Hi all,
    Does anyone know how to generate an SQL-script from Designer? I want to maintain the code in the repository, and also document usages against the script. I've found ways to document the script, but then I can't generate it....
    Thanks in advance,
    Ronald

    Ronald,
    How did you record the SQL script in designer? As undefined pl/sql module (type= "null")?
    If so, you cannot generate the script with the ddl generator. To do so you could change the type to procedure and make post-generation changes to the script (cut of f the procedure header and trailer lines). An other way to generate it is to write your own SQL script generator as a headstart utility. You might take a look at the html help file generator utility which does a similar job (create a o/s file based on the repository contents).
    Let us know if you succeed.
    Regards, Marc
    null

  • [Urgent] - Change "tmp_" prefix used while generating alter script

    Hi All,
    While generating Alter script, if "Backup Tables" option is selected, then PD renames existing table with "tmp_".
    How can we change it to sth. else and also make it uppercase?
    Using DBMS is DB2 for z/OS v10.
    Using PD v16.5 SP04 PL04.
    Thanks in advance.
    Regards
    Mehmet

    Hi Memhet,
    The script syntax is in the DBMS file which can be found by going to Tools---Resources---DMBS and selecting IBM DB2 Version 10 for z/OS.   From there you would open up to:
    DB2MVS10::Script\Objects\Table
    You can modify the values, however, make sure to save it as a new DBMS file in case you need to return to the default.
    Unfortunately I am not sure what needs to be changed or if it's possible, but this is where you would start.
    Adam

  • Generate Create Script creates scripts that won't run: ORA-00922: missing..

    I'm having trouble running a script that I created by using the Generate Create Script tool in Oracle Explorer. I created the following script by running the Generate Create Script on a table called, "ASPNET_APPLICATIONS":
    CREATE TABLE "DEV"."ASPNET_APPLICATIONS" ("APPLICATIONID" NUMBER,"APPLICATIONNAME" VARCHAR2(256 BYTE),"DESCRIPTION" VARCHAR2(256 BYTE)) TABLESPACE "USERS" PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 65536 MAXEXTENTS 2147483645 MINEXTENTS 1 )
    CREATE UNIQUE INDEX "DEV"."PK_APPS" ON "DEV"."ASPNET_APPLICATIONS" ("APPLICATIONID" ) TABLESPACE "USERS"
    CREATE UNIQUE INDEX "DEV"."IDX_APPS_APPNAME" ON "DEV"."ASPNET_APPLICATIONS" (LOWER(TRIM("APPLICATIONNAME")) ) TABLESPACE "USERS"
    ALTER TABLE "DEV"."ASPNET_APPLICATIONS" ADD ( CONSTRAINT "SYS_C004598" CHECK ("APPLICATIONNAME" IS NOT NULL) ENABLE VALIDATE )
    ALTER TABLE "DEV"."ASPNET_APPLICATIONS" ADD ( CONSTRAINT "SYS_C004597" CHECK ("APPLICATIONID" IS NOT NULL) ENABLE VALIDATE )
    I then deleted the table in my Oracle 10g database and ran the above script to recreate the table. The result is that I get an error the following error, ORA-00922: missing or invalid option. Does anyone know how to resolve this?
    Is anyone aware of any bugs in the Generate Create Script option of Oracle Explorer?

    Okay, I think I found my problem.
    I was trying to run the script created by Oracle Explorer directly from a Database project I added to my Solution in Visual Studio. Visual Studio is probably using some SQL Server specific tool when I select the Run or Run On option on the script.
    When running the same script directly in the Oracle 10g Home Page (Home > SQL > SQL Scripts), I had no problem. Everything executes correctly.
    Is anyone aware of another way to run Oracle scripts directly from Visual Studio? Do I have my project setup incorrectly? This is the first project I've used .NET and Oracle together, so if anyone has any suggestions, I'd really appreciate the help.
    Thanks,
    Mycole

  • Script to recreate indexes

    Hi:
    I am on 10.2.0.3.
    I am aware (and use) index rebuild but now I need to drop and recreate all function-based indexes (for the char set conversion). Create a dropping script is easy. Does anyone have an idea on how to write a script which will get my indexes recreated? Use dba_source somehow?
    Thanks,
    Greg

    Greg,
    Here's a start:
    SELECT DBMS_METADATA.GET_DDL('INDEX',u.index_name) FROM USER_INDEXES u;

  • How can I cancel the "Recreate All Virtual Dekstops" for a pooled collection in 2012 R2?

    I currently have a system single-server installation of VDI, using 2012 R2 Standard as the server, using pooled collections of Windows 8.1.  In general, everything works very well, but I've been searching in vain for ONE command.  When
    I make a change to the master template in Hyper-V, Checkpoint it, then go into the Remote Desktop Services, go the appropriate collection and initiate a "Recreate All Virtual Desktops", how would I cancel that?
    It's happened on more than one occasion, where I make a change or an update to the template, and then push out the 25 new Virtual Desktops, and then the client comes back asking for a "little" change....but I'm stuck pushing it out until
    all 25 desktops have been recreated.  There must be a way to interrupt this process (probably leaving a few VM Desktops in an unstable state...which I don't care too much about as it's a pooled collection), update the template, and push it out again with
    the "Recreate All Virtual Desktops".  I do have the concurrency set so it recreates 5 at a time, but that noticeably impacts the users, and I don't want to just push out all 25 at a pop and interrupt everyone's work.  Any ideas?
    J

    Hi,
    Have you tried Stop-RDVirtualDesktopCollectionJob ?  Something like below:
    Import-Module RemoteDesktop
    Stop-RDVirtualDesktopCollectionJob -CollectionName "PooledCollectionName" -ConnectionBroker "broker.yourdomain.com"
    -TP

  • Issue with Generate Create Script in new ODT 11.1.0.5.10 beta

    So I'm trying to determine if there's an issue with the Generate Create Script option in the new ODT 11.1.0.5.10 beta (when you right click on a table in Server Explorer).
    The SQL create script that it generates lacks the slash between lines. For example I generated the create script for my User table and this is what was generated:
    CREATE TABLE "DEV"."SYSTEM_USER_TB" ("RID" NUMBER(10,0),"USER_NAME" VARCHAR2(256 CHAR),"APPLICATION_RID" NUMBER(10,0),"FIRST_NAME" VARCHAR2(256 CHAR),"LAST_NAME" VARCHAR2(256 CHAR),"PW" VARCHAR2(128 CHAR),"PW_FORMAT" NUMBER,"PW_SALT" VARCHAR2(128 CHAR),"LAST_ACTIVITY_DT" DATE,"EXPIRATION_DT" DATE,"EMAIL" VARCHAR2(256 CHAR),"PW_QUESTION" VARCHAR2(256 CHAR),"PW_ANSWER" VARCHAR2(256 CHAR),"APPROVED_FLG" NUMBER(1,0),"LOCKED_OUT_FLG" NUMBER(1,0),"LAST_LOGIN_DT" DATE,"LAST_PW_CHANGED_DT" DATE,"LAST_LOCKOUT_DT" DATE,"FAILED_PW_ATTEMPT_CNT" NUMBER(6,0),"FAILED_PW_ATTEMPT_WINSTART" DATE,"FAILED_PW_ANSW_ATTEMPT_CNT" NUMBER(8,0),"FAILED_PW_ANSW_ATTEMPT_WINSTRT" DATE,"CREATED_BY_RID" NUMBER(10,0),"CREATED_DT" DATE,"MODIFIED_BY_RID" NUMBER(10,0),"MODIFIED_DT" DATE) TABLESPACE "USERS" PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 131072 MAXEXTENTS 2147483645 MINEXTENTS 1 )
    CREATE UNIQUE INDEX "DEV"."XPKSTAFF" ON "DEV"."SYSTEM_USER_TB" ("RID" ) TABLESPACE "USERS"
    ALTER TABLE "DEV"."SYSTEM_USER_TB" ADD ( CONSTRAINT "SYS_C0033033" PRIMARY KEY ("RID") USING INDEX "DEV"."XPKSTAFF" ENABLE VALIDATE )
    ALTER TABLE "DEV"."SYSTEM_USER_TB" ADD ( CONSTRAINT "SYS_C0033032" CHECK ("RID" IS NOT NULL) ENABLE VALIDATE )
    CREATE TRIGGER "DEV"."SYSTEM_USER_TRG1"
    BEFORE
    INSERT
    ON "DEV"."SYSTEM_USER_TB"
    FOR EACH ROW
    begin
         select SYSTEM_USER_SEQ.nextval into :new.RID from dual;
    end;
    In my new Oracle Database Project, if I right click on the script and select "Run" or "Run On", the script fails saying:
    Connected.
    CREATE UNIQUE INDEX "DEV"."XPKSTAFF" ON "DEV"."SYSTEM_USER_TB" ("RID" ) TABLESPACE "USERS"
    ERROR at line 2:
    ORA-00922: missing or invalid option
    If I then add, a slash between lines, the script runs successfully and creates the table/trigger and whatever else just fine. For example, I changed the above generated code to look as follows:
    CREATE TABLE "DEV"."SYSTEM_USER_TB" ("RID" NUMBER(10,0),"USER_NAME" VARCHAR2(256 CHAR),"APPLICATION_RID" NUMBER(10,0),"FIRST_NAME" VARCHAR2(256 CHAR),"LAST_NAME" VARCHAR2(256 CHAR),"PW" VARCHAR2(128 CHAR),"PW_FORMAT" NUMBER,"PW_SALT" VARCHAR2(128 CHAR),"LAST_ACTIVITY_DT" DATE,"EXPIRATION_DT" DATE,"EMAIL" VARCHAR2(256 CHAR),"PW_QUESTION" VARCHAR2(256 CHAR),"PW_ANSWER" VARCHAR2(256 CHAR),"APPROVED_FLG" NUMBER(1,0),"LOCKED_OUT_FLG" NUMBER(1,0),"LAST_LOGIN_DT" DATE,"LAST_PW_CHANGED_DT" DATE,"LAST_LOCKOUT_DT" DATE,"FAILED_PW_ATTEMPT_CNT" NUMBER(6,0),"FAILED_PW_ATTEMPT_WINSTART" DATE,"FAILED_PW_ANSW_ATTEMPT_CNT" NUMBER(8,0),"FAILED_PW_ANSW_ATTEMPT_WINSTRT" DATE,"CREATED_BY_RID" NUMBER(10,0),"CREATED_DT" DATE,"MODIFIED_BY_RID" NUMBER(10,0),"MODIFIED_DT" DATE) TABLESPACE "USERS" PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 131072 MAXEXTENTS 2147483645 MINEXTENTS 1 )
    CREATE UNIQUE INDEX "DEV"."XPKSTAFF" ON "DEV"."SYSTEM_USER_TB" ("RID" ) TABLESPACE "USERS"
    ALTER TABLE "DEV"."SYSTEM_USER_TB" ADD ( CONSTRAINT "SYS_C0033033" PRIMARY KEY ("RID") USING INDEX "DEV"."XPKSTAFF" ENABLE VALIDATE )
    ALTER TABLE "DEV"."SYSTEM_USER_TB" ADD ( CONSTRAINT "SYS_C0033032" CHECK ("RID" IS NOT NULL) ENABLE VALIDATE )
    CREATE TRIGGER "DEV"."SYSTEM_USER_TRG1"
    BEFORE
    INSERT
    ON "DEV"."SYSTEM_USER_TB"
    FOR EACH ROW
    begin
         select SYSTEM_USER_SEQ.nextval into :new.RID from dual;
    end;
    So, does anyone know if this is a bug? Could I be missing an option to add in the slashes to the generated code? Is there an option to not require the slashes? Could there be another way to execute these scripts?
    Seriously, I think I'm having deja vu from the last release of the Dev Tools: Generate Create Script creates scripts that won't run: ORA-00922: missing..
    ...except this time the documentation says I should be able to use the "Run" and "Run On" commands in the Oracle Database Project (see page 8): http://www.oracle.com/technology/tech/dotnet/pdf/ODT11_whatsnew.pdf
    null

    There are 2 issues in the generated script :
    1. Missing semicolons at the end of the create stmts
    2. Missing slashes
    Both of these fixes will be available in the ODT 11.1 release.

  • Issue with Generate Create Script in new ODT 11.1.0.6.10 beta

    I've tried this on several tables in my database. I choose Generate Script to ... a file, for a given table it gives me the error message "An error occurred while writing to fil: \nValue was either too large or too smal for an Int32."
    (It doesn't matter if I'm in a Oracle database project or some other project.)
    Trying to Generate Script To Project... when I'm in a Oracle Database Project, Visual Studio (2005) crashes. It appears to be some overflow exception according to crashinfo:
    EventType : clr20r3 P1 : devenv.exe P2 : 8.0.50727.762 P3 : 45716759
    P4 : mscorlib P5 : 2.0.0.0 P6 : 461eee3d P7 : 407b P8 : a3
    P9 : system.overflowexception
    (With ODT 11.1.0.5.10 beta it worked fine dispite the issue discussed in thread: Re: Issue with Generate Create Script in new ODT 11.1.0.5.10 beta
    /Tomas

    Tried to debug this error and got these exception details. Hope it helps!
    /Tomas
    System.OverflowException was unhandled
    Message="Value was either too large or too small for an Int32."
    Source="mscorlib"
    StackTrace:
    Server stack trace:
    at System.Decimal.ToInt32(Decimal d)
    at System.Decimal.op_Explicit(Decimal value)
    at Oracle.Management.Omo.TableSpaceQuotaDetails.FillTableSpaceQuota(OracleDataReader reader)
    at Oracle.Management.Omo.User.FillTableSpaceQuotas(OracleDataReader reader)
    at Oracle.Management.Omo.Connection.GetUserCollection(Boolean refresh)
    at Oracle.Management.Omo.Connection.GetUsers(Boolean refresh)
    at Oracle.Management.Omo.TableSQLGenerator.GetCreateSQLs(OmoObject obj, ArrayList& typeAndNames, Boolean checkRequired, Boolean appendSchemaName)
    at Oracle.Management.Omo.TableViewBase.GetCreateSQLs(Boolean appendSchemaName)
    at Oracle.VsDevTools.OracleUILDBProjectServices.GenerateCreateScript(OracleUILConnCtx connCtx, String[] objectNames, String objectOwner, OracleUILObjectType objectType)
    at Oracle.VsDevTools.OracleUILDBProjectServices.GenerateCreateScriptAsyncMethod(IntPtr ppvObj, OracleUILConnCtx connCtx, String[] objectNames, String objectOwner, OracleUILObjectType objectType, ICollection& scriptText)
    at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
    at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
    at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
    Exception rethrown at [0]:
    at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
    at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
    at Oracle.VsDevTools.OracleUILDBProjectServices.GenerateScriptAsyncMethodDelegate.EndInvoke(ICollection& scriptText, IAsyncResult result)
    at Oracle.VsDevTools.OracleUILDBProjectServices.OnGenerateScriptAsyncCompletion(IAsyncResult ar)
    at System.Runtime.Remoting.Messaging.AsyncResult.SyncProcessMessage(IMessage msg)
    at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
    at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(Object o)
    at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

Maybe you are looking for

  • How do I get a new iPod Touch to have the same music setup as my old one?

    I have all the songs on my ipod touch in my itunes library, but there are also a lot of other songs I don't want, so I can't just sync the new ipod. I could drag them all individually but that would take hours. I was thinking I could get an ipod-to-i

  • Generic data extraction from R/3 into BI

    Hi Friends, We need to extract some data available in the R/3 side to BI. I have written code in a function module which brings the output into the table e_t_data. now by attaching this function module, we created a Data source also. and then from BI

  • Form Sends Email from Adobe Pro X but not from Adobe Reader x

    I have windows 7, adobe pro X and adobe reader X, and thunderbird 9.01 email client. I have a PDF form (created in lifecycle 9.0.0.2_) that is complete and is reader extended though adobe pro x. It will send the email correctly in abobe pro x, it ope

  • CLICK2CALL: HOW DO YOU CHANGE DEFAULT ACCOUNT?

    There are 2 Skype accounts on this laptop - one for free messaging, while the other has credit. When I click on a phone number, I want to be taken to the account with credit - but I'm taken to the other. How do I change it? Andrew.

  • Safari 4 - Loses Custom toolbar settings after restart

    After adding for a example a "Home" Button to the toolbar, all worked great. Next time i start Safari this settings are gone. Safari Version 4.0 (5530.17)