waterye

#

RMAN维护命令

使用RMAN进行备份和恢复的常用命令

连接到目标数据库(不用恢复目录数据库)
rman target / nocatalog

显示rman配置
RMAN> show all;

报告目标数据库的物理结构
RMAN> report schema;

报告陈旧备份
RMAN> report obsolete;

报告不可恢复的数据文件
RMAN> report unrecoverable;

列出备份信息
RMAN> list backup;

RMAN> list backup of database;

RMAN
> list backup of tablespace table_name;

RMAN
> list backup of controlfile;

RMAN
> list backup of spfile;

RMAN
> list backupset id;

核对备份
RMAN> crosscheck backup;

RMAN
> crosscheck backup of database;

RMAN
> crosscheck backup of tablespace system;

RMAN
> crosscheck backup of controlfile;

RMAN
> crosscheck backup of spfile;

删除备份
RMAN> delete obsolete; -- 删除陈旧备份

RMAN
> delete expired backup

RMAN
> delete backupset id;

RMAN
> delete backup-- 删除所有备份

改变备份集的状态
RMAN> change backupset id unavailable; -- available

改为长期备份
RMAN> change backupset id keep forever logs;

RMAN
> change backupset id keep until time 'sysdate+60' logs;

RMAN
> change backupset id nokeep;

posted @ 2005-10-20 21:13 waterye 阅读(948) | 评论 (0)编辑 收藏

控制文件

控制文件记载了数据库的物理结构及其状态, 还有备份和恢复相关的动态信息.

查看控制文件
col name format a50
select * from v$controlfile;

修改控制文件
alter system set control_files='D:\oradata\testdb\control01.ctl','D:\oradata\testdb\control02.ctl','D:\oradata\testdb\control03.ctl' scope=spfile;

建立控制文件副本
alter database backup controlfile to 'd:\backup\testdb.ctl' reuse;

备份到跟踪文件, 方便重建控制文件
alter database backup controlfile to trace;
-- 查看存放路径
show parameter user_dump_dest
select a.spid from v$process a, v$session b where a.addr = b.paddr and b.username = 'SYS';

通过rman恢复控制文件
-- 备份前配置自动备份control file
CONFIGURE CONTROLFILE AUTOBACKUP ON;

-- 恢复
startup force nomount;
set dbid=1092712345;
restore controlfile from autobackup;
alter database mount;
alter database open resetlogs;

查看dbid
select dbid from v$database;

posted @ 2005-10-20 12:55 waterye 阅读(345) | 评论 (0)编辑 收藏

Quake 4

备受关注的《Quack 4》已经上市.



vc:http://lib.verycd.com/2005/10/19/0000070259.html

最低配置:
操作系统:Windows 2000/XP
CPU:Pentium 4 2.0 GHz 或 Athlon XP 2000+
内存:512MB
光驱:8x CD-ROM
硬盘:400MB空闲空间
DirectX版本:DirectX 9.0
显卡:显存64MB以上,支持DirectX 9.0的3D显卡,ATi Radeon 9700 或nVIDIA GeForce 3 / TI系列


看来要准备升级老古董了, 也可以享受HDTV。

posted @ 2005-10-19 20:50 waterye 阅读(2276) | 评论 (3)编辑 收藏

重做日志

重做日志记录着数据库的变化情况, 在archivelog模式下, 当重做日志写满时, 会转移到归档日志, 而在noarchivelog模式下, 重做日志会被覆盖.

查看重做日志
col member format a40
select * from v$logfile;

增加日志成员
alter database add logfile member 'c:\ORADATA\TESTDB\REDO01_2.LOG' to group 1'c:\ORADATA\TESTDB\REDO02_2.LOG' to group 2'c:\ORADATA\TESTDB\REDO03_2.LOG' to group 3;

重做日志不必备份,重建方法
startup mount;
recover databse until cancel;
alter database open resetlogs;

posted @ 2005-10-17 23:19 waterye 阅读(342) | 评论 (0)编辑 收藏

use jakarta-commons email

requires jar: commons-email-1.0.jar, mail.jar, activation.jar

1. send text mail
SimpleEmail email = new SimpleEmail();
email.setHostName(
"211.154.104.29");
email.setAuthentication(
"water@itorgan.com", password);
email.addTo(
"waterye@gmail.com""Water Ye");
email.setFrom(
"water@itorgan.com""Water Ye");
email.setSubject(
"Test message");
email.setMsg(
"This is a simple test of commons-email");
email.send();
中文问题:
// email.setMsg("测试邮件");
email.setCharset("UTF-8");
email.setContent(
"测试邮件""text/plain;charset=GBK");
SimpleEmail封得太过简单, 看代码就知道了.

2. Sending email with attachments
// Create the attachment
EmailAttachment attachment = new EmailAttachment();
attachment.setPath(
"C:/mail/hello.groovy");
attachment.setDisposition(EmailAttachment.ATTACHMENT);
attachment.setDescription(
"hello.groovy");
attachment.setName(
"hello.groovy");

// Create the email message
MultiPartEmail email = new MultiPartEmail();
email.setHostName(
"211.154.104.29");
email.setAuthentication(
"water@itorgan.com", password);
email.addTo(
"waterye@gmail.com""Water Ye");
email.setFrom(
"water@itorgan.com""Water Ye");
email.setSubject(
"hello groovy");
email.setMsg(
"groovy hello world");

email.attach(attachment);   
// add the attachment
email.send();   // send the email

3. send html email
// Create the email message
HtmlEmail email = new HtmlEmail();
email.setHostName(
"211.154.104.29");
email.setAuthentication(
"water@itorgan.com", password);
email.addTo(
"waterye@gmail.com""Water Ye");
email.setFrom(
"water@itorgan.com""Water Ye");
email.setSubject(
"Test email with inline image");

// embed the image and get the content id
URL url = new URL("http://www.itorgan.com/images/index/top1.gif");
String cid 
= email.embed(url, "Itorgan logo");

email.setHtmlMsg(
"<html>The itorgan logo - <img src=\"cid:" + cid + "\"></html>"); // set the html message

email.setTextMsg(
"Your email client does not support HTML messages"); // set the alternative message

email.send();


martin xus已写过, 就不发布到首页了

posted @ 2005-09-30 16:42 waterye 阅读(566) | 评论 (0)编辑 收藏

在spring应用中生成excel, pdf

参考spring-framework-1.2.5\samples\countries
1. install
1). c:\> ant all
2). copy "dist\countries.war" to "tomat_home\webapps\"
3). http://localhost:8080/countries

2. Getting Started
1). Controller

String excelView = "countries_excelView";
public ModelAndView handleExcel(HttpServletRequest request, HttpServletResponse response) throws ServletException {
        RefreshablePagedListHolder listHolder 
=
                (RefreshablePagedListHolder) request.getSession(
true).getAttribute(COUNTRIES_ATTR);
        
if (listHolder == null{
            
throw new ServletException("No countries list found in session");
        }

        
return new ModelAndView(this.excelView, "countries", listHolder);
    }
2). Excel View
public class CountriesExcelView extends AbstractExcelView {
    
}
3). properties
countries_excelView.class=org.springframework.samples.countries.web.CountriesExcelView

3. 深入了解
org.springframework.web.servlet.view.document.AbstractExcelView (by POI)
org.springframework.web.servlet.view.document.AbstractJExcelView (by JExcelApi)
参考spring-framework-1.2.5\test\org\springframework\web\servlet\view\document

posted @ 2005-09-29 12:50 waterye 阅读(2368) | 评论 (0)编辑 收藏

jsf ide

1. Intellij IDEA
只有smart code, 对managed bean无效
Using MyFaces in IntelliJ IDEA

2. EXADEL STUDIO Pro 3.0.4 (eclipse plugin):
缺点:
1). 商业产品
2). 对pc性能要求较高
3). 会生成垃圾代码
优点:
1). gui desinger
User Guide

3. JDeveloper
除非选择adf, 否则不会使用

4. Sun Java Studio Creator
不考虑使用

posted @ 2005-09-28 20:56 waterye 阅读(1679) | 评论 (6)编辑 收藏

清除google搜索栏中的历史记录

1. Open:  Internet Options --> Content --> AutoComplete

2. Click button:  'Clear Forms' and 'Clear Passwords'

posted @ 2005-09-28 00:55 waterye 阅读(4174) | 评论 (8)编辑 收藏

flashback table

Oracle 10g 增加回收站功能

错误drop table后可以flashback回来

SQL> flashback table test to before drop;

posted @ 2005-09-27 19:50 waterye 阅读(422) | 评论 (0)编辑 收藏

因为Seam, 被jboss玩了一天

Seam is an application framework for Java EE 5 which unifies the component models of JSF and EJB 3.0, providing a streamlined programming model for web-based enterprise applications. Seam lets you bind your EJB components directly to JSF pages, eliminating noisy glue code.

下载jboss-seam-1.0beta1.zip后, 将里面的sample deploy到jboss-4.0.3RC2, 不成功.

因为很少玩jboss, 还以为是自己的deploy有问题, 搞了一天, 原来是jboss-4.0.3RC2不支持Seam.

在jira上找到了解决方法: http://jira.jboss.com/jira/browse/JBSEAM-82


结论:  Open Source的东西, 出问题时, 找jira就没错.

posted @ 2005-09-23 16:05 waterye 阅读(2423) | 评论 (5)编辑 收藏

仅列出标题
共18页: First 上一页 10 11 12 13 14 15 16 17 18 下一页