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 閱讀(954) | 評論 (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 閱讀(360) | 評論 (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 閱讀(2286) | 評論 (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 閱讀(350) | 評論 (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 閱讀(577) | 評論 (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 閱讀(2392) | 評論 (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 閱讀(1690) | 評論 (6)編輯 收藏

          清除google搜索欄中的歷史記錄

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

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

          posted @ 2005-09-28 00:55 waterye 閱讀(4192) | 評論 (8)編輯 收藏

          flashback table

          Oracle 10g 增加回收站功能

          錯誤drop table后可以flashback回來

          SQL> flashback table test to before drop;

          posted @ 2005-09-27 19:50 waterye 閱讀(440) | 評論 (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 閱讀(2445) | 評論 (5)編輯 收藏

          僅列出標題
          共18頁: First 上一頁 10 11 12 13 14 15 16 17 18 下一頁 
          主站蜘蛛池模板: 庄浪县| 股票| 漾濞| 延寿县| 祁门县| 镇安县| 巫溪县| 涿州市| 夏邑县| 隆德县| 宽城| 普兰店市| 龙陵县| 平果县| 宝丰县| 襄樊市| 天等县| 米林县| 宜州市| 荣成市| 嘉兴市| 邢台县| 太白县| 明溪县| 芷江| 理塘县| 南汇区| 香港 | 德安县| 吉水县| 闵行区| 玉溪市| 福安市| 清水县| 巩义市| 思南县| 大宁县| 峡江县| 简阳市| 阿拉善右旗| 新平|