作者: admin

  • Microsoft SQL Server 2008: Grow Your Database Potential

    Microsoft Learning introduces a new suite of certifications for Microsoft® SQL Server® 2008, offering you more choices and simpler paths to follow to achieve your certification goals.You can demonstrate your depth of knowledge in one specific area, earn multiple MCTS certifications to show breadth across different areas, or build on the MCTS to earn a Professional Series credential.
    MCTS certifications for SQL Server 2008
    When you earn a Microsoft Certified Technology Specialist (MCTS) certification, you validate your deep technical knowledge and skill using the features and functionality of key technology areas in Microsoft SQL Server 2008.
    Three MCTS certifications on Microsoft SQL Server 2008 are available: MCTS: SQL Server 2008, Implementationand Maintenance; MCTS: SQL Server 2008,Database Development; and MCTS: SQL Server 2008,Business Intelligence Development and Maintenance.

    MCITP certifications for SQL Server 2008

    With a Microsoft Certified IT Professional (MCITP),credential you can distinguish yourself as an IT professional with the current skills and proven capabilities to work effectively with Microsoft SQL Server 2008.

    At the MCITP level there are also three Microsoft SQL Server 2008 certification: MCITP: Database Administrator 2008; MCITP: Database Developer 2008;and MCITP: Business Intelligence Developer 2008.You can read more about the new SQL Server certifications at http://www.microsoft.com/learning/mcp/sql/2008/default.mspx

    Download: Microsoft SQL Server 2008 certification

  • 利用Oracle 10g 的MODEL SQL 進行行間計算

    以產品產量表為例,一個工廠(用code 表示)生產多種產品(用p_id 表示),每種產品具有生產量(v1)和銷售量(v2)產品代碼具有審核關係,如’10’=’30’+’31’,其中’10’代表大類,’30’和’31’代表’10’大類下的小類。
    SQL>createtablet603(codevarchar(10),p_idvarchar(7),v1number(10),v2number(1
    0));
    Tablecreated.
    SQL>insertintot603values(‘600001′,’30’,1,1);
    SQL>insertintot603values(‘600001′,’31’,1,1);
    SQL>insertintot603values(‘600001′,’10’,2,2);
    SQL>insertintot603values(‘600002′,’10’,3,2);
    SQL>insertintot603values(‘600002′,’31’,2,1);
    SQL>insertintot603values(‘600002′,’30’,2,1);
    SQL>commit;
    Commitcomplete.
    SQL>select*fromt603;
    CODEP_IDV1V2
    ————————————-
    6000013011
    6000013111

    6000011022
    6000021032
    6000023121
    6000023021
    6rowsselected.
    SELECTcode,
    p_id,v1
    FROMt603
    WHEREcodeIN(‘600001′,’600002’)
    MODELRETURNUPDATEDROWS
    PARTITIONBY(code)
    DIMENSIONBY(p_id)
    MEASURES(v1)
    RULES(
    v1[‘err1′]=v1[’30’]+v1[’31’]-v1[’10’])
    ORDERBYcode,p_id;
    其中rule 表示計算規則,’err1’表示這條審核關係的代號,它的值等於P_ID 為’30’的v1 值+P_ID 為’31’的v1 值-P_ID 為’10’的v1 值PARTITION BY (code)表示按工廠分區,即審核在一個工廠內的產品MODEL 關鍵字後面的RETURN UPDATED ROWS 子句將結果限制為在該查詢中創建或更新的那些行。使用該子句是使結果集只包含新計算的值,在本例中就是審核結果

    CODEP_IDV1
    —————————
    600001err10
    600002err11
    如果返回值=0,表示v1[’30’] + v1[’31’] =v1[’10’]審核通過,否則,審核不通過

    (更多…)

  • Oracle 10g數據庫中如何分析響應時間

    在Oracle10g 中,以前版本中比較難於獲取的響應時間數據將會變得非常容易獲取。在以前看來,為了盡量獲得數據庫的最佳性能,Oracle 的DBA 們和性能分析專家一直很困難獲得系統以及用戶會話活動的一致的響應時間數據。 DBA 們面臨的問題一直以來包括兩個方面:第一個方面是準確定位數據庫或者用戶會話究竟在哪裡消耗了時間;第二個方面就是確定用戶體驗的客觀性質在數據庫中產生所有可能的行為和交互作用,這些任務都不是沒有價值的。  

    Oracle 等待接口,在之前的很早的Oracle 數據庫版本中開始介紹的,對於那些知道如何使用等待接口的管理員來說這已經成為一個偉大的開始,即使它仍然缺乏告訴DBA 系統或者用戶會話是否有效的處理了事務或者查詢這個理想的能力。啟用和鑽研跟踪文件能夠存儲這個級別上的詳細信息,但是對於大多數超負荷工作管理大型數據庫的DBA 們,這個鑽研是奢侈的而耗費時間的。幸運的是,那些將數據庫升級到Oracle10g 的DBA 們將會發現找到主要的響應時間變得很容易,可以允許一個非常好的圖表來顯示系統和會話級的響應時間數據。很重要的一點,Oracle 的ADDM 提供了一個查看響應時間的方法,通過自動分析收集的統計信息,識別問題區域,甚至可以通過Oracle 企業管理器網絡控制的圖形界面提供建議。此外,與我們這裡討論相關的是Oracle10g 數據庫的歷史數據機制允許DBA 們按時查看對響應時間趨勢的分析,這將有助於DBA 們確定事務/系統的高峰時期,更好的定位那些拉長批處理週期和ETL 作業的進程和SQL 語句。

    (更多…)

  • LPI啟動新的和修訂LPI-1和LPI-2 LINUX認證程序

    全球首屈一指的Linux認證機構宣布,它已經完成了廣泛的審查和更新考試目標LPIC – 1LPIC – 2認證計劃。新版本的這些考試將予以公佈,並可以在2009年4月1日開始生效。

    全文如下:
     
    LPI set to launch new and revised LPIC-1 and LPIC-2 Linux certification programs
     
    (Sacramento, USA: November 12, 2008) The Linux Professional Institute (LPI), the world’s premier Linux certification organization, announced it has completed an extensive review and update of the exam objectives for the popular LPIC-1 and LPIC-2 certification programs . New versions of these exams will be published and available on April 1, 2009.
    “This update of our LPIC-1 and LPIC-2 certification program is a significant milestone in LPI’s history and exemplifies our extensive, ongoing and transparent communications with industry leaders and the Open Source community on what are the necessary skill sets for a Linux professional, ” said Jim Lacey, President and CEO of the Linux Professional Institute. Mr. Lacey noted many of the changes to the exams are the result of extended consultations with partner organizations in the field and others that support LPI’s certification program: “As an example, we have broadened the scope of the LPIC-1 exams to appeal to a wider range of Linux professionals while focusing in-depth system administration and networking skills in the LPIC-2 certification.” Mr. Lacey also indicated that the increasing global relevance of the LPIC program has made it necessary that these new exams are much more sensitive to non-English exam candidates and include a greater amount of questions around localization, internationalization and accessibility issues.
    Revised exam objectives for LPIC-1 and LPIC-2 are available on LPI’s public wiki: https://group.lpi.org/publicwiki/bin/view/Examdev/WebHome. Candidates should note however that prior to April 1, 2009 exams will continue to be based on the “old” objectives for LPIC-1 and LPIC-2: http://www.lpi.org/eng/certification/the_lpic_program/lpic_1 and http://www.lpi.org/eng/ certification/the_lpic_program/lpic_2.
    The Linux Professional Institute is globally supported by the IT industry, enterprise customers, community professionals, government entities and the educational community. LPI’s certification program is supported by an affiliate network spanning five continents and is distributed worldwide in multiple languages in more than 7,000 testing locations . Since 1999, LPI has delivered more than 195,000 exams and 62,000 LPIC certifications around the world.
     
    About the Linux Professional Institute:
     
    The Linux Professional Institute promotes and certifies essential skills on Linux and Open Source technologies through the global delivery of comprehensive, top-quality, vendor-independent exams. Established as an international non-profit organization in 1999 by the Linux community, the Linux Professional Institute continues to demonstrate recognized global leadership in the certification of Linux professionals. LPI advances the Linux and Open Source movement through strategic partners, sponsorships, innovative programs and community development activities. LPI’s major financial sponsors are Platinum Sponsors IBM, Linux Journal, Linux Magazine, Novell , SGI, and TurboLinux as well

  • 八步精通Oracle訪問Sybase數據庫

    配置TRANSPARENT GATEWAY FOR Sybase步驟:
      1. Oracle所在服務器上安裝Sybase client(或者在同一台server上安裝Oracle、Sybase服務器),確保能夠訪問Sybase數據庫;
      2.安裝TRANSPARENT GATEWAY FOR Sybase選件,要用自定義安裝。正確選擇Sybase的安裝目錄;
      3.選擇一個sid字符串準備賦給Sybase數據庫。如:tg4sybs設置Sybase的dll路徑到環境變量PATH(這一步很重要);
      4.修改初始化文件,默認的是:
      Oracle_HOME\tg4sybs\admin\inittg4sybs.ora
      設置參數
      HS_FDS_CONNECT_INFO
      格式:
    HS_FDS_CONNECT_INFO= server_name. database_name[,INTER interface_file]
    server_name. database_name是大小寫敏感的。
      INTERFACE可選
      例子:如下
    # This is a sample agent init file that contains the HS parameters that are# needed
    for the Transparent Gateway for Sybase## HS init parameters#HS_FDS_CONNECT_INFO=migration_serv.taxHS_FDS_TRACE_LEVEL=
            
    OFFHS_FDS_RECOVERY_ACCOUNT=RECOVERHS_FDS_RECOVERY_PWD=RECOVER
    ## Environment variables required for Sybase#set SYBASE=d:\sybase

      上例中
      server_name是migration_serv
      database_name是tax
      5.配置oracle網絡服務的listener,配置文件是:listener.ora
      默認路徑:ORACLE_HOME\network\admin
      加入如下:
    SID_LIST_LISTENER=(SID_LIST=(SID_DESC=(SID_NAME= gateway_sid)
    (ORACLE_HOME= oracle_home_directory)(PROGRAM=tg4sybs)))

    gateway_sid就是3選擇的sid字符串
      oracle_home_directory是ORACLE_HOME
      tg4sybs若是SYBASE是特定的。如果是其他數據庫,會不同。
      例子如下:
    (SID_DESC=(SID_NAME=tg4sybs)
    (ORACLE_HOME = D:\oracle\ora92)(PROGRAM=tg4sybs))

      6.停止監聽
      lsnrctl stop
      重新啟動監聽程序
      lsnrctl start
      7.配置oracle server的tnsnames.ora使其能夠訪問sybase
    connect_descriptor=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)
    (HOST= host_name)(PORT= port_number))
    (CONNECT_DATA=(SID= gateway_sid))(HS=OK))

    connect_descriptor是連接串,任取,一般為sybs
      host_name:oracle server的name
      port_number:oracle監聽端口
      gateway_sid就是3選擇的sid字符串
      例子如下:
    sybs=(DESCRIPTION=(ADDRESS_LIST =(ADDRESS=(PROTOCOL=TCP)
    (HOST= dw-server1)(PORT= 1521)))
    (CONNECT_DATA=(SID= tg4sybs))(HS=OK))

      8.建立database link
      如:
    CREATE DATABASE LINK sybs CONNECT TO sa IDENTIFIED BY prient USING ‘SBYS’ ;
      即可訪問sybase 數據庫。
    需要注意的是,sybase數據庫的表名,字段名,如果是小寫的,那麼在oracle裡訪問的時候要加上雙引號””
      如:
    SQL〉select “a” from “b”@sybs;

  • Oracle 10G 臨時表空間組

    Oracle 10g 引進了臨時表空間組(temporary tablespace group)的概念,它允許用戶
    在不同的會話中同時利用多個臨時表空間。

     1. 臨時表空間組的主要特徵


    一個臨時表空間組必須由至少一個臨時表空間組成,並且無明確的最大數量限制。
    如果刪除了一個臨時表空間組的所有成員,該組也自動被刪除。
    臨時表空間的名字不能與臨時表空間組的名字相同。
    在給用戶分配一個臨時表空間時,可以使用臨時表空間組的名字代替實際的臨時表空間
    名;在給數據庫分配默認臨時表空間時也可以使用臨時表空間組的名字。


    2. 臨時表空間組的優點


    使用臨時表空間組而非普通的臨時表空間,有如下好處:
    由於SQL 查詢可以並發使用幾個臨時表空間進行排序操作,因此SQL 查詢很少會出現
    排序空間超出,避免當臨時表空間不足時所引起的磁盤排序問題。
    可以在數據庫級指定多個默認臨時表空間。
    一個並行操作的並行服務器將有效地利用多個臨時表空間。
    一個用戶在不同會話中可以同時使用多個臨時表空間。

     3. 管理臨時表空間組

     

      (更多…)

  • Oracle 10G:透明數據加密技術(TDE)

    Oracle 透明數據加密提供了實施加密所必需的關鍵管理基礎架構。加密的工作原理是將明文數據以及秘密(稱作密鑰)傳遞到加密程序中。加密程序使用提供的密鑰對明文數據進行加密,然後返回加密數據。以往,創建和維護密鑰的任務由應用程序完成。 Oracle透明數據加密通過為整個數據庫自動生成一個萬能密鑰解決了此問題。在啟動 Oracle 數據庫時,管理員必須使用不同於系統口令或DBA 口令的口令打開一個Oracle Wallet 對象。然後,管理員對數據庫萬能密鑰進行初始化。萬能密鑰是自動生成的。

     
    性能:


    由於索引數據未被加密,因此加密通常會影響現有的應用程序索引。 Oracle 透明數據加密對與給定應用程序表關聯的索引值進行加密。這意味著應用程序中的相等搜索對性能的影響很小,甚至沒有任何影響。例如,假設應用程序card_id 存在一個索引,並且此應用程序執行以下語句:
    SQL> Select cash from credit_card where card_id = ‘1025023590’;
    Oracle 數據庫將使用現有的應用程序索引,儘管card_id 信息已經在數據庫中加密。
     
    準備用於加密的數據庫:

     
    在本部分內容中,您將更新sqlnet.ora、創建一個加密錢夾(ewallet.p12)、打開此錢夾並為 TDE 創建萬能密鑰。執行以下操作:
    1. 您需要更新sqlnet.ora 文件以包含一個ENCRYPTED_WALLET_LOCATION 條目。打開一個終端窗口,然後輸入以下命令:
    cd $ORACLE_HOME/network/admin
    gedit sqlnet.ora

    connect / as sysdbaalter system set key identified by “welcome1”;
    此命令的作用為:
    l 如果指定的目錄中不存在加密錢夾,則將創建加密錢夾(ewallet.p12)、打開此錢夾並創建/重新創建 TDE 的萬能密鑰。
    l 如果指定目錄中存在加密錢夾,則將打開此錢夾並創建/重新創建TDE 的萬能密鑰。
    之後,就可以測試數據了。


    下面是實驗記錄:
    alter system set key identified by “welcome1”;
    SQL> conn dodd/dodd123
    create table test (id number,credit_card_number varchar2(16) ENCRYPT NO SALT);
    SQL> insert into test values(1,’1231243242′);
    1 row created.
    SQL> insert into test values(2,’33245235′);
    SQL> commit;
    Commit complete.
    SQL> select * from test;
    ID CREDIT_CARD_NUMB
    ———- —————-
    1 1231243242
    2 33245235
    可見,數據查看是明文,因為這個時候,加密錢夾已經打開,數據可以解密。
    2. 接下來,您需要打開錢夾並創建萬能加密密鑰。從終端窗口中,輸入以下命令:
    將以下條目添加到文件末尾:
    ENCRYPTION_WALLET_LOCATION=(SOURCE=(METHOD=FILE)(METHOD_DAT
    A=(DIRECTORY=/opt/oracle/admin/test97/wallet/)))
    如果不加這一項的話,則會提示下面錯誤:
    SQL>altersystemsetkeyidentifiedby”hurray”
    2;
    altersystemsetkeyidentifiedby”hurray”
    *
    ERRORatline1:
    ORA-28368:cannotauto-createwallet
    /opt/oracle/admin/test97/wallet/ 目錄是用來存放生成的錢夾的。可以為加密錢夾選擇任何目錄,但路徑不應指向在數據庫安裝過程中創建的標準模糊錢夾 (cwallet.sso)。

     

     

     
    這時,停止數據庫,再打開:
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> SQL> startup
    ORACLE instance started.
    Total System Global Area 524288000 bytes
    Fixed Size 1979968 bytes
    Variable Size 138414528 bytes
    Database Buffers 377487360 bytes
    Redo Buffers 6406144 bytes
    Database mounted.
    Database opened.
    SQL> select * from dodd.test;
    select * from dodd.test
    *
    ERROR at line 1:
    ORA-28365: wallet is not open
    SQL> select id from dodd.test;
    ID
    ———-
    1
    2
    可以看到,因為數據庫重啟後,加密錢夾處於關閉狀態,這時只要查詢到加密的列,會提示加密錢夾沒有打開。
    如果用戶想打開錢夾,必須具有alter system 權限。下面打開wallet:
    SQL> conn / as sysdba
    Connected.
    SQL> alter system set wallet open identified by “welcome1”;
    System altered.
    SQL> conn dodd/dodd123
    Connected.
    SQL> select * from test;
    ID CREDIT_CARD_NUMB
    ———- —————-
    1 1231243242
    2 33245235
    可以看到,加密錢夾打開後,數據可以被解密。
    還有一條:sys 用戶的表不能被加密。
    可見:Oracle TDE 是在數據層面上對錶裡的數據加密,而且不會影響數據庫現有的權限控制策略。

    salt 實際上就是在加密過程中引入一個隨機性。簡單的說,就是一般來說,同樣的明文產生同樣的密文,這樣就導致容易被解密者通過分析詞頻之類的方式(加解密我不太懂)來通過密文破解明文,如果指定salt,那麼即使同樣的明文加密後的密文也是不一樣的。no salt 的話,自然就是相同的明文會產生相同的密文了。對於索引來說,要求no salt 也就可以理解了
    丟失ewallet 加密錢夾的話,是不能再解密數據的。
    Oracle 10gR2 的TDE 特性,對於防止機密信息的洩漏能起到事半功倍的作用!
    –The End–

  • Microsoft SQL Server 2005基礎教程

    Microsoft SQL Server 2005基礎教程教學內容:

    點擊下載:  SQL Server 2005基礎教程

    第一章:

    1.理解使用數據庫的原因
    2.掌握數據庫的基本概念和特點
    3.理解Microsoft SQL Server簡史
    4.理解Microsoft SQL Server系統的體系結構
    5.理解數據庫和數據庫對象的特點
    6.理解管理工具的特點
    7.理解數據庫管理員的任務

    1.1 為什麼使用數據庫?
    1.2 什麼是數據庫?
    1.3 Microsoft SQL Server簡史
    1.4 Microsoft SQL Server系統的體系結構
    1.5 數據庫和數據庫對象的特點
    1.6 管理工具
    1.7 數據庫管理員

    第二章:

    2.1 安裝規劃
    2.2 安裝過程
    2.3 驗證安裝結果
    2.4 升級規劃
    2.5 註冊服務器
    2.6 配置服務器選項

    第三章:

    3.1 概述
    3.2 管理登錄名
    3.3 固定服務器角色
    3.4 管理數據庫用戶
    3.5 管理架構
    3.6 數據庫角色
    3.7 管理應用程序角色
    3.8 管理權限
    3.9 SQL Server 2005內置的加密機制
    3.10 使用SQL Server Management Studio工具

    全部二十一章,請下載後查看全部內容…..