Dropping schema in production...

Hi
We are implementing a block point in our production database.Can I drop and recreate the schema (owner) instead of dropping the schema objects incase there is a backout and the database/schema has to be restored. I will be taking a full DB export before the activity starts.I want to be 100% sure since this is production...Thanks!

Hi
Again , i will remind you don't depends on Oracle exp/imp or datapump because this is not the physical backup . I suggest you to take backup using Rman full backup . Since you are performing it on production and in case something wrong happen then you can recover to your previous state .
Once you have rman backup then extract the ddl (say roles,privileges, user ) ,and then you can drop the schemas and re-create it after running the ddl's . Check the link to extract the DDL's
http://neeraj-dba.blogspot.in/2011/12/dbmsmetadata-package-to-extract-all-ddl.html
Hope this may help you
Good Luck
--neeraj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Invalid database schema for product hyperion reporting and analysis

    I tried to re-configure the BI core service to a new database
    But I get the message "invalid database schema for product hyperion reporting and analysis"
    The database is a restore of a production backup on a different MSSQL2005 server.
    I can not believe its really a sql schema matter.
    Does anyone know whats wrong?

    You cannot restore a BI+ database from backup...It is somewehere in the doc. There a re lots of references to the old server and config in the BI+ tables and you d need to edit/remove some files on the file server too. There is a doc available to do that but its far from simple.
    Best way is to export the content of your repository, configure a new DB and then reimport the content.
    If you re really stuck, drop me an email and ill send you that doc. I think ive still got it.
    Seb
    www.taysols.com.au
    [email protected]

  • How to handle refreshing TEST schema with PRODUCTION schema ?

    - we have database 10g ( standard edition), database name : ABC
    - Schema name: ABC.PRODUCTION (which is our production schema)
    - Schema name: ABC.TEST (which is our testing schema, where developers work)
    Both the production & Test schemas exist in the same database.
    Now once a week I wanted to refresh TEST schema with PRODUCTION data
    Here is what I have been doing all these years:
    => Take a logical backup (EXPDP) of PRODUCTION schema (prod.dmp)
    => Drop user TEST cascade ( i don't need a backup of this TEST schema)
    => Create user TEST
    => Import PROD.DMP data into TEST schema
    All the above 4 steps are being done manually.
    Questions:
    ======
    1. Is there any easier way of doing the above steps using some tool ?
    2. Does Oracle enterprise manager which comes free with database installation (http://localhost:118/em)
    has any utility or tool to do this job ?
    3. I want everything to be refreshed (all database objects including data) ?
    Thanks
    John P
    Edited by: johnpau2013 on Feb 23, 2011 4:32 AM

    This is crazy. One inadvertent typo and you'll overwrite your Production schema. Plus, what happens if a developer 'tests' against the test schema and slows the Production database to a crawl.
    I presume you know all about this, though and can't make the case to management. I hope it's not a business-critical Production database!
    Anyway, your method is decent. I would advise against doing it automatically, to be honest, especially when your system is so precariously set up. But if you exist, you could use encapsulate all the steps into a script and use crontab to automate the process. I, personally, wouldn't use DBMS_SCHEDULER as you have to be careful with priorities and workload sometimes (at least in my experience) and you might end up having your export/import clash with other jobs in the system if you don't pay attention.
    Here are the steps I would use:
    Create a 'create user' script for the test schema based on dynamic SQL. That way you can be sure you have all the grants necessary for the user, in case things change.
    Drop the test user (use EXTRA caution and be defensive when coding this part!)
    Export the schema using FLASHBACK_SCN to ensure you have a consistent export
    Run your 'create user' script to create the test user
    Import the schema with a REMAP_SCHEMA option (use EXTREME caution with this!!!!)
    Compile invalid objects
    Compare objects and exclude any recycle_bin objects. Send an email alert if the object counts are different.
    Compare invalid objects. Any objects which aren't invalid in Production should be flagged up if they're invalid in test.
    Again, it's absolute insanity to have a test schema in a Production database. You absolutely must insist on addressing that with management.
    Mark

  • Numbering schema in Product Hierarchy reg

    Hello Experts,
    We are implementing CRM 7.0, as part of the initial load we had downloaded DNL_CUST_PROD1 from ECC. But after replication we came to know that the numbering schema for Product Hierarchy is not 5,5,8 but changed to something else. When I tried doing the changes to numbering scheme, it is giving some error.
    We havenu2019t created any Products or any master or transactional data.
    Can you please help me in understanding how to change the numbering scheme and re-do the intial load.
    Thank you.
    KK

    you missed to save it .
    Dont maintain node 1 , 2 and 3 in one go.
    Maintain your 1s then save, maintain your 2s then save, then maintain your 3rd level.

  • If I drop schemas will stats still be availible in the database

    Hi,
    I'm creating a duplicate of a database and was thinking of doing the following:
    1. exp data to file and move it over the network (there is a lot of long data in different schemas)
    2. imp data new dublicated database
    3. gather stats
    4. drop schemas
    5. recreate schemas
    6. load fresh data from a new export
    My question:
    Do we need to gather statistics again or will statistics stay in the dictionary allthough I drop the schemas?
    Regards
    933746

    sybrand_b wrote:
    If you use impdp network_link=
    you can import in the target database directly instead of this cumbersome procedure.
    And, of course the statistics are gone when you drop a schema.
    Sybrand Bakker
    Senior Oracle DBAHi,
    We use networklink as much as possible but it dosn't support long data.
    So this time we export to files and move it.
    Thanks for your reply

  • Should i drop schema or truncate tables before importing?

    I have exported a dump of the whole schema form oracle database. I need to import this to another database with a different schema name but same tables. The only thing i am doing is this to bring data consistent with the other database.
    Now Do i need to drop schema or do anything like that to avoid and redundancy or i can just go ahead and do the import? Please let me know how to do it. I would prefer not deleted any tables but truncate all the data if needed from about all 200 tables.
    Thanks

    For the places in your application where a Sequence is used to insert or set values in some tables, note that the sequence's current value may have been incremented if it has been used since the last import. If your truncate and re-import the tables, the tables may have the older (lower) values but the current sequence may be higher.
    You would then have to "reset" the sequence best by dropping and recreating it.

  • Error: Cannot drop schema because it is being referenced by object

    My database has a schema with the same name as a user (let's call it 'username'). This schema was not explicitly created. I want to drop the User 'username' but I have to drop the schema 'username' first; However, when I tried to do that I got the message...
    "Cannot drop schema 'username' because it is being referenced by object 'vw_Inventory'
    There is a view named 'vw_Inventory' but I don't see where it's referencing this schema, or any schema for that matter. Why would I get this error and how do I resolve it so I can drop the Schema and User?
    Darrell H Burns

    If a Schema has some objects in it, then you cannot drop that Schema until you remove all the objects out of it. You can change the schema owner
    to another database principal and drop the user like,
    Alter Authorization ON Schema::username TO DBO; Drop User username;
    other option would be
    Transfer the username schema objects to a different schema and drop username schema and user like.
    Alter Schema DBO Transfer Username.[OBEJECTNAME] ;
    --need to repeat this until you transfer all objects under this schema
    Drop Schema username;
    Drop User username;
    Regards,
    Praveen D'sa
    MCITP - Database Administrator - 2008
    sqlerrors

  • Any DBA views storing history of Dropped schemas?

    DB Version: 10gR2 and higher
    username, created columns in DBA_USERS view display info about the schemaS which currently exist in the DB.
    Is there a Dictionary view which stores the history of Dropped schemas?

    user872043 wrote:
    DB Version: 10gR2 and higher
    username, created columns in DBA_USERS view display info about the schemaS which currently exist in the DB.
    Is there a Dictionary view which stores the history of Dropped schemas?No

  • Drop-schema

    I am new to oracle.could some one help me how to drop an oracle schema?
    This is what i have done
    Connected to the oracle instance.Then from googling i have DROP DATABASE command.
    I done this got error
    ORA-01586: database must be mounted EXCLUSIVE and not open for this operation
    while doing shutdown says insufficient privileges.
    i done grant all privileges to user
    then also i could not drop the schema
    Give me Suggestions please
    Thanks

    Mario Alcaide wrote:
    drop tablespace xxx INCLUDING CONTENTS AND DATAFILES;
    DROP USER XXX CASCADE;my previous post I was mentioned ," That particular schema also dropped", No the schema doesnot droped, the schema object will drop.
    C:\Users\mazar>set oracle_sid=azar
    C:\Users\mazar>sqlplus
    SQL*Plus: Release 11.2.0.1.0 Production on Tue May 11 12:34:23 2010
    Copyright (c) 1982, 2010, Oracle. All rights reserved.
    Enter user-name: sys/sys@azar as sysdba
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> create tablespace testdb datafile 'd:\azar\testdb01.dbf' size 10m;
    Tablespace created.
    SQL> create user testdrive identified by testdrive default tablespace testdb;
    User created.
    SQL> grant connect, resource to testdrive;
    Grant succeeded.
    SQL> create user testexample identified by testexample default tablespace testdb
    User created.
    SQL> grant connect, resource to testexample;
    Grant succeeded.
    SQL> commit;
    Commit complete.
    SQL> drop tablespace testdb including contents and datafiles;
    Tablespace dropped.
    SQL> select username,default_tablespace from dba_users where username='TESTDRIVE';
    USERNAME DEFAULT_TABLESPACE
    TESTDRIVE TESTDB
    SQL> SELECT TABLESPACE_NAME FROM DBA_DATA_FILES WHERE TABLESPACE_NAME='TESTDB';
    no rows selected
    SQL> COMMIT;
    Commit complete.
    SQL> conn testdrive/testdrive;
    Connected.
    SQL> select * from tab;
    no rows selected
    SQL> create table xxx(empno number);
    create table xxx(empno number)
    ERROR at line 1:
    ORA-00959: tablespace 'TESTDB' does not exist
    SQL> conn / as sysdba
    Connected.
    SQL> alter user testdrive default tablespace users;
    User altered.
    SQL> conn testdrive/testdrive@azar;
    Connected.
    SQL> create table xxx(empno number);
    Table created.
    SQL> conn / as sysdba
    Connected.
    SQL> create tablespace testdb datafile 'd:\azar\testdb01.dbf' size 10m;
    Tablespace created.
    SQL> alter user testexample default tablespace testdb;
    User altered.
    SQL> conn testexample/testexample;
    Connected.
    SQL> create table test(empno number);
    Table created.
    SQL> insert into test values('001');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> conn / as sysdba
    Connected.
    SQL> drop tablespace testdb including contents and datafiles;
    Tablespace dropped.
    SQL> commit;
    Commit complete.
    SQL> conn testexample/testexample;
    Connected.
    SQL> select * from test;
    select * from test
    ERROR at line 1:
    ORA-00942: table or view does not exist
    So you will have lose data...

  • Problem with Queue Table while dropping schema

    Hi,
    I want to DROP a schema, but it gives the following error while trying to drop it:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-24005: must use DBMS_AQADM.DROP_QUEUE_TABLE to drop queue tables
    From TOAD, I found that no queue or queue_table exists in the database presently.
    I'm using 10.2.0.2 RAC database.
    Can anyone help me to drop the schema?
    Thanks in advance..
    Regards,
    Anjan

    I have followed the doc 203225.1..
    Now getting the following error:
    ORA-00081: address range [0x60000000000A89A0, 0x60000000000A89A4) is not readable
    ORA-00600: internal error code, arguments: [kzdukl3], [24], [], [], [], [], [], []

  • How to protect Developer know Password of Schema in Production system?

    Hi, I'm newbies about Database Securities.
    My new job have environment about Client/Server by Oracle10gR2 working with Delphi Application.
    I found developer fixed schmea user/password on program code for connect to DB.
    So, Now password of Production Schema is same with Development Schema
    and Developer can access to Production environment.
    How to solve this situaltion?, I think maybe ever have best pratice for this.
    I think about keep password on other location and Application get to use for connect DB.
    Howerver, This way developer can coding for print out password to see it.
    Or maybe DBA must change fix password in Programmer coding before migrate to production (It's no good). To do that, DBA can change password of Production and Developerment to differrence.
    Now we protect this by trigger to fix about protect Developer connect DB by Tools (by osuser, machine and program filed in v$session). I know this can leak by change osuser, change exec name of Tools.
    Previouse job use Oracle DB with E-Business suite. It's no this problem cause of It's have interface to manage connection between App & DB.
    Thank you for every advice.
    Best Regards,

    Hi, I'm newbies about Database Securities.
    My new job have environment about Client/Server by Oracle10gR2 working with Delphi Application.
    I found developer fixed schmea user/password on program code for connect to DB.
    So, Now password of Production Schema is same with Development Schema
    and Developer can access to Production environment.
    How to solve this situaltion?, I think maybe ever have best pratice for this.
    I think about keep password on other location and Application get to use for connect DB.
    Howerver, This way developer can coding for print out password to see it.
    Or maybe DBA must change fix password in Programmer coding before migrate to production (It's no good). To do that, DBA can change password of Production and Developerment to differrence.
    Now we protect this by trigger to fix about protect Developer connect DB by Tools (by osuser, machine and program filed in v$session). I know this can leak by change osuser, change exec name of Tools.
    Previouse job use Oracle DB with E-Business suite. It's no this problem cause of It's have interface to manage connection between App & DB.
    Thank you for every advice.
    Best Regards,

  • ERRORS IN PORTAL WHEN DROPPING SCHEMA OWNER

    I ran a PDK demo script and added 2 db packages to a schema in the portal repository. After running theses porlets, I decided to attempt to create my own. Prior to adding to the schema I wanted to clean out the old db packages. I thought the easy way would be to drop the user schema and recreate it clean. I attempted to drop the user schema by entering portal as orcladmin, clicking on navigator, then db objects, selected the schema I wanted to drop and it sat there for a few minutes and returned errors. I then opened SQLplus and dropped the user cascade. I noticed that the provider is still in the providers tab list, but can't delete it. I then attempted to re-create the schema using same name and I get additional errors in portal (see upload file: createrror2.jpg. I need to 1) drop the old provider and 2) recreate a new schema and provider that I will use for my portal/portlets.
    Any suggestions.

    I ran a PDK demo script and added 2 db packages to a schema in the portal repository. After running theses porlets, I decided to attempt to create my own. Prior to adding to the schema I wanted to clean out the old db packages. I thought the easy way would be to drop the user schema and recreate it clean. I attempted to drop the user schema by entering portal as orcladmin, clicking on navigator, then db objects, selected the schema I wanted to drop and it sat there for a few minutes and returned errors. I then opened SQLplus and dropped the user cascade. I noticed that the provider is still in the providers tab list, but can't delete it. I then attempted to re-create the schema using same name and I get additional errors in portal (see upload file: createrror2.jpg. I need to 1) drop the old provider and 2) recreate a new schema and provider that I will use for my portal/portlets.
    Any suggestions.

  • Problem after uploading user defined characterstic schema in product catalo

    Hi friends,
    We were using SRM 5.0 and CCM 2.0, we were uploaded Master catalog through .CSV file, Product catalog schema through .XML and user defined characteristic schema through .XML file   separately. System given message catalog updated successfully. But when I observed in product catalog user defined characteristics are removed from the product catalog the content of these fields is also wiped out from the items. Once the catalog was in this state, I mapped it to the Master Catalog and all the user defined characteristics show up in error. What could be the cause?? can any body Help  (Urgent)
    Thanks in advance
    Srinivas

    Hi
    <u>Please go through the following SAP OSS Note / link -></u>
    Note 1024002 - Error introduced by CCM SP07
    Re: Unable to Edit the Charateristic?
    Do let me know.
    Regards
    - Atul

  • Dropping schema and associated objects

    I have just had a request to drop a particular schema with the associated objects...how do i go about it

    Hi,
    Its simple, use the follow sintaxe:
    DROP USER <schema> CASCADE;
    I hope help you!
    Jonathan Ferreira - Brazil
    http://www.ebs11i.com.br

  • Dropping Schema Question

    Hi,
    DROP USER X CASCADE;
    Does this also purge all teh foreign key constraints that were createdin "X" schema?
    Thank you for your time and help.

    ssk1974 wrote:
    Does this also purge all teh foreign key constraints that were createdin "X" schema?All schema objects are dropped and space occupied by schema physical objects is released back to free space pool. Nothing goes to recycle bin.
    SY.

Maybe you are looking for

  • How to configure the date format in toolbar of ADF Calendar

    Hi, In the weekly view of the ADF Calendar, the date on the toolbar of the calendar component is something like this "May 1,2011 - May 7,2011". Is there a way to configure this. What changes need to be done to show this as "1 May 2011 - 7 May 2011".

  • How do I clone my hard drive prior to a OSX update?

    Greetings, I'm going to update my Macbook OSX software to Snow Leopard and from everything I've read it's a good idea to clone my existing hard drive in case something goes amiss and I need to use the old system again. How do I go about doing this? M

  • No .app bundles found

    What does "No .app bundles found" mean? I was using Application Loader to bundle my app for distribution to the App Store and I received this error message.

  • Upgrade from ECC 5.00 to ECC 6.00

    We are planning upgradation from ECC 5.00 to ECC 6.00. What will be the role of FICO consultant in detail.

  • Non-blocking file selector?

    Running W98/Labview 5.1.1, I have a DAQ application that collects data and streams it to file. For this I would like to be able to change output files without breaking the DAQ loop. For some reason, however the DAQ loop occurence will time out the mo