linux oracle 常用命令

來源:互聯網
上載者:User

#-----------------------------------------------<br />#登入開發機<br />#-----------------------------------------------<br />ssh oa@192.168.1.9<br />#資料庫匯出<br />export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK<br />export f1=`date +%Y%m%d%H%M`.dmp<br />expdp /'sys/pwd@orcl as sysdba/' directory=DATA_PUMP_DIR dumpfile=$f1 schemas=hs_aws_sa3 reuse_dumpfiles=true<br />#複製到dump 到 hs-db<br />scp /home/oa/oracle/admin/orcl/dpdump/$f1 oa@192.168.1.13:/home/oracle/admin/hsoa/dpdump/imp.dmp<br />#登出開發機 Ctrl + D<br />#-----------------------------------------------<br />#登入 hs-web<br />#-----------------------------------------------<br />ssh oa@192.168.1.14<br /># 備份 plugs<br />tar -czvf /home/backup/plugs_`date +%Y%m%d%H%M`.tgz /home/hs_aws_system/bin/plugs/<br /># 複製 plugs java 包 到 hs-web<br />scp -r oa@192.168.1.9:/home/oa/hs_aws_system/bin/plugs /home/hs_aws_system/bin/plugs<br />#備份表單<br />tar -czvf /home/backup/eform_html`date +%Y%m%d%H%M`_bak.tgz /home/hs_aws_system/template/eform/html<br /># 複製 表單 到 hs-web<br />scp -r oa@192.168.1.9:/home/oa/hs_aws_system/template/eform/html /home/hs_aws_system/template/eform/html<br />#登出hs-web Ctrl + D<br />#-------------------------------------------------<br />#登入 hs-db<br />#------------------------------------------------<br />ssh oa@192.168.1.13<br />#備份<br />export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK<br />export f2=exp_`date +%Y%m%d%H%M`.bak<br />expdp /'sys/pwd@hsoa as sysdba/' directory=DATA_PUMP_DIR dumpfile=$f2 schemas=hs_aws_sa reuse_dumpfiles=true<br />mv /home/oracle/admin/hsoa/dpdump/$f2 /home/oracle/backup/<br />#sqlplus 登入資料庫<br />sqlplus sys/pwd@hsoa as sysdba<br />#刪除資料表空間<br />Drop TableSpace hs_aws_ts including contents and datafiles;<br />#建立資料表空間<br />CREATE SMALLFILE TABLESPACE "HS_AWS_TS" DATAFILE '/home/oracle/oradata/hsoa/hs_aws_ts.dbf' SIZE 100M REUSE AUTOEXTEND ON NEXT 1024K MAXSIZE 32767M LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;<br />#匯入<br />export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK<br />impdp /'sys/pwd@hsoa as sysdba/' directory=DATA_PUMP_DIR dumpfile=imp.dmp schemas=hs_aws_sa3 REMAP_SCHEMA=hs_aws_sa3:hs_aws_sa<br /> 

 

dbca 命令 :管理 oracle 執行個體 .

刪除 oracle 執行個體,通過刪相應安裝目錄,還應刪 /etc/oratab 檔案,每個安裝執行個體都會在這個檔案裡記錄的。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.