用定时器 + bat脚本做oracle的备份,已经备份了几个月了。这几天突然发现备份出来的dmp数据完全没法重新导入到新的数据库中。 
起初以为是版本问题,或者导出参数的问题,于是在网上不停的搜索、尝试,最后还是没发现问题原因。 
算了还是研究一下导入日志中的错误,于是将日志中出错误的表尝试单独导出,居然出现EXP-00011::表不存在 错误,可是数据库中明明有这个表呀。根据这个方向再上网一查,终于找到原因了,原来在11g中空表是默认是不占Segment的,导致备份导出的时候压根就没导出那些空表,这样才出现备份的dmp没法导入的问题,敢情我几个月的备份工作都白做了。 
可ORACLE 你妈X的,备份导出时没导出空表这么大的事情你居然没有任何提示,你他*妈的是为了创造客服赚钱的机会么? 
哎,处理过程如下: 
1.用system帐号进入: 
  1.1 查看是否为true 
	show parameter deferred_segment_creation; 
  1.2 修改为false 
	alter system set deferred_segment_creation=false; 
2.用数据库帐号登录: 
  2.1 查找所有数据表为空的表 
select table_name from user_tables where NUM_ROWS=0; 
  2.2 把这些表组成修改Segment的脚本: 
select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0; 
  2.3 将2.2中查询的结果导出来,或者复制出来,并执行修改所有空表。 
这个时候就能把所有空表导出来了。 
感谢以下两位的帖子,给了我很大帮助 
http://arthas-fang.iteye.com/blog/875258 
http://wanwentao.blog.51cto.com/2406488/545154 
			
			
		
 
	
		
			
			
			regex为\\\\,因为在java中\\表示一个\,而regex中\\也表示\,所以当\\\\解析成regex的时候为\\。 
由于unix中file.separator为斜杠"/",下面这段代码可以处理windows和unix下的所有情况: 
String temp[] = name.replaceAll("\\\\","/").split("/"); 
if (temp.length > 1) { 
    name = temp[temp.length - 1]; 
}
			
			
		
 
	
		
			
			
			版本验证:
java -version
2
环境变量安装
JAVA_HOME D:\javaIDE\sunjdks\jdk1.5.0_04
Path  %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;
classpath  .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar
java项目运行:cd到所在目录下
java -jar testedi.jar
			
			
		
 
	
		
			
			
			     摘要: Java Project 打包以及安装包制作
Java的桌面程序写好以后只能在eclipse下运行是不可以的,还需要将程序拷贝到其他电脑上运行才可以,所以需要制作成其他电脑可以运行的文件,当然在安装有jdk的电脑上只需要将程序导出为jar文件就可以运行了,但是除了开发java程序人员的电脑上会安装jdk,其他人的电脑上不会有这个环境,所以还需要将java可运行的环境一同打包到程序中去,这样,在用...  
阅读全文
			
			
		 
	
		
			
			
			document.getElementById("div01").style.height;
document.getElementById("div01").style.lineHeight; 
document.getElementById("div01").style.backgroundColor;
CSS语法(不区分大小写)                        JavaScript语法(区分大小写)
border                                                                           border
border-bottom                                                              borderBottom
border-bottom-color                                                     borderBottomColor
border-bottom-style                                                      borderBottomStyle
border-bottom-width                                                     borderBottomWidth
border-color                                                                  borderColor
border-left                                                                     borderLeft
border-left-color                                                            borderLeftColor
border-left-style                                                             borderLeftStyle
border-left-width                                                            borderLeftWidth
border-right                                                                   borderRight
border-right-color                                                          borderRightColo
rborder-right-style                                                         borderRightStyle
border-right-width                                                         borderRightWidth
border-style                                                                  borderStyle
border-top                                                                    borderTop
border-top-color                                                           borderTopColor
border-top-style                                                            borderTopStyle
border-top-width                                                           borderTopWidth
border-width                                                                 borderWidth
clear                                                                             clear
float                                                                              floatStyle
margin                                                                          margin
margin-bottom                                                             marginBottom
margin-left                                                                     marginLeft
margin-right                                                                  marginRight
margin-top                                                                    marginTop
padding                                                                         padding
padding-bottom                                                            paddingBottom
padding-left                                                                    paddingLeft
padding-right                                                                 paddingRight
padding-top                                                                   paddingTop
CSS 语法(不区分大小写)                    JavaScript 语法(区分大小写)
background                                                                   background
background-attachment                                                backgroundAttachment
background-color                                                          backgroundColor
background-image                                                        backgroundImage
background-position                                                     backgroundPosition
background-repeat                                                       backgroundRepeat
color                                                                             color
CSS语法(不区分大小写)                    JavaScript 语法(区分大小写)
display                                                                        display
list-style-type                                                              listStyleType
list-style-image                                                            listStyleImage
list-style-position                                                         listStylePosition
list-style                                                                      listStyle
white-space                                                                whiteSpace
CSS 语法(不区分大小写)                   JavaScript 语法(区分大小写)
font                                                                            font
font-family                                                                  fontFamily
font-size                                                                     fontSize
font-style                                                                   fontStyle
font-variant                                                               fontVariant
font-weight                                                                fontWeight
CSS 语法(不区分大小写 )                    JavaScript 语法(区分大小写)
letter-spacing                                                              letterSpacing
line-break                                                                    lineBreak
line-height                                                                   lineHeight
text-align                                                                    textAlign
text-decoration                                                           textDecoration
text-indent                                                                  textIndent
text-justify                                                                  textJustify
text-transform                                                            textTransform
vertical-align                                                                 verticalAlign
			
			
		 
	
		
			
			
			1.在本机oracle系统配串
HYORCLNEW =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.128.4.35)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.128.4.36)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = hyorcl)
      (FAILOVER_MODE =
        (TYPE = select)
        (METHOD = basic)
        (RETRIES = 20)
        (DELAY = 1)
      )
    )
  )
2.
一 、创建dblink
Sql代码 
create database link <DBLink名称> connect to <被连接库的用户名> identified by <被连接库的密码> using '<Oracle客户端工具建立的指向被连接库服务名>'; 
例如: 
Sql代码 
1.create database link XMDS_KF connect to XMDS identified by XMDS using 'HYORCLNEW ;  
 
但这种方式有个缺点就是必须要在服务器建立一个被连接库的服务名,如果不建则会报错: 
ORA-12154: TNS: 无法处理服务名 
,但如果直接使用地址来建DBLink,就可以省去配置服务名的麻烦了: 
 
Sql代码 
1.create public database link XMDS_KF connect to XMDS identified by XNDS using '(DESCRIPTION =   
2.   (ADDRESS_LIST =   
3.     (ADDRESS = (PROTOCOL = TCP)(HOST = 145.24.16.182)(PORT = 1521))   
4.   )   
5.   (CONNECT_DATA =   
6.     (SERVICE_NAME = XMDS)   
7.   )   
8. )';