Move Schema to Prod

Hi All,
I am not a DBA, but recently I was assigned these duties.
My question is that we have a schema in Dev, Its has been tested now I have to move this to Prod.
I have created some scripts using Toad (database\export\tables, views etc).
Can use these scripts for import also?
Is there any other way to move a schema from Dev to Prod or visa verse?
There is one more questions, using toad I can view DBlinks but I cannot view them in Dev. I get this error ORA-00942: table or view does not exist.
any suggestion welcome
Habeeb

Hi Everyone,
I am back and I have created a new Schema...
But I did a lot of mistakes, I created the sequences, procedures and functions logged in as SYSTEM.
the sequences I dropped them as they all had the schema name used in the name of sequence.
example: if schema name "HABTEST" then
seq name "SEQ_SCANLOG_HABTEST"
that's done.
But for Procedure and Fuction we had the same rule so I logged in as 'SYSTEM'
and droped all procedure's and function with name like 'HABTEST'.
But now there are some that don't have the schema name in the procedure name...
example:
SQL> SELECT owner, object_name, object_Type
2 from all_objects
3 where object_name = upper('batche_rcv_today');
OWNER OBJECT_NAME OBJECT_TYPE
SYSTEM BATCHES_RCVD_TODAY FUNCTION
HABTEST BATCHES_RCVD_TODAY FUNCTION
Now in this case if I execute the command
drop procedure BATCHES_RCVD_TODAY will it drop the only procedure in the system OWNER as I am logged in as SYSTEM, Technically It should and the other in HABTEST should remain intact...
I am right..??
Habeeb

Similar Messages

  • Move schema to a diff.tablespace

    Dear all,
    How can I move a particular shcema objects or the complete schema from his default tablespace to other tablespace ?
    Kai

    Kai,
    Here are some ways you can move schema from its default tablespace to other tablespace.
    Using anonymous pl/sql block or sql script;
    DECLARE
       CURSOR mcur
       IS
          SELECT   table_name FROM user_tables;
       v_sql                        VARCHAR2 (100);
       c_tablespace_name CONSTANT   VARCHAR2 (30) := 'MY_NEW_TS_NAME';
    BEGIN
       FOR x IN mcur
       LOOP
          v_sql :=
                'alter table '
             || x.table_name
             || ' move tablespace '
             || c_tablespace_name;
          DBMS_OUTPUT.put_line (v_sql);
       -- execute immediate v_sql :
       END LOOP;
    END;*2nd Method*;
    Using conventional export and import
    exp username/password file=myuserexport.dmp log=myuserexport.log
    Before importing
    1. drop all the objects from user (except roles and db-link).
    2. Setup a new default tablespace and revoke unlimited tablespace from the user and set quota 0 on old tablespace.
    3. You can also drop entire user and recreate one with new default tablespace
    imp username/password file=myuserexport.dmp log=myuserexport.log*3rd Method: (if using 10g), you can make use of datapump (remap tablespace)*
    http://www.oracle-base.com/articles/10g/OracleDataPump10g.php
    Regards
    Edited by: OrionNet on Mar 11, 2009 12:27 AM

  • Move schema to another tablespace

    I want to move one schema and all objects own by particular schema to it's own tablespace (new_tablespace).
    will command provided below move all existing schema objects to new tablespace or just new objects?
    alter user default tablespace new_tablespace;

    mishomor wrote:
    I know it's long time since I posted this but I finally had a change to implement it.
    Thing is, if I execute command on one-by-one basis it works fine, but if I try block you guys posted it doesn't work. It ends with error:
    Error starting at line 1 in command:
    begin
    for tbl in (select table_name from all_tables where owner = 'FLOWS_020000') loop
    execute immediate 'alter table ' || tbl.table_name || ' move tablespace flows';are you executing this as the owner of 'tbl_name'?
    end loop;
    end;
    Error report:
    ORA-00942: table or view does not exist
    ORA-06512: at line 3
    00942. 00000 - "table or view does not exist"
    Cause:
    Action:
    begin
    for tbl in (select table_name from all_tables where owner = 'FLOWS_020000') loop
    execute immediate 'alter table ' || tbl.table_name || ' move tablespace flows';
    end loop;
    end;
    output of
    select table_name from all_tables where owner = 'FLOWS_020000';
    brings bunch of tables!!
    If I just run ...
    alter table FLOWS_020000.whatever_table move tablespace flows;
    alter index FLOWS_020000.whatever_index rebuild tablespace flows;
    ... it works fine.
    Because here you specifically qualified the table name with the owner. In your procedure above, you did not do that, so 'whatever_table' was assumed to be owned by whoever was executing the procedure.
    I am using SqlDeveloper 1.5.4

  • Move schema to anothe tablespace

    Hi
    During installation of one Oracle application , this has created "WIRELESS" schema in system tablespace. "WIRELESS" schema consis of table/index/LOB Objects. Now I want to migrate entire wireless schema to xx_tablespace. kindly suggest me the ways to do this.
    Thanks
    Krishna

    Have you read the documentation? Every single option for expdp and impdp is documented http://docs.oracle.com/cd/E11882_01/server.112/e22490/toc.htm
    As Osama suggested:
    a). Create a new schema with the default tablespace set to the tablespace to where you want to move the objects
    b). expdp the old schema
    c). impdp the using fromuser/touser to put the objects into the new schema
    d). Drop the old schema
    e). Rename the new schema to the old schema
    Another alternative that wouldn't need expdp/impdp and a temporary new schema would be to use alter table move and alter index rebuild to move the tables/indexes directly. If you have partitioned tables, you'd need to account for that. You can do the same in online mode using DBMS_REDEFINITION
    Which option you pick probably depends on a few things:
    a). Downtime requirements - DBMS_REDEFNITION can possibly do the reorg with zero downtime.
    b). Size of objects in the schema and whether you have enough space for the extra expdp file
    John

  • Storage Location is not found in Goods Movement Screen in Prod.Order CNF.

    Hi Experts,
    I have create a production order with Auto GI &GR.When i going to confirm it,in Good Movement Screen  storage location entry field is not found thats why i can't enter Sto.Location.
    Can any Expert tell me the solution for this issue?
    With regards.
    Prashant

    Dear,
    In the material master, MRP2 view maintain Storage loc for material.
    Please refer this thread as a reference,
    Storage location not found in MIGO for 101 movement type
    Regards,
    R.Brahmankar

  • 11g schema move from warehouse - compress on the fly...

    friends and oracle gurus,
    DB: Oracle 11.2
    OS: Linux
    Schema size: 25G
    I am trying to figure out best strategy to MOVE schema from warehouse to different database (11g) in compressed format on the fly... don't want to export first then compress and move files which is older way...
    basically data should always be compressed during expdp n impdp...
    so far I can think of below....
    1. Lock user on warehouse
    2. Expdp user with expdp parameter compress=all
    3. Import user
    4. drop user from warehouse
    I think it's as simple as this but...
    Just wondering am I missing any key element for compress part?
    Do we need special oracle license to use compress option?
    any other tips or steps??

    khallas301 wrote:
    friends and oracle gurus,
    DB: Oracle 11.2
    OS: Linux
    Schema size: 25G
    I am trying to figure out best strategy to MOVE schema from warehouse to different database (11g) in compressed format on the fly... don't want to export first then compress and move files which is older way...
    basically data should always be compressed during expdp n impdp...
    so far I can think of below....
    1. Lock user on warehouse
    2. Expdp user with expdp parameter compress=all
    3. Import user
    4. drop user from warehouse
    I think it's as simple as this but...
    Just wondering am I missing any key element for compress part?
    Do we need special oracle license to use compress option?
    any other tips or steps??I think compress=all will require advanced compression option (I am not licensing expert but wouldn't hurt to check) , but then again, why don't you want to compress after dump is generated? 25gb is peanuts, and i bet out of it most will be index segments, which wont occupy more than few bytes in the dumpfile (metadata compression is possible).
    Or as some might suggest, use network link and be done with it.
    Raj

  • Transporting Developmenrts from PI DEV to PI Prod

    Hi Experts,
                        in my PI server, when ever I do a development in the ABAP stack, I release and transport the request to Basis. And In case of developments in Java stack, I use Change Management Service - Transport Studio   to move it.
    Apart from these processes, what other practices / processes are done in the industry to move developments to Prod..
    Regards,
    Arnab

    Hi,
    What is CTS+ and why is is introduced:
    The Change and Transport System (CTS) is a tool that helps you to organize development projects in the ABAP Workbench and in Customizing, and then transport the changes between the SAP Systems in your system landscape.
    The XI use case for CTS+ introduces a new transport handling mechanism that offers tighter integration for the transport of ABAP, Java, and Integration Builder objects (Integration Repository and Integration Directory) using the Change and Transport System (BC-CTS) functionality.
    As your XI system requires both the ABAP and the Java stack of the SAP NetWeaver Application Server, the following transport tools are available after installation:
    u2022
    The ABAP transport environment (BC-CTS)
    u2022
    The file export and import mechanisms or CMS integration to transport Repository or Directory objects in your transport landscape
    In addition, you might also have to transport Java development objects by using the SAP NetWeaver Development Infrastructure itself.
    The enhancements to CTS in combination with the SAP Solution Manager Change Request Management (ChaRM) address the following issues:
    u2022
    Synchronized transports for mixed systems (ABAP & Java)
    u2022
    A unified application for mixed system landscapes
    u2022
    Tracking of non-ABAP transports including Change Request Management
    For your XI landscapes there will be one central transport environment with CTS+ where you can manage all XI-relevant transport objects from a single entry point.
    This how-to guide describes the configuration settings you must make in the CTS+ system and XI systems. The functionality must be set up according to the release version of the integrated XI system. The two configurations will be described separately:
    u2022
    Configuration setup for releases prior to SAP NetWeaver 7.0 SPS12 (also for SAP NetWeaver 2004 SPS14 and higher).
    u2022
    Configuration setup for release SAP NetWeaver 7.0 SPS12 and higher.
    Refer the link for CTS+ step by step method of transport:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/80bbbd55-5004-2a10-f181-8bb096923cb6
    http://help.sap.com/saphelp_nw04/helpdata/en/03/dcb6b6048711d3b42a00609419f767/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/90d3b550-b6fb-2910-0fa5-ece5d61fb9c3
    Regards,
    Phani

  • Schema Copy/replicate in Same database....

    Hello - I have a requirement to copy a schema in same database - with different name. What will be my best options other than export/import.
    Schema name: PROD
    Schema Size: 120GB
    Tablespace: All data of PROD is in PROD_D tablespace only
    New Schema name will be: NPROD
    Thanks in advance

    hi,
    If you're worried about the dump size, you may generate it and get a 20Gb size file...
    follow instructions from link Compressed dump
    ... if your schema has only tables, you may use CTAS
    Regards
    Ignacio
    http://oracledisect.blogspot.com

  • Error while doing schema level import using datapump

    Hi I get the following ierrors while importing a schema from prod to dev database... can anyone help ,thanks!
    impdp system DIRECTORY=DATA_PUMP_DIR DUMPFILE=abcdprod.DMP LOGFILE=abcdprod.log REMAP_SCHEMA=abcdprod:abcddev
    ORA-39002: invalid operation
    ORA-31694: master table "SYSTEM"."SYS_IMPORT_FULL_01" failed to load/unload
    ORA-31644: unable to position to block number 170452 in dump file "/ots/oracle/echo/wxyz/datapump/abcdprod.DMP

    877410 wrote:
    Hi I get the following ierrors while importing a schema from prod to dev database... can anyone help ,thanks!
    impdp system DIRECTORY=DATA_PUMP_DIR DUMPFILE=abcdprod.DMP LOGFILE=abcdprod.log REMAP_SCHEMA=abcdprod:abcddev
    ORA-39002: invalid operation
    ORA-31694: master table "SYSTEM"."SYS_IMPORT_FULL_01" failed to load/unload
    ORA-31644: unable to position to block number 170452 in dump file "/ots/oracle/echo/wxyz/datapump/abcdprod.DMPpost complete command line for the expdp that made the abcdprod.DMP file

  • How to upgrade AND move between platforms with different Endians...?

    Hi, all,
    I have two databases - one of 500Gb and one of 50Gb - that are currently running on 10.2.0.4 on AIX 64-bit. They are Production systems.
    I have to move them to a brand new Linux (RHEL 5.6 - 64-bit) server that will be running 11.2.0.2.
    For test, I'm OK with this being done with Data Pump. But for the eventual move to 'New Prod', this will result in hours' worth of downtime and it's a business-critical system, so I'm trying to mitigate that as much as I can.
    I was, naively, hoping to use RMAN to both move the databases from one box to the other, but also to upgrade them. I figure I would do the following (as per Metalink 369644.1) as I have a Recovery Catalog, etc, etc:
    Install the binaries on the New Prod server
    Connect to the RCAT and restore the database and recovery to a PiT
    Manually upgrade the database by putting the DB into STARTUP UPGRADE and running the catupgrd.sql
    Unfortunately, I didn't realise the Endian was different between AIX and RHEL (as per 1079563.1). Oops.
    It doesn't look like I'll be able to use Transportable Tablespaces (as per 243304.1) either without first having to migrate the data across as a 10g DB and then upgrading.
    So my options appear to be:
    a) Data Pump and suck the outage up
    b) Move the data using Transportable Tablespaces to 10.2.0.4 and then upgrade to 11.2.0.2.
    Are there any other options? I have hopes that a logical standby would work in this instance a la rolling upgrade, but suspect that the different O/S AND the different Endian would scupper that idea...
    Mark

    Perhaps, I have more experience using concurrent exports/imports using the traditional exp/imp utility than using the parallel option on expdp/impdp. One thing you can do with exp/imp that you cannot do with expdp/impdp is export into a named pipe, start a remove copy of the named pipe to the new server, and then start importing from the named pipe on the new server so that you are importing while still exporting the same objects. We use tables= exports when we did this back when the tables= parameter could only handle 99 tables. We had a separate export for every large table and then a set of exports for 99 tables for each of the other tasks ran 6 to 12 concurrent processes.
    One thing to look at is historic data. Potentially some tables can be moved in advance of the majority of the application objects and replaced with synonym to remote objects.
    Truely static tables could also potentially be moved in advance even if only a day or two before to reduce the number of objects to be moved.
    Build the new database in noarchive log mode to save some processing and switch it over and immediately back it up when you migrate.
    And Yes, if the two platforms appear in the view name I gave you then you can use transportable tablespaces with the rman conversion step. Instructions for using rman to do the conversion are in the rman manual.
    HTH -- Mark D Powell --

  • Comparing schema using OEM 10g

    Hi,
    IS there any way to compare schema from 2 different schema for Prod and test environments using OEM 10g.
    I have a comparison script which will work for mr but the report generated is not easily readeble.
    Please point out the steps if there is any option to do so in OEM 10g. My database version is 9i.
    Thanks
    Anky

    You can use Oracle Enterprise Manager Grid Control or SQL Developer, in either case you need to have the change management pack licensed other then that you are looking at 3rd party tools such as Toad, older version of OEM or custom scripts.
    You can try some of these tools which include scripts, etc. as these may also be of help to you.
    http://dgielis.blogspot.com/2006/01/compare-2-oracle-schemas.html
    Mike M.

  • Oracle      user   schema

    Hi ,
    Is it true that all users ex:scott etc. are derived
    from a schema called prod in oracle database.
    It will be great help if somebody replies.
    Regards
    Manoranjan Dash
    software professional
    email : [email protected]

    There is no schema in Oracle by that name atleast on UNIX!
    just my 2 cents :)
    G

  • Planning 9.3 Applciation migration from test to prod

    Hi Guys,
    I wnated to migrate my planning applciation from Test to Production instance,
    In both the instances I have Oracle 10g as a repository for my applications.
    Please send me the steps to Migrate the same.
    My Test instance has one Planning applciation "PlanApp"
    In Production I just installed the Planning, I ahve not created any applicaion yet, but wanted to copy from my test instance.
    Thanks

    Hi,
    This topic has been covered quite a few times now on this forum, a bit of searching will give you all the answers you need but in summary :-
    Create a new planning app on production
    Register with shared services.
    Make it is the same admin name account betwen test and prod.
    Go into the oracle schema on prod for your app, extract the SID value from the HSP_USERS table where the user_id = 50001
    Stop Planning on prod
    Take an export of the planning app schema on Test
    Import the schema over the top of the schema on Prod
    Update the HSP_USERS table with the stored SID value on prod.
    Restart Planning.
    Cheers
    John

  • Move Analysis from test OBIEE server to production

    Hi all,
    how do I move Analysis from test OBIEE server to production without re-creating it again from the beginning?

    Check this link
    http://www.rittmanmead.com/2011/02/obiee-11g-migrations/
    Look at Catalog manager part.
    Navigate to the specific folder/report using Catalog Manger and then select the report(s) and then File Menu archive and specify the folder to save the archive
    Move them to Prod box and the Open Catalog Manger and navigate to specific folder and File menu Unarchive select the path for file
    http://docs.oracle.com/cd/E23943_01/bi.1111/e10541/prescatadmin.htm#i1044262
    If helps mark
    Edited by: Srini VEERAVALLI on Feb 19, 2013 12:18 PM

  • Splitting objects of a schema into 2 tablespaces

    Hi is it possible in Oracle database to split a schema objects into 2 tablespaces (or more)?
    I am trying to export and then import a schema to another machine but getting a : tablespace APEX_XXXXXX does not exist error. About 4 tables and respective constraints chucked this error while everything else got imported successfully.
    I have granted quota unlimited on the tablespace when I created user.
    I didnt' think it was possible but can't see why it would look for that APEX_xxxx tablespace for those particular tables. Exporting gave no errors btw.
    Using Oracle Database 11G R2.

    Thanks for your replies.
    Basically I am going to move objects from SYSTEM tablespace to a designated one called APEX_XXXX (later on). But trying to import into a local machine before I get into that.
    Now looks like few of them already exist in APEX_XXXXX, so I need to move the rest across. I prefer to use REMAP_TABLESPACE option of Data Pump as Oracle docs recommend it as a cleaner way to move schema & objects from A to B.
    However, would it have any implications if some tables already exists in APEX_XXXX tablespace?
    I am planning to do something like this
    impdb system/system schemas=lsprod REMAP_TABLESPACE=SYSTEM:APEX_XXXX logfile=export.logThank you.
    here is the first 10 lines of the original import.
    Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    Export file created by EXPORT:V11.02.00 via conventional path
    Warning: the objects were exported by LSPROD, not by you
    import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    import server uses AL32UTF8 character set (possible charset conversion)
    export client uses US7ASCII character set (possible charset conversion)

Maybe you are looking for

  • Slow To Bring Up Print Screen

    I have Adobe Reader 9.0 and Business Tools 4.0. In both programs, when I click print (in each case - clicking on the print icon or ctrl-p or clicking the menu selection for print), it takes about 45 seconds from the time the command to print is given

  • How does a 1.6-gig clip become an 11-gig clip when exported from FCP?

    I captured some video and had to do it in two sessions because my camera kept dropping frames. My first clip was 600 megs, my second was 1 gig. I put them into the timeline and synced them up at the break spot. I wanted to have just one file to work

  • How to modify my linux profile

    Good morning all, I have created a user CSadmin and install collaboration suite under this user. How can I modify my profile so that when I log in as CSadmin, I get options to choose from (either the infrastructure or the middle tier)? Thanks in adva

  • Changing cursor color?  magnifying glass?

    Anyone recommend a 3rd party set of cursors to use in Logic? I'd love to have a bright red cursor that I could easily see. Also, I'd love a magnifying glass tool. Some of Logic's text is just too small to see at the resolution where I'm basically hap

  • Clarity of line in exported PNGs

    I created a logo and exported as a PNG, but the clarity of the linework is blurred.  Is there any way I can improve this-I increased the resolution and there is still a pixelated line.