Tim,
First, welcome to our "Happy Oracle Family" !
Tim said:
I want to know how to copy a user (GMS) from our Test DB to the Support DB.
I presume that means that you want to re-create the GMS user and all of its objects from TEST to SUPP, right? If so, then:
1) As a DBA on SUPP, create a new user, password, and appropriate rights and privileges for GMS. Typical code to achive this might be:
Code:
create user GMS
identified by <GMS's password>
default tablespace <Tablespace where you want GMS to store its toys>
temporary tablespace <Name of your Temp tablespace>
quota <unlimited or some specific limit> on <Default tablespace you assigned>
/
grant connect, resource to GMS
/
grant CREATE VIEW to GMS -- if SUPP is Oracle 10g
/
2) Export all of GMS's objects from TEST database. There are many different parameters that you can use for an Oracle "exp" invocation. Here is a typical invocation that I might use...at the o/s prompt of the machine upon which TEST resides, invoke Oracle's export utility:
Code:
<o/s prompt> exp buffer=15000000 compress=n grants=n feedback=1000 consistent=y file=GMS.dump log=GMS_Exp.log statistics=none owner=GMS userid=GMS/GMS@TEST
With the parameter "feedback=1000", you will see a dot (".") every time the "exp" utility outputs 1000 rows from a table. (Note: both the "exp" and the "imp" command parameters should appear on a single command line to avoid issues of continuation characters.)
3) Import GMS's objects into the SUPP database. Use some sort of o/s (COPY) command to make your "exp" dump file ("GMS.dump") accessible to the SUPP database instance, then issue some variant of the following "imp" command at the target machine's o/s prompt:
Code:
imp buffer=15000000 grants=n feedback=1000 fromuser=GMS touser=GMS file=GMS.dump log=GMS_Imp.log userid=GMS/GMS@SUPP
(Note: You will have less risk of trouble if the GMS user on the SUPP instance has tablespace quota to tablespaces with the same names from which the source objects came. If this issue causes you trouble or anxiety, just post your questions here or in a new thread.)
Let us know how all of this goes for you.
![[santa] [santa] [santa]](/data/assets/smilies/santa.gif)
Mufasa
(aka Dave of Sandy, Utah, USA)
[I can provide you with low-cost, remote Database Administration services: see our website and contact me via
www.dasages.com]