網頁

2011年5月29日 星期日

Oracle Import/Export

Last Update: 2011/05/30 10:10+08
Type: Note

Preface


久久用一次, 就老是忘記, 還是寫在自己的Blog



Content


Service_Name= 服務名稱(類似Sql Server 執行個體名稱)
Tablespace = 表格空間(類似資料庫)

底下的匯入將導入該使用者的預設表格空間
所以, 如果不想放到system, 就自己開一個使用者指過去吧:)
剛好也得為專案開一個使用者呀

Import
imp <User ID>/<Password>@<Service_Name> file=<File Path> full=y
ex: imp myuser/mypassword@orcl file=D:/mydb.dmp full=y

Export
exp <User ID>/<Password>@<Service_Name> file=<File Path> full=y

2011年5月24日 星期二

SqlServer Util Command

Last Update: 2011/06/16 11:06+08



---取得連線資訊---------------------
Use master
Select * From sysprocesses


---Foreach table------------------
Use []
--請注意唷, 下面指令會刪除All table
Exec sp_MSforeachtable @command1 = "DROP TABLE ?"


---Limit---------------------------
select * from (select row_number() over (order by ac_id) as row_num,* from account)
t where row_num between 1 and 30