Rename a schema

Hello,
Is there in 10g a way to rename a schema without export/import?
Thank you in advance,
Marianne

Still in 10g there is no renaming clause as you expected,you have to use exp/imp or datapump(expdp/impdp) in 10g

Similar Messages

  • Rename database Schema

    Is they any method to rename database schema name apart from taking export and import uitlities.
    Eg:- Alter user rename xx to yy;

    No and it bugs the hell out of me! Like you say
    you'll either have to use the fromuser - touser
    syntax in import or the remap_schema option in
    datapump. Another annoyance are the inflexibility of
    oracle privileges. I want a simple command to say
    grant insert on all tables in a particular schema
    without having to list them out using object
    privileges or using the ANY syntax meaning that a
    user can insert into any schemas table.But this is what roles are for. You create the role and grant the role to the user.
    With a bit of pl/sql it would be quite straightforward to create a role which had all the tables in a schema.

  • Rename Logical Schema / Logical Agent

    Hi,
    is it possible to rename a logical schema / logical agent?
    Thanks in advance & kr
    Michael

    Hi,
    Yes it is possible to rename logical schema/agent in ODI topology .
    While renaming you will get a warning saying this is used in work repository and if you rename you need to make sure all code/objects using this logical schema are pointing to the new name . Else you may find issue during execution.
    It is not a good practice to change logical schema name.
    Thanks,
    Sutirtha

  • Query to rename a Schema name

    I have the permission of DBA.
    I want the query to rename a Schema name from abc to xyz
    Please help me
    Thanks,

    Do a user-level export of user X
    create new user A
    import system/manager fromuser=X touser=A
    drop user X

  • Renaming a Schema name

    Hi,
    Is it possible in oracle to rename a Schema?
    or
    Is it possible in any other SQL language like t-sql,mysql etc?
    Thanks
    Aravindh

    I think No,
    What you can do is export the schema to a different user name(your desired username)
    It all works on export and import.
    Thanks,
    Ganesh.

  • Renaming a schema name and full priveleges

    Hi,
    1) it possible to rename a particular schema in oracle 9i.For example the existing schema name is xyz,i want it to be renamed to abc.I dont want to do it using exp/imp.Any help will be appreciated
    2)Secondly is it possible to give full rights on one schema to another schema by giving single command or any alternative.
    For example
    Schema A should full rights on Schema B objects (i.e insert,delete,execute,create etc)
    regards
    Vijay

    Hi,
    1) it possible to rename a particular schema in oracle 9i.For example the existing schema name is xyz,i want it to be renamed to abc.I dont want to do it using exp/imp.Any help will be appreciatedYou can't rename a schema so i think only better available way is export import
    2)Secondly is it possible to give full rights on one schema to another schema by giving single command or any alternative.Yes you can create a script using following commands on sqlplus
    set lines 200
    spool c:\grants.sql
    select 'grant '||privilege|| ' to NEW_USER;' from dba_sys_privs where grantee='ACTUEL_USER_WITH_RIGHTS'
    UNION
    select 'grant '||granted_role|| ' toNEW_USER;' from dba_role_privs where grantee='ACTUEL_USER_WITH_RIGHTS'
    UNION
    select 'grant '||privilege|| ' on '||owner||'.'||table_name||' to NEW_USER;' from dba_tab_privs where grantee='ACTUEL_USER_WITH_RIGHTS';
    spool off;
    @c:\grants.sqlSalman

  • Batch Renaming Date Schemes

    I work at a business with files dating back to 2006 or so, many video. the naming scheme of these files are all MMDDYY_filename.xxx.
    We are considering redoing the naming scheme to allow for easier sort and search of certain files, but I would first like to know how to use applescript to rename selected files to the format YYMMDD_filename.xxx. I'm sure its simple and would just require an automator workflow with an applescript attached, but I'm not sure exactly what the applescript should say.
    Essentially, it's swapping the (first two) and the (5th and 6th) elements of the title and leaving the rest the same. Any ideas?
    Thanks!

    I figured it out. As you saw above, I wasn't having a problem batch renaming the title of the clips. I was having a problem with the counter. I learned in a previous posting that when you change the name of a subclip of a clip, it changes the name of both the original clip (clip in event browser, not hard drive) and the other subclips associated with it. It doesn't matter how you rename the clip (changing the name in the Name box of the Inspector, change it by clicking the name of the clip once in the event browser and typing it in, or using custom naming (click on the gear button in Inspector to find it), the name will always change correctly. For some reason (I guess a FCPX thing lol), you can't use the counter in custom naming correctly unless you change the original name through custom renaming. If you change the original name of a clip the other two ways, then try to change the new name of the clip using custom renaming with the counter, the counter will always stay the same number.

  • Delete blob column in source and rename schema using rule

    Hi
    I have blob column in source table, which i am deleting while capturing through rule based tranformation and also renaming the schema through the same rule.
    SET SERVEROUTPUT ON
    DECLARE
    v_dml_rule VARCHAR2(80);
    v_ddl_rule VARCHAR2(80);
    BEGIN
    DBMS_STREAMS_ADM.ADD_TABLE_RULES(
    table_name => 'ENGINE.ACTIVATIONS',
    streams_type => 'CAPTURE',
    streams_name => 'CAPTURE_TO_&destsid',
    queue_name => '&source_strmadmin_user..&sourcesid._TO_&destsid',
    include_dml => true,
    include_ddl => false,
    include_tagged_lcr => false,
    source_database => 'MMSTG.DEMOWORLD.COM',
    dml_rule_name => v_dml_rule,
    ddl_rule_name => v_ddl_rule,
    and_condition => ':lcr.get_command_type() != ''DELETE''',
    inclusion_rule => true);
    DBMS_STREAMS_ADM.DELETE_COLUMN(
    rule_name => v_dml_rule,
    table_name => 'ENGINE.ACTIVATIOINS',
    column_name => 'INSTANCE_DATA',
    value_type => '*',
    step_number => 0,
    operation => 'ADD');
    DBMS_STREAMS_ADM.RENAME_SCHEMA(
    rule_name => v_dml_rule,
    from_schema_name => 'ENGINE',
    to_schema_name => 'ENGINE_WEST',
    step_number => 0,
    operation => 'ADD');
    DBMS_OUTPUT.PUT_LINE('Capture DML Rule for ENGINE.ACTIVATIOINS => ' || v_dml_rule);
    END;
    I use step_number 0 for both rename schema and delete column. Some how, delete column transformation is not firing and it replicates the blob column with some bytes instead of zero bytes.
    How do we execute this both rule based transformation with correct step_number to fire both transformations. Please do let me know..
    Thanks
    Bala

    In what version?
    Step 0 is the default so that is not the issue.
    Can you also post the DDL for your table and the results of the following query:
    SELECT *
    FROM dba_streams_unsupported
    WHERE owner = <schema owner>
    AND table_name = <your table name>;

  • Can we rename Oracle username & tablespace name in 11g R2

    - We have Oracle tablespace name "TULIP"
    - We have Oracle username "TULIP"
    Default tablespace for use TULIP is TULIP.
    - Now can we rename tablespace TULIP to TULIP_NEW ?
    - Now can we rename username TULIP to TULIP_NEW ?
    Can this be done online when the database is running ?
    If NOT please give me the steps involved.
    Thanks
    Bristol

    Yes you can rename a tablespace.
    ALTER TABLESPACE <tablespace_x> RENAME TO <tablespace_y>;As far as renaming the schema there is no command for that. One approach would be to export the data and re-import using the REMAP_SCHEMA (for Data Pump) option.

  • DB adapter calling stored procedure and change database schema

    Hello,
    when I create DB adapter which call stored procedure I find that is reference to DB schema in JCA file. Other DB adapter operation (select, insert, delete) store only connection-factory location.
    What happend when I move procedure to another DB schema or rename DB schema?
    It is only about change SchemaName in JCA file?
    Thank you.

    It sounds excelent.
    I try it. Change JCA file and redeploy SCA of service.
    Next I change user in data source (password is the same for both schemas). Save and activate changes. Update deployment of DBAdapter.
    Select operation on service works but return data from old schema.
    Call stored procedure fail with exception:
    oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'delete' failed due to: Stored procedure invocation error. Error while trying to prepare and execute the NEW_SCHEMA.PKG_UTILS.SERVICE_REMOVE API. An error occurred while preparing and executing the NEW_SCHEMA.PKG_UTILS.SERVICE_REMOVE API. Cause: java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'NEW_SCHEMA.PKG_UTILS' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored Check to ensure that the API is defined in the database and that the parameters match the signature of the API. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-6550" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception.

  • EXPORT/IMPORT SBO SCHEMA ERROR

    Hello,
    We have a client who is working with SAP BusinessOne version for HANA, with HANA PLATFORM rev. 69 and I need to export your database and import it to our development server .
    To backup/restore the database I have performed the following steps :
    1 - I have made ​​the export of a ' SCHEMA ' with "EXPORT "SBOXXX_ES"."*" AS BINARY INTO '/tmp/SBOXXX_ES' WITH REPLACE THREADS 10;".
    2 - I have compressed files in Linux using the command : tar- czvf .....
    3 - I've Unzipped the files to our local server.
    4 - Performing the ' IMPORT ' command gives me the following errors,I tried two ways to import :
    4.1 - IMPORT  "SBOGXXX_ES"."*" as binary from '/tmp/SBOXXX_ES' with replace threads 10 rename schema "SBOXXX_ES" to "SBOXXX_ES_2";
    Error mesage: SAP DBTech JDBC: [2]: general error: [Other schema]._SYS_SS_CE_1957622_RET not found in the import directory.
    4.2 - IMPORT "SBOXXX_ES"."*" as binary from '/tmp/SBOXXX_ES'
    with replace threads 10 NO DEPENDENCIES
    rename schema "SBOXXX_ES" to "SBOXXX_ES_2";
    Error mesage: SAP DBTech JDBC: [2048]: column store error: table import failed:  [30111] Binary import failed (could not execute create statement);invalid column view: ODLN: line 7 col 45 (at pos 506) at ptime/query/checker/check_cube.cc:259
    I guess when you export the " SCHEMA " exported la la " DEPENDENCIES ON" option and these are generating the first error when importing .
    If the error is of the DEPENDENCIES, in which DEPENDENCIES are stored files to edit , and remove all that is giving the error (SYS_SS_CE_1957622_RET ) .
    Thank you very much for your support .
    Adria.

    Hi Adria,
    I asked you to test the import on the system you exported from to determine if the problem is occurring because you are transporting the files from system 1 to system 2.  If it works on point of origin we should investigate why the transfer is corrupting the file.  I thought it would be ok because you are renaming the schema as part of the process.  I would not want to import @point of origin without the rename.
    Whenever some one asks me how to export a schema and import it with a different name I provide:
    export "SBODEMOGB"."*" as
    binary into '/home/SBODEMOGB' with replace threads 10;
    import "SBODEMOGB "."*" as
    binary from '/home/SBODEMOGB_901' with replace threads 10 rename schema "SBODEMOGB" to
    "SBODEMOGB_NEW";
    You are using the statement I would provide. 
    I cannot find an hints for the error reported (SYS_SS_CE_1957622_RET).  If you do not see anything more helpful in the trace file I would suggest opening a customer message.
    Best regards,
    Duncan

  • Replicate to a different schema using streams

    All,
    I'm performing replication using streams, I have read the doc and steps by steps notes on metalink getting the replication successfully.
    But now, I want to do the same but on differents schemas ie.
    source DB: Schema= A Table=test
    Destination DB: Schema= B Table=test
    On both databases the schemas are basically the same but with different names.
    What changes o additional steps I need to perform in order to complete the replication?
    Thanks in advance..!

    Here is the procedure
    1) Follow the instructions from the documentation to create the streams administrator user on both source and target.(e.g. steams_adm)
    2) Connect to the streams administrator user at the TARGET (10.2) database
    --Create a queue
    Begin
    Dbms_streams_adm.set_up_queue(
    queue_name => 'APPLY_Q',queue_table => 'APPLY_Q_QT');
    End;
    --Create rules for apply process
    begin
    dbms_rule_adm.create_rule(rule_name =>'APPLY_RULE',
    condition => ':dml.get_object_owner()=''<put your source schema owner>'' ');
    end;
    begin
    dbms_rule_adm.create_rule_set(rule_set_name => 'streams_adm.apply_ruleset',
    evaluation_context => 'SYS.STREAMS$_EVALUATION_CONTEXT');
    dbms_rule_adm.add_rule(rule_set_name => 'APPLY_RULESET',rule_name =>'APPLY_RULE');
    end;
    --Set the rule to rename the schema
    begin
    dbms_streams_adm.rename_schema(
    rule_name=>'APPLY_RULE',
    from_schema_name =>'<put the source schema>',
    to_schema_name => '<put the target schema>');
    end;
    --Create the apply
    begin
    dbms_apply_adm.create_apply(apply_name => 'APPLY_CHANGES',
    rule_set_name => 'APPLY_RULESET',
    queue_name => 'APPLY_Q',
    source_database => '<source database name>',
    apply_captured => true);
    end;
    BEGIN
    DBMS_APPLY_ADM.SET_PARAMETER(
    apply_name => 'APPLY_CHANGES',
    parameter => 'DISABLE_ON_ERROR',
    value => 'N' );
    END;
    --Start apply
    begin
    dbms_apply_adm.start_apply('APPLY_CHANGES');
    end;
    3) Connected as strmadmin on SOURCE (9.2) database:
    --Create a database link to the TARGET database connected as streams_adm. The name of the dblink must match the target database name since you have to set global_names=true in the init files of both databases
    --Create a queue
    Begin
    Dbms_streams_adm.set_up_queue(
    queue_name => 'CAPTURE_Q',queue_table => 'CAPTURE_Q_QT');
    End;
    --Create the rule and rulesets
    *** Here replace the schema owner and the list of tables you'd like to capture changes *** from
    begin
    dbms_rule_adm.create_rule(rule_name =>'FILTER_TABLES',
    condition => ':dml.get_object_owner()=''<put your schema owner>'' and :dml.get_object_name() in (''TAB1'',''TAB2'')');
    end;
    begin
    dbms_rule_adm.create_rule_set(rule_set_name => 'streams_adm.capture_ruleset',
    evaluation_context => 'SYS.STREAMS$_EVALUATION_CONTEXT');
    dbms_rule_adm.add_rule(rule_set_name => 'CAPTURE_RULESET',rule_name =>'FILTER_TABLES');
    end;
    --Prepare the schema for instantiation
    *** Replace the schema name with your schema name
    BEGIN
    DBMS_CAPTURE_ADM.PREPARE_SCHEMA_INSTANTIATION(
    schema_name => '<put your schema name here>');
    END;
    --Create propagation
    BEGIN
    DBMS_PROPAGATION_ADM.CREATE_PROPAGATION(
    propagation_name => 'streams_propagation',
    source_queue => 'streams_adm.capture_q',
    destination_queue => 'streams_adm.apply_q',
    destination_dblink => '<database link>',
    rule_set_name => 'streams_adm.capture_ruleset');
    END;
    --Create capture process
    BEGIN
    DBMS_CAPTURE_ADM.CREATE_CAPTURE(
    queue_name => 'streams_adm.capture_q',
    capture_name => 'capture_tables',
    rule_set_name => 'streams_adm.CAPTURE_RULESET',
    first_scn => NULL);
    END;
    --start capture
    begin
    dbms_capture_adm.start_capture('CAPTURE_TABLES');
    end;
    Let me know if you have any questions

  • Schema Names

    Dear OTN members,
    Is there a way to make the schema name appear on the GUI's connecting to that schema. I understand Oracle creates a schema by default for a user created in the Database. Is it possible to rename this schema for the GUI's look and feel. Please throw some light on this.
    Thanks,
    Vivek

    you cannot have a schema name different from the username.
    Apart from the semantic, an oracle schema = an oracle username.

  • How to stream one table twice (with different names) in another schema ?

    hello guys,
    i have to replicate one table (TAB_1) from one schema (SCH_1) on source database (DB_1) twice to schema (SCH_2) on target database (DB_2) with two different names (TAB_1 and TAB_1_SHORT). TAB_1_SHORT on target db should be a subset (eg. WHERE STATUS = 1) of TAB_1 !
    how to do ? can anyone help me ?
    i tried to realize that this way:
    1) creating 1 capture process with 1 table rule on source db (without any subset rules to capture all changes) for table TAB_1
    2) creating a propagation process without any rules
    3) creating 1 apply process with a table rule for table TAB_1 without any subset_rule but with schema transformation from SCH_1 to SCH_2 (DBMS_STREAMS_ADM.RENAME_SCHEMA) => this works correct !
    4) creating a subset_rule (WHERE STATUS = 1), a schema transformation from SCH_1 to SCH_2 (DBMS_STREAMS_ADM.RENAME_SCHEMA) and a tablename transformation from TAB_1 to TAB_1_SHORT (DBMS_STREAMS_ADM.RENAME_SCHEMA) for table TAB_1_SHORT => doesn`t work, no errors posted in dba_apply_error !
    in another try, i tried to transform the table- and the schemaname in the capture process, with the effect, that my first table TAB_1 wouldn`t be streamed again.
    i`m not sure, what is wrong. i think it must be possible to stream a table to two different targettables in the same schema on another db, isn`t it ?
    hopefully greetings
    Flo

    Hello
    Adding a normal table rule and also a subset rule would not work since the rule would be evaluated only once in the positive rule set. If the normal rule is evaluated first then the subset rule and rest of the rules would not be evaluated at all hence this would not work.
    This can be done using either of the following methods:
    Method 1:
         1. Use the declarative transformation on the capture/apply and rename the schema from SCH_1 to SCH_2.
         2. Now, on the apply site, set a DML Handler for SCH_2.TAB_1
         3. In DML Handler perform the following:
              a. get the column value for STATUS
              b. check if the value for STATUS=1, if yes then modify the object name to TAB_1_SHORT and execute the LCR.
              c. else do not modify the object name (leave it as it is, TAB_1) and execute the LCR.
    Method 2:
         1. Add a DML Handler for SCH_1.TAB_1
         2. In the DML Handler perform:
              a. use set_object_owner method of LCR$_ROW_RECORD to rename the owner to SCH_2
              b. get the column value for STATUS
              c. check if the value for STATUS=1, if yes then modify the object name to TAB_1_SHORT and execute the LCR.
              d. else do not modify the object name (leave it as it is, TAB_1) and execute the LCR.
    Please let me know if you need sample code.          
    Thanks,
    Rijesh

  • DB refresh on Netweaver 7.0 ABAP+JAVA system - Issue

    Dear Folks
    I am having an issue with starting the Java instance after system copy.
    This is the situation
    System QAS database was refreshed from system PRD.
    Both the systems are on NW 7.0 Ehp1 SP 18, in a HPUX/ORACLE environment.
    Our normal landscape is full of R3 systems so teh DBA's have been historically doing DB refresh by copying for teh Oracle fileystems and then renaming the schema and some post db refresh activities to get the DB in teh target system up and running. Pardon my terminologies I ma not a DBA. The abpove procedure has worked fine with R3 systems.
    But with the above mentioned Netweaver system ABAP instance is running fine after refresh while Java instance is not since SMSICM-> Goto-> HTTP Server -> DIsplay Data is showing
    HTTP Application Server Handler
    ABAP Server operational        = TRUE
    J2EE Server configured         = TRUE
    J2EE HTTP port                 =
    J2EE HTTPS port                =
    J2EE Server operational        = FALSE
    Default root access handler    = ABAP
    URL Prefix Table loaded        = TRUE
    There are no other dumps or errors in the system and teh startup logs do not show any error. I have looked up online and the System Copy Guide for 7.0 systems and I understand SAP recommends using sapinst. But I would like to know if there is a workaround to fix the j2ee instance.
    I have seen a few forumns where people have had similar issues but no solution.
    FYI, The the Instance_IDXXXXX in the SAP J2EE Engine- Config Tool in system QAS is that of PRD and there is no entry for the instance ID of the QAS system.
    I have tried changing all the entries that are pointing to PRD under Cluster_Data-> Instance.properties.IDXXXX to that of QAS and saved and restarted but no luck as the Instance_IDXXXXX of QAS does not show up in teh config Tool menu.
    All the properties files at teh OS level are pointing correctly to QAS, so I would liek to know if there is any way to change the config on eth DB level.
    Thanks in advance.
    sapkid

    Hi,
    When you go for ABAP+JAVA system refresh please always ose the JAVA export method .
    Take the JAVA export of the source system with the help of sapinst.Check the j2ee_admin and the ddic password of source system.
    then you need to get the offline backup of the Source system.
    then import it on the target system wth the help of sapinst and in the middle it shall promt you to restore from the backup of the source system.
    Always use this method as JAVA stores it file at file system level and in the database.So you need both the files .
    Thanks Rishi Abrol

Maybe you are looking for

  • Temporary invoice on sales order containing items with & without delivery

    Hi, I have a sales order which contains both items due to be billed on delivery and due to be billed without delivery. Could you please let me know how to create a temporary invoice on the basis of the order. The true/final invoice will work on the b

  • How to get value in BADI

    The internal table have values,but I can't read it.How to I get value from internal table in BADI?

  • Oracle 10g standard edition installation and problems with logon (help pls)

    I installed 10g standard edition, however I got the following two messages during installation: 1) The host IP address can not be determined 2) Missing or Invalid password ... Eventhough I unlocked all the passwords during install (tiger/scott, sys,

  • BSP - Web Dynpro - Interactive Forms by Adobe - Flex

    Hi, I am a student SAP from Belgium. I am currenty developping an application and I am using BSP's, Web Dynpro's, Interactive Forms and Flex. I have a good idea regarding to what the possibilities are of each User Interface, but I would like your opi

  • Unable to get cookies

    Hi ALl am trying to read cookies from a URL. I am always getting cookies array count as 0. Pls see code below: import java.io.FileOutputStream; import java.io.IOException; import org.apache.commons.httpclient.*; import org.apache.commons.httpclient.H