Oracle PL/SQL文法

控制結構  控制結構控制PL/SQL程式流程的程式碼,PL/SQL支援條件控制和迴圈控制結構。  文法和用途    IF..THEN  文法:IF condition THEN  Statements 1;  Statements 2;  ....END IF    IF語句判斷條件condition是否為TRUE,如果是,則執行THEN後面的語句,如果condition為false或NULL則跳過THEN到END IF之間的語句,執行END IF後面的語句。  

使用ORACLE觸發器

目錄一 使用情境Oracle觸發器,見名知意,就是當條件吻合時,被動觸發一系列的DB操作。觸發器是由Oracle資料庫本身被動觸發的動作,與預存程序不同的是,預存程序可以通過外部code或觸發器等顯示的調用,而觸發器是資料庫本身的被動行為。例如,當你需要在save A表記錄的時候,同時向B表記錄save A表的log資訊,這樣,觸發器就很符合您的要求了。二 環境和備用命令環境:本篇內容基於CENTOS和oracle

oracle串連“監聽程式當前無法識別串連描述符中請求的服務”,你是怎麼解決的。

安裝好了之後可以通過這個路徑找到一個文字檔:oracle\product\10.2.0\db_1\NETWORK\ADMIN\listener.ora 還一個在同路徑下的tnsnames.ora檔案,這兩個文本中的一些資訊要一樣的。比如下面的:listener.ora# listener.ora Network Configuration File: F:\oracle\product\10.2.0\db_1\network\admin\listener.ora# Generated by

Optimistic Locking with Concurrency in Oracle

As Database Administrators are required to scale their databases to handle the challenges of Web-basedaccess, B2B and E-commerce, faster hardware and more resources may only be a part of the solution.Poor locking strategies can cripple even the most

Locks in Oracle

create table lck (a number, b number);insert into lck values (1,2);insert into lck values (2,4);insert into lck values (3,6);insert into lck values (4,8);insert into lck values (5,3);insert into lck values (6,5);insert into lck values

Oracle伺服器參數檔案—–spfile

1.spfile簡介spfile是oracle執行個體啟動時的參數檔案,該檔案的預設位置是:$ORACLE_HOME/dbs,預設檔案名稱為spfile$ORACLE_SID.ora。相對於老的init.ora參數檔案,spfile具有如下優點:可以杜絕參數檔案的繁殖:spfile總是儲存在資料庫伺服器上,必須存在於伺服器主機本身,不能放在客戶機上。可以通過ALTER SYSTEM命令自動維護。2.建立spfile可以從老的init.ora穿件spfile檔案,文法如下CREATE

Oracle Create Database Syntax

Here are several ways to manually issue the "create database" syntax for Oracle:EXTREMELY minimal manual database creation OMF minimal manual create database syntax Standard Oracle create database syntax  EXTREMELY minimal manual database creation 1.

Oracle Concepts – SGA System Global Area

Oracle Tips by Burleson ConsultingOracle SGA ConceptsThe System Global Area (SGA) is a group of shared memory areas that are dedicated to an Oracle instance?(an instance is your database programs and RAM). All Oracle processes use the SGA to hold

Inside the Oracle SGA Regions

Oracle Tips by Burleson ConsultingMost DBAs know all about the Oracle System Global Area (SGA).  The SGA is Oracle's structural memory area that facilitates the transfer of data and information between clients and the Oracle database.  Long gone are

Joins in Oracle

What is Join?---------------------•In a straightforward a join is a query that combines rows from two or more tables, views, or materialized views.•Oracle Database performs a join whenever multiple tables appear in the FROM clause of the query.•In

Oracle Using the Undo and Redo Logfile Size Advisors

 Oracle Tips by Burleson ConsultingThis is an excerpt from "Oracle 10g New Features for Administrators" by Ahmed Baraka.Undo AdvisorThe Undo Advisor helps you perform the following tasks:o Set the undo retention periodo Set the size of the undo

Oracle Security Useful Scripts for Auditing

Oracle Security Tips by Burleson ConsultingThis is an excerpt from the bestselling book "Oracle Privacy Security Auditing", a complete Oracle security reference with working Oracle security scripts. Useful Scripts for AuditingTo see what statement

Recovery Made Simple: Oracle Flashback Query

Submitted by Irfan Haq on Mon, 2004-10-18 00:00 RDBMS Server Sometimes it is a rouge query, sometimes a simple data clean up effort by the users, whatever may the cause be, inadvertent data-loss is a very common phenomenon. Backup and recovery

Turbocharge SQL with advanced Oracle indexing

 Oracle Tips by Burleson ConsultingMarch 26, 2002 - Updated June 28, 2007For complete details on Oracle indexing for high performance, see my book "Oracle Tuning: The Definitive Reference".Oracle includes numerous data structures to improve the

Oracle中的硬解析與軟解析

Oracle中的SQL在執行之前進行解析,一個硬解析包括下面的步驟:載入到共用池中 - SQL原始碼被載入到記憶體中。文法解析 - Oracle檢查文法拼字錯誤。語義解析 - Oracle驗證來自資料字典的所有表名和列名並且驗證你是否有權訪問這些資料。查詢轉換 - 如果允許(query_rewrite=true),oracle將把複雜的SQL轉換為等價的簡單形式。最佳化 - 根據模式的統計資訊建立執行計畫(在10g中或許會使用動態樣本統計資訊)。建立可執行檔 -

Oracle中的Redo和Undo簡單介紹

Redo(重做)除了用於儲存資料的資料檔案外,每個oracle資料庫都會有一組(兩個或多個)重做記錄檔。重做日誌用於儲存對資料的所有修改,包括提交的和未提交的修改。在把對資料的修改寫到資料檔案之前,所有的修改都被寫到重做日誌中。 重做日誌的主要目的是在執行個體失敗或者介質損壞時,協助把資料庫恢複到一個合理的狀態。例如:當進行執行個體恢複時,重做日誌可以重做那些已經提交但是還沒有把修改寫入到資料檔案中的事務。 重做日誌由兩部分組成:線上重做日誌和歸檔重做日誌。為了避免發生單點故障,Oracle會建

Oracle LSNRCTL——監聽器的啟動和關閉

      對於DBA來說,啟動和關閉oracle監聽器是很基礎的任務,但是Linux系統管理員或者程式員有時也需要在開發資料庫中做一些基本的DBA操作,因此瞭解一些基本的管理操作對他們來說很重要。      本文將討論用LSNRCTL命令啟動、關閉和查看監聽器的狀態的方法。 怎樣啟動、關閉和重新啟動oracle監聽器在啟動、關閉或者重啟oracle監聽器之前確保使用lsnrctl status命令檢查oracle監聽器的狀態。除了得到監聽器的狀態之外,你還可以從lsnrctl

Oracle Flash Back ——-閃回到一個合適的時間

使用一條簡單的SQL語句,把表或者資料庫恢複到過去的某個時間點。 新年的聖誕夜前夕,頂點銀行的DBA約翰正在和他的朋友們一起狂歡,為新年的到來倒計時。正當午夜的時鐘敲響,大家一起歡呼時,他的手機忽然響了起來。銀行資料中心裡,年終計帳程式正忙於計算利息,但是發生了一些問題,所有的利息都被計算錯了。幸運的是,Team

Oracle隊列類型

隊列隊列(enqueue)是一種共用記憶體結構,它總是和事物和會話相關,用於序列化地訪問資料庫資源。 隊列類型Oracle中有很多類型的隊列,下面是常用的一些類型:CF 隊列: CF隊列是控制檔案隊列,當並行的存取控制檔案時會產生CF隊列。當有讀取控制檔案的任何活動時,都可以看到CF隊列,例如歸檔重做日誌、重做日誌切換和begin backup命令。CI 隊列: CI隊列是跨越執行個體的隊列並且在會話執行跨越執行個體的調用時產生,例如通過database link查詢。FB 隊列:

Oracle 查詢曆史資料-恢複誤刪除資料資訊

恢複誤刪除資料資訊:1、執行 alter table table_name enable row movement;2、執行 FlashBack table table_name to timestamp to_timestamp('2012-05-24 14:59:36','yyyy-mm-dd hh24:mi:ss');查詢曆史操作資料資訊:比較合理的方法是先從閃回區尋找出被誤刪的資料,再將被誤刪的資料插入到原來的表中。  1、執行 select * from A as of

總頁數: 1509 1 .... 457 458 459 460 461 .... 1509 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.