Change schema name without doing export and import

Is there a way of changing the name of a database schema without having to create a new user and exportng objects from the old schema into the new schema?
Are there any system tables that can be changed to modify schema name without creating a new schema?

SQL> select user#,name from user$ where user#=55;
USER# NAME
55 HR
SQL> desc hr.employees
Name Null? Type
----------------------------------------- -------- ---------------------------- EMPLOYEE_ID NOT NULL NUMBER(6)
FIRST_NAME VARCHAR2(20)
LAST_NAME NOT NULL VARCHAR2(25)
EMAIL NOT NULL VARCHAR2(25)
PHONE_NUMBER VARCHAR2(20)
HIRE_DATE NOT NULL DATE
JOB_ID NOT NULL VARCHAR2(10)
SALARY NUMBER(8,2)
COMMISSION_PCT NUMBER(2,2)
MANAGER_ID NUMBER(6)
DEPARTMENT_ID NUMBER(4)
SQL> update user$ set name='RH' where user#=55;
1 row updated.
SQL> commit;
Commit complete.
SQL> select user#,name from user$ where user#=55;
USER# NAME
55 RH
SQL> desc rh.employees
ERROR:
ORA-04043: object rh.employees does not exist
SQL> desc hr.employees
Name Null? Type
----------------------------------------- -------- ---------------------------- EMPLOYEE_ID NOT NULL NUMBER(6)
FIRST_NAME VARCHAR2(20)
LAST_NAME NOT NULL VARCHAR2(25)
EMAIL NOT NULL VARCHAR2(25)
PHONE_NUMBER VARCHAR2(20)
HIRE_DATE NOT NULL DATE
JOB_ID NOT NULL VARCHAR2(10)
SALARY NUMBER(8,2)
COMMISSION_PCT NUMBER(2,2)
MANAGER_ID NUMBER(6)
DEPARTMENT_ID NUMBER(4)
conclusion:
changing the name in user$ does not change then schema name

Similar Messages

  • Escape character while doing export and import

    Hi,
    I am doing a typical exp and imp.
    Works fine except one table which has rows which has sql in it like
    SELECT NAME FROM EMPLOYEE E WHERE E.NAME=DEPARTMENT.NAME,
    SELECT CITY FROM EMPLOYEE E WHERE E.CITY=?.
    I am not able to import the second row but the first row is not the problem.
    So I thought I need to ESCAPE ? for I tried backslash to escape question mark...didnt work. I tried quotes....didnt work, double quotes .......didnt work.....
    Pls help.
    Deepak

    SQL> select user#,name from user$ where user#=55;
    USER# NAME
    55 HR
    SQL> desc hr.employees
    Name Null? Type
    ----------------------------------------- -------- ---------------------------- EMPLOYEE_ID NOT NULL NUMBER(6)
    FIRST_NAME VARCHAR2(20)
    LAST_NAME NOT NULL VARCHAR2(25)
    EMAIL NOT NULL VARCHAR2(25)
    PHONE_NUMBER VARCHAR2(20)
    HIRE_DATE NOT NULL DATE
    JOB_ID NOT NULL VARCHAR2(10)
    SALARY NUMBER(8,2)
    COMMISSION_PCT NUMBER(2,2)
    MANAGER_ID NUMBER(6)
    DEPARTMENT_ID NUMBER(4)
    SQL> update user$ set name='RH' where user#=55;
    1 row updated.
    SQL> commit;
    Commit complete.
    SQL> select user#,name from user$ where user#=55;
    USER# NAME
    55 RH
    SQL> desc rh.employees
    ERROR:
    ORA-04043: object rh.employees does not exist
    SQL> desc hr.employees
    Name Null? Type
    ----------------------------------------- -------- ---------------------------- EMPLOYEE_ID NOT NULL NUMBER(6)
    FIRST_NAME VARCHAR2(20)
    LAST_NAME NOT NULL VARCHAR2(25)
    EMAIL NOT NULL VARCHAR2(25)
    PHONE_NUMBER VARCHAR2(20)
    HIRE_DATE NOT NULL DATE
    JOB_ID NOT NULL VARCHAR2(10)
    SALARY NUMBER(8,2)
    COMMISSION_PCT NUMBER(2,2)
    MANAGER_ID NUMBER(6)
    DEPARTMENT_ID NUMBER(4)
    conclusion:
    changing the name in user$ does not change then schema name

  • Changing schema names

    Is there a way of changing the name of a schema?? I know in dba studio you can only change the password. Thanks.
    TP

    The only way to change the schema name is to export then import.
    Basically, the steps are
    1. Export old_user schema
    2. Drop old_user cascade
    3. Create new_user
    4. Import fromuser=old_user touser=new_user
    null

  • Shell Script For Export And Import Of Table Records

    Hello,
    We have production and test instances and for constant testing we need to copy data from production to test or development environment.
    At the moment what we do is manually doing export and import table records. At times this could be very tedious as we may need
    to do this exercise a couple of times in a day.
    Is it a good idea to do this exercise using shell script? If so how could I do this? If this is not a good idea what are the best alternatives?
    Any input is highly appreciated.
    Thanks

    Ah I see, your company prefers stupidity over efficiency. It would be possible to do it in a controlled environment, wouldn't it? Also the test database would be allowed to select only.
    So the non-allowance is just plain stupid.
    To the second question: do you use hard-coded passwords in shell scripts?
    Don't you think that poses a security risk?
    Don't you think that is a bigger risk than a database link, properly set up?
    In my book it is!
    Sybrand Bakker
    Senior Oracle DBA

  • How to export and import dependent tables from 2 different schema

    I have a setup where schema1 has table 1 and schema 2 has table2. And table 1 from schema1 depends upon table 2 from schema 2.
    I would like to export and import these tables only and not any other tables from these 2 schemas with all information like grants,constraints.
    Also will there be same method for Oracle 10g R1,R2 and Oracle 11G.
    http://download.oracle.com/docs/cd/B12037_01/server.101/b10825/dp_export.htm#i1007514
    Looking at this For table mode it says
    Also, as in schema exports, cross-schema references are not exported
    Not sure what this means.
    As I am interested in only 2 tables I think I need to use table mode. But if I try to run export with both tables names, it says table mode support only one schema at a time. Not sure then How would the constraints would get exported in that case.
    -Rohit

    worked for my 1st time I tried
    exp file=table2.dmp tables="dbadmin.temp1,scott.emp"
    Export: Release 10.2.0.1.0 - Production on Mon Mar 1 16:32:07 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Username: / as sysdba
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export done in US7ASCII character set and AL16UTF16 NCHAR character set
    server uses WE8ISO8859P1 character set (possible charset conversion)
    About to export specified tables via Conventional Path ...
    Current user changed to DBADMIN
    . . exporting table                          TEMP1         10 rows exported
    EXP-00091: Exporting questionable statistics.
    Current user changed to SCOTT
    . . exporting table                            EMP         14 rows exported
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    Export terminated successfully with warnings.

  • Automate exports and imports (file names)

    Hi all,
    I will like to do a simple export and import into another schema in another database.
    I am very comfortable with the process but all i require is how to set the dump file and log file names to be the date and name of the database being exported and imported.
    For example when I do the export I want the dump file and logfile names to be exp_ORCL_230805.dmp and exp_ORCL_230805.log for database ORCL exported on 230805.
    For the import I want the logfile name to be imp_TEST_230905.log.
    I am doing this export and import on a windows xp client but the database reside on UNIX AIX boxes.
    Thanks alot

    Set up ORACLE_SID before you start the imp/exp session on the client, then you can use file=exp_%ORACLE_SID%_%DATE%.dmp etc. (Note that if your windows locale has a date format w/ whitespace you might have to write a script to get rid of it..)

  • Exporting and Importing of Schema

    The Export and Import of Schema is not working consistently in SP4.
    When I create a new repository from the schema, all the subtables get created. The main table is has only one field in it. It reads Category.
    The other fields in the main table are missing and are not imported during the Import Schema operation.
    Has anyone encountered the same issue?
    If so, please let me know how you overcame this errorneous behaviour?

    Hi Adhappan
    I have tried importing without success. The import is not consistent. The same schema creates different sets of tables & fields each time. Sometimes if you reimport some more tables which were not set up the first time gets selected for import.
    I did a simple exercise to test the import / export functionality.
    1. I unarchived a repository from standard content provided by SAP
    2. I exported the schema
    3. I tried importing the schema without any modifications to schema
    4. The results were highly inconsistent.
    Arvind
    Pls reward useful answers

  • DHCP Server does not work after Exporting and Importing Using Netsh Command

    Hello Friends :
    I had two dhcp servers in windows server 2003 server , I have upgraded one of them to windows server 2008 32 bit and again i installed a windows server 2008 R2 as an additional Domain Controller , the last scenario was like this :
    srv-1 : windows server 2003 + DHCP = working with no problem
    srv-2 : windows server 2003 + DC + DHCP = Worked without problem
    srv-3 : windows server 2008 R2 + DC = worked without any problems
    I exported the DHCP server configuration on the srv-2 using netsh dhcp server export and Imported them to srv-3 using the
    netsh dhcp server import command , the command completed successfully and i can see all of the scopes without any problems and errors , i have authorized the new server without any problem , all scopes are activated without any problem so i
    disabled the srv-2 DHCP service and unauthorized it from active directory , the problem is that the new server semms that does not lease any address to clients !!!
    1- I have authorized it
    2- I used Rogue Checker tool in client computers they see authorized server without any problems
    3- The same tool in workgroup only shows srv-1 as the DHCP server and does not see other DHCP servers
    4- Bindings are OK and DHCP servers only have one NIC installed on them
    What can i do to make sure my srv-3 DHCP server will work on the network ?
    thanks ...
    MIMO

    Are the clients on another network so you need to configure a DHCP relay agent?
    If you load up perfmon on the dhcp server and remove all counters and then add DHCP counters. Do you see any dhcprequests when you reboot your dhcp clients? This will determine if your server actually receives any dhcp requests.
    Have you check event viewer for any warnings or errors?
    And the classic one restarted the dhcp server service (or reboot)?
    Regards Per-Torben Sørensen http://pertorben.wordpress.com/

  • Is it possible to replace masters with versions without going through the process of exporting and importing?

    Is it possible to overwrite the master files with the versions without having to go through the entire process of exporting and importing back the images?
    Thnx in advance

    A small refinement if you shoot RAW. Remember, no RAW file can ever be edited or rewritten. Thus, in the old days, the flow was:
    RAW>TIFF/PSD and you ended up with two large files. (This is why some folks used to delete the RAW Masters.)
    With Aperture the flow is something like:
    RAW+Version(s) Only the Version is only 30 KB. (There is, of course, additional overhead of Thumbs and Previews, but, depending on your settings, this is only a fraction of the size of a TIFF or PSD.)
    You question goes right to the heart of the concept of a non-destructive workflow. With Aperture you always preserve your original Master file; the only things that are ever at risk are your edits (called Adjustments). Ironically, this is even more valuable if you shoot JPEG or TIFF as those files could be rewritten.)
    Aperture goes to great lengths to give you the best of both worlds; you always have the Master to revert to and your "edits" take up very little disk space. And you don't have to waste time trying to sync folders of RAW, TIFF, and JPEG. Similarly, you never have to worry about resizing images, changing color spaces, or any number of other things that get locked into an image file when you use a destructive workflow.
    Remember, Aperture will happily Export files in any format you may need. Export 'em, use 'em, delete 'em - your Masters are still safe in Aperture.
    DiploStrat

  • Export and Import of APPS and Applsys Schemas in R12

    Hi ,
    Can you please let me know Export and Import of APPS and Applsys Schemas in R12 will cause any issue ?
    Thanks and Regards,
    Jagadeesha.

    Can you please let me know Export and Import of APPS and Applsys Schemas in R12 will cause any issue ?If you mean exporting/importing only those two schema between different instances then this is not supported (due to other schema dependencies) and the only supported way to export those two schema is by exporting/importing the complete database.
    Export/Import Process for Oracle E-Business Suite Release 12 using 10gR2 [ID 454616.1]
    Export/import process for R12 using 11gR1 or 11gR2 [ID 741818.1]
    Thanks,
    Hussein

  • Export and import change document for user master data

    Dear Gurus,
    I have two queries on change document for user master data:
    1. Are there any approaches to export and import change document for user master data?
    We often do system copy from PRD to QAS for UAT and troubleshooting. Before system copy we export the user master data from QAS and then import after the copy process. We would like to keep the change document for user master data on QAS from being refreshed from PRD for security reason.
    2. Change document for Role change in QAS
    When the role is created or modified in DEV and then transported to QAS, the role change document doen't include this change log. The role change document in QAS only records those role changes directly made in QAS.
    Could you advise this is by SAP design or are there any approaches to record this transported role change  in the role change document in QAS?
    Thanks
    YBY

    1. Perhaps you want to consider a system copy to a "virtual system" for UAT?
    2. Changes in QAS (as with PROD as well) will give you the delta. They should ideally be clean... You need to check the source system.
    Another option is to generate the profiles in the target system. But for that your config has to be sqeaky clean and in sync, including very well maintained and sync'ed Su24 data.
    Cheers,
    Julius

  • Please provide me unix shell script (export and import of database schema)

    please i am new in unix
    \please give me sample unix shell script (export and import of database schema)

    please i am new in unix
    \please give me sample unix shell script (export and import of database schema)Instead of providing you the readymade unix shell script for your requirement, I will give you the hints to prepare the same at your own.
    Create a file with .sh extension.
    # Specify and set all required Environment variables.
    ORACLE_HOME, PATH, NLS_LANG, etc.,
    # Use the export command with all clauses
    export scott/tiger@orcl file=scott.dmp log=scott_emp.log
    # Compress it.
    compress scott.dmp
    Refer any unix/linux documents for scripting basics.
    http://www.bijoos.com/ora7/oracle_unix.htm
    Regards,
    Sabdar Syed.

  • Export and Import of Schemas (PY and TM)

    Hi All,
    Is there a way to Export and Import Schemas (PY and TM)?
    Do exist a report standard, or custom , to do it?
    Or if somebody knows all the tables behind a schema.
    Because we have tried to load some tables but when we see the schema some description or comment are not shown, and then become difficult to read it.
    Thanks for any suggestion.
    Massi.

    Can you please let me know Export and Import of APPS and Applsys Schemas in R12 will cause any issue ?If you mean exporting/importing only those two schema between different instances then this is not supported (due to other schema dependencies) and the only supported way to export those two schema is by exporting/importing the complete database.
    Export/Import Process for Oracle E-Business Suite Release 12 using 10gR2 [ID 454616.1]
    Export/import process for R12 using 11gR1 or 11gR2 [ID 741818.1]
    Thanks,
    Hussein

  • How to Export and Import the schemas

    How can i export & import the schema's ? pls give me some example on how to do it.
    Could anyone pls show the commands to retrieve the Tablespace information... i mean what its initial size.. and how much of space has been used...
    ur reply is very much appreciated
    regards
    Muraly

    user11136977 wrote:
    Hi all,
    i am trying to export / import, need to know the commands
    =>how to export and import full schemas from 1 user to another
    =>how to export and import database
    =>how to export the tablespaces
    RegardsNo version, must be 10g then.
    All you asked and much more in the Utilities guide.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/exp_imp.htm#i1023560
    HTH
    Aman....

  • How to export and import from AIX to solaris a whole schema with different

    how to export and import from AIX to solaris a whole schema with different character set
    import done in US7ASCII character set and AL16UTF16 NCHAR character set
    import server uses WE8ISO8859P1 character set (possible charset conversion)
    Import terminated successfully with warnings.

    The conversion between the character sets on the two servers are handled automatically. Export from one server will export the data given the character set defined on that server. Import into another server will import the data given the character set defined on that server, performing a conversion if necessary. This can be a problem when going from single-byte to a multi-byte character set. In your case, the warning is simply for your information, shoule be no real problem given the character sets you're using.
    For more info...check out (pertains to 9i):
    Export
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch01.htm#1006791
    Character Ste Migration
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96529/ch10.htm#1656
    HTH

Maybe you are looking for

  • ORA-00911: invalid character using multiple select statements

    I am getting an ORA-00911: invalid character error when trying to execute 2 select statements using ODP.NET. cmd.CommandText = "select sysdate from dual;select sysdate from dual;"; cmd.Connection = conn; cmd.CommandType = System.Data.CommandType.Text

  • Photo gallery with a library list

    Basically what I need is a flash gallery showing pictures and videos, with a sort of library list to choose from. The player will be above, and the list below. The list will be set up as follows: column 1: Course column 2: Chapter column 3: Lesson So

  • Problem  with  ipod  getting  used  to

    My new ipod touch stops in the middle and I have trouble viewing the next video . It only plays for 5 minutes and then stops I have trouble getting to the next page Please help.

  • Stock is not showing in storage location after MIGo

    I am not able to see the stock in storage location after MIGO. Please help me where Iam wrong.

  • How do I stream?

    I set up a new film site and just dropped my quicktime movies into the folder with rest of my files. Then on html page made a link to the movie. And on Mac is starts playing quickly and perfectly as soon as I click on link. But windows people tell me