Oracle DBA 상용 명령 요약

5667 단어 OaclesqldosF#db2
Oracle DBA 상용 명령 요약

  //       

  create temporary tablespace zfmi_temp

  tempfile 'D:\oracle\oradata\zfmi\zfmi_temp.dbf'

  size 32m

  autoextend on

  next 32m maxsize 2048m

  extent management local;

  //tempfile     

  //       

  create tablespace zfmi

  logging

  datafile 'D:\oracle\oradata\zfmi\zfmi.dbf'

  size 100m

  autoextend on

  next 32m maxsize 2048m

  extent management local;

  //datafile     

  //             

  drop user zfmi cascade;

  //cascade              ,                         ,          

  //     

    :                             

  drop tablespace zfmi including contents and datafiles cascade onstraints;

  //including contents          ,                ,      ,      ,          

  //including datafiles            

  //cascade constraints     tablespace       

                   ,    :

            ,              ,               。

           (      oracle9i     ):

        ,filename           ,     ,       ;tablespace_name          。

  $ sqlplus /nolog

  SQL> conn / as sysdba;

           ,          :

  SQL> shutdown abort

  SQL> startup mount

  SQL> alter database datafile 'filename' offline drop;

  SQL> alter database open;

  SQL> drop tablespace tablespace_name including contents;

  //          

  create user zfmi identified by zfmi

  default tablespace zfmi temporary tablespace zfmi_temp;

  //identified by      

  //  message  DBA       

  GRANT DBA TO zfmi;

  //       

  grant connect,resource to zfmi; (db2:      )

        :

  Oracle      imp/exp    oracle       。exp                      dmp  , imp     dmp                  。                   ,      ,        。

      :   SQLPLUS.EXE  DOS(   )   ,

  DOS          oracle 8i       ora81BIN        ,

       EXP.EXE IMP.EXE           。

  oracle java  ,SQLPLUS.EXE、EXP.EXE、IMP.EXE                 。

  SQLPLUS.EXE  EXP.EXE、IMP.EXE     ,        。

             。

      :

  1     TEST    ,   system   manager    D:daochu.dmp 

  exp system/manager@TEST file=d:daochu.dmp full=y

  full=y   TEST DBA    ,    SID        ,  TEST       full-y

  2      system   sys      

  exp system/manager@TEST file=d:daochu.dmp owner=(system,sys)

  3        inner_notify、notify_staff_relat  

  exp aichannel/aichannel@TESTDB2 file= d:datanewsmgnt.dmp tables=(inner_notify,notify_staff_relat)

  4        table1    filed1 "00"       

  exp system/manager@TEST file=d:daochu.dmp tables=(table1) query=" where filed1 like '00%'"

          ,    ,  winzip dmp         。

                compress=y    。

       

  1  D:daochu.dmp        TEST    。

  imp system/manager@TEST file=d:daochu.dmp

  imp aichannel/aichannel@HUST full=y file=d:datanewsmgnt.dmp ignore=y

          ,         ,      ,         。

        ignore=y     。

  2  d:daochu.dmp   table1   

  imp system/manager@TEST file=d:daochu.dmp tables=(table1)

               。             ,    。

    :

            ,        。

           。   tnsping TEST       TEST    。

     :

                

    ,  sql*puls

    , system/manager  

    ,create user     IDENTIFIED BY    (         ,      )

    ,GRANT CREATE USER,DROP USER,ALTER USER ,CREATE ANY VIEW ,

  DROP ANY VIEW,EXP_FULL_DATABASE,IMP_FULL_DATABASE,

  DBA,CONNECT,RESOURCE,CREATE SESSION TO     

    ,   -cmd-  dmp       ,

  imp userid=system/manager full=y file=*.dmp

     imp userid=system/manager full=y file=filename.dmp

      :

  F:WorkOracle_Databackup>imp userid=test/test full=y file=inner_notify.dmp

      

  Import: Release 8.1.7.0.0 - Production on     2  16 16:50:05 2006

  (c) Copyright 2000 Oracle Corporation. All rights reserved.

     : Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production

  With the Partitioning option

  JServer Release 8.1.7.0.0 - Production

           EXPORT:V08.01.07     

      ZHS16GBK    ZHS16GBK NCHAR        

         UTF8 NCHAR     (   ncharset  )

  .    AICHANNEL       AICHANNEL

  . .                        "INNER_NOTIFY"          4    

          ...

        ,     。

     :

  Oracle             ,   Export/Import        .

     import9.par,

    ,       :imp parfile=/filepath/import9.par

    import9.par     :

  FROMUSER=TGPMS

  TOUSER=TGPMS2     ( :       FROMUSER  TOUSER,FROMUSER TOUSER       )

  ROWS=Y

  INDEXES=Y

  GRANTS=Y

  CONSTRAINTS=Y

  BUFFER=409600

  file==/backup/ctgpc_20030623.dmp

  log==/backup/import_20030623.log

좋은 웹페이지 즐겨찾기