Time of Update: 2015-07-07
標籤:1.
Time of Update: 2015-07-07
標籤:第四. 索引 4.1 定義 索引是與表關聯的可選結構。通過建立索引可提高資料更新和檢索的效能。Oracle 索引提供到資料行的直接存取路徑。 可以對錶的一個或多個列建立索引。建立索引後,Oracle 伺服器會自動維護和使用索引。表資料的更新(如添加新行、更新行或刪除行)會自動傳播到所有相關的索引,這些對使用者來說是完全透明的。 索引還可以提高實施主鍵和唯一鍵約束條件時的效能。如果沒有索引,則每次對錶執行DML 操作時都會掃描整個表(全表掃描)。 4.2 類型
Time of Update: 2015-07-05
標籤:http://www.1youku.com/together.detail-id-456http://www.1youku.com/together.detail-id-455http://www.1youku.com/together.detail-id-454http://www.1youku.com/together.detail-id-453http://www.1youku.com/together.detail-id-452http://www.1youku.com/toget
Time of Update: 2015-07-01
標籤:oracle 資料庫伺服器cpu資源佔用超高環境:Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit ProductionCentOS release 6.5 X64現象:系統CPU使用率達到75%,查看系統進程資源狀態。650) this.width=650;"
Time of Update: 2015-07-03
標籤: oracle查詢資料表空間的使用方式 SELECT a.tablespace_name "資料表空間名", total "資料表空間大小", free "資料表空間剩餘大小", (total - free) "資料表空間使用大小", total / (1024 * 1024 * 1024) "資料表空間大小(G)", free / (1024
Time of Update: 2015-07-01
標籤: Oracle的匯入公用程式(Import utility)允許從資料庫提取資料,並且將資料寫入作業系統檔案。imp使用的基本格式:imp[username[/password[@service]]],以下例舉imp常用用法。 1. 擷取協助 imp help=y 2. 匯入一個完整資料庫 imp system/manager file=bible_db log=dible_db full=y ignore=y3.
Time of Update: 2015-07-02
標籤: select#coding=utf-8#!/usr/bin/pythonimport cx_Oracle;conn = None;cursor = None;try: conn = cx_Oracle.connect(‘username/[email protected]/sid‘); cursor = conn.cursor(); cursor.execute(‘select t.empno, t.ename from scott.emp t‘);
Time of Update: 2015-07-01
標籤:最基本的Oracle資料庫連接代碼(只針對Oracle11g):1、右鍵項目->構建路徑->配置構建路徑,選擇第三項“庫”,然後點擊“添加外部Jar”,選擇“D:\Oracle\app\oracle\product\11.2.0\server \jdbc\lib\ojdbc6_g.jar”(註:D:\Oracle為資料庫的安裝路徑)。2、以下代碼為非常標準的Oracle資料庫連接程式碼範例:/** *
Time of Update: 2015-07-01
標籤:修改oracle字元集 方法/步驟 oracle資料庫的字元集更改 A、oracle server 端 字元集查詢 select userenv(‘language‘) from dual 其中NLS_CHARACTERSET 為server端字元集 NLS_LANGUAGE 為 server端字元顯示形式 B、查詢oracle
Time of Update: 2015-06-29
標籤:VBA串連Oracle需要添加引用:之後,連接字串為:Provider = MSDAORA.1;Password=******;User ID=XXXXXXX;Data Source=DBID;Persist Security Info=True然後使用ado的標準封裝使用即可,1、使用ADO.CONNECTION,開啟串連,2、使用ADO.RECODESET查詢DB,使用connection.Excute執行更新刪除等操作。具體代碼如下:Public Sub ConOra()Dim
Time of Update: 2015-07-01
標籤:oracle SQL語句執行的監控指令碼![@[email protected]]--尋找bad sql的方法: select * from (select buffer_gets, sql_text from v$sqlarea where buffer_gets >500000 order by buffer_gets desc) where rownum<=30; --執行次數SQL select
Time of Update: 2015-06-28
標籤:獲得有關表的資訊可以直接DESCRIBEDESC[RIBE] table_name;可以通過資料字典SELECT * FROM user_tablesWHERE table_name =xxxx;[or WHERE table_name IN (‘xxxx‘,‘xxxx‘)]重新命名表RENAME table_old_name TO table_new_name;截斷表刪除表中的所有行,並重設表的儲存空間,表的表名列屬性等會保留。 TRUNCATE
Time of Update: 2015-06-30
標籤:oracle recoverrman的定義和功能: 1) Recovery Manager Tool 2)通過oracle 提供的包,建立備份和恢複的server process,在oracle server 上做備份和恢複 3)rman 備份 database、tablespace、datafile、controlfile、spfile、archivelog 4)支援歸檔和非歸檔
Time of Update: 2015-06-28
標籤:oracle 開發人員 規則 以下為Oracle大師級語錄:Oracle Database developers should follow is to do everything they can in SQL. What they cannot do in SQL, they should do in PL/SQL. And what they cannot do in PL/SQL,
Time of Update: 2015-06-30
標籤:declare Type ref_cur_variable IS REF cursor; cur_variable ref_cur_variable; v_empno scott.emp.empno%type; v_ename scott.emp.ename%type; v_sql varchar2(100) := ‘select t.empno, t.ename from scott.emp t‘;begin Open cur_variable
Time of Update: 2015-06-29
標籤:一、匯入.sql檔案@data.sql二、記錄日誌:1、輸入命令 sqlplus 資料庫名/密碼@資料庫 按斷行符號鍵2、輸入spool 指定路徑:\a.log 按斷行符號鍵 (此步驟的主要作用就是追蹤批量執行sql的日誌,路徑隨便寫,只要能找到就行,a.log可以隨便起名,但是必須要.log尾碼)5:@start.sql
Time of Update: 2015-06-27
標籤:CREATE TABLE employees_demo( employee_id NUMBER(6), first_name VARCHAR2(20), last_name VARCHAR2(25)CONSTRAINT emp_last_name_nn_demo NOT NULL, email VARCHAR2(25)CONSTRAINT emp_email_nn_demo NOT NULL, phone_number VARCHAR2(20), hire_date DATE
Time of Update: 2015-06-29
標籤:Web Api 2, Oracle and Entity FrameworkI spent about two days trying to figure out how to expose the Oracle.ManagedDataAccess 4.121.1.0 library over a Web Api 2.2 OData v4 Endpoint. Looking through the Oracle documentation, Oracle Managed
Time of Update: 2015-06-28
標籤:oracle子查詢 any all in 子查詢:在一個查詢的內部包括另外一個查詢。普通子查詢-- 查詢出比7654工資還高的全部僱員的資訊select * from emp e where e.sal > (select sal from emp where empno = 7654);--
Time of Update: 2015-06-24
標籤:從各個表中取得資料儲存另一個表中:CREATE VIEW PARAMETER_view ASWITH tall AS ( SELECT p.PI_NO,--產品序號 p.SERIALNO,--產品編號 p.PI_NAME,--產品名稱 p. PI_START_DATE,--產品起息日 p.PI_END_DATE,--產品期日期 p.PI_CUSTOMER_YIELD/100 PI_CUSTOMER_YIELD,