随笔-46  评论-54  文章-0  trackbacks-0
Windows XP SP2 + Oralce 9i

exp++.bat
1 set sid=portal
2 set username=portal
3 set password=portal
4 set connect=%username%/%password%@%sid%
5 set back_path=D:\oracle
6 set date_string=%date:~0,4%_%date:~5,2%_%date:~8,2%
7 set time_string=%time:~0,2%_%time:~3,2%_%time:~6,2%
8 set file_string=%back_path%\portal_%date_string%_%time_string%
9 exp %connect% buffer=20000000 file=%file_string%.dmp log=exp_%file_string%.log owner=portal

imp++.bat
 1 set dmp_source=%1
 2 set sid=his
 3 set username=his_dba
 4 set password=his_dba
 5 set connect=%username%/%password%@%sid%
 6 set back_path=D:\oracle
 7 set date_string=%date:~0,4%_%date:~5,2%_%date:~8,2%
 8 set time_string=%time:~0,2%_%time:~3,2%_%time:~6,2%
 9 set output_string=%back_path%\portal_%date_string%_%time_string%
10 set source_string=%back_path%\%dmp_source%
11 imp %connect% file=imp_%source_string% log=%output_string%.log FROMUSER=portal

Change CHARACTER SET
1 ALTER DATABASE CHARACTER SET UTF8
2 NLS_CHARACTERSET
3 ZHS16CGB231280
4 ZHS16GBK
5 AL32UTF8
6 UTF8


posted on 2006-08-07 14:10 rox 阅读(1564) 评论(3)  编辑  收藏 所属分类: AJAX

评论:
# re: Oracle IMP/EXP bat 2006-12-22 10:44 | rox
mysqldump:

set dbname=gooweb2
set username=root
set password=1234
set back_path=.
set date_string=%date:~0,4%_%date:~5,2%_%date:~8,2%
set time_string=%time:~0,2%_%time:~3,2%_%time:~6,2%
set file_string=%back_path%\gooweb2_%date_string%_%time_string%

mysqldump --opt -u %username% --password=%password% %dbname% > %file_string%.sql  回复  更多评论
  
# re: Oracle IMP/EXP bat 2008-07-25 15:03 | rox
[原创]利用SELECT ... OUTFILE来备份MySQL数据库
http://blog.chinaunix.net/u/29134/showart_1074828.html

改良版本mysqldump来备份MYSQL数据库
http://blog.csdn.net/yueliangdao0608/archive/2008/07/20/2681263.aspx  回复  更多评论
  
# re: Oracle IMP/EXP bat 2009-08-09 10:31 | rox
exp portal/portal file=portal_`date +%Y%m%d`.dmp log=portal_`date +%Y%m%d`_exp.log
tar --remove-files -cvzf portal_`date +%Y%m%d`.tar.gz portal_`date +%Y%m%d`*.*  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航: