PIXNET Logo登入

DanBrother的部落格

跳到主文

歡迎光臨DanBrother在痞客邦的小天地. 部落格文章同步於=> http://blog.xuite.net/gem083/dba

部落格全站分類:數位生活

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 9月 04 週一 201710:22
  • JSON Data Structures in PL/SQL


JSON_ELEMENT_T: the supertype for the JSON_OBJECT_T, JSON_ARRAY_T, JSON_SCALAR_T and JSON_KEY_LIST object types.
Each of them extends JSON_ELEMENT_T as a subtype.
An instance of type JSON_ELEMENT_T, which is an in-memory representation of the JSON data, can be constructed only by parsing JSON text.
An instance of JSON_ELEMENT_T can be casted to a subtype instance using PL/SQL function - treat. 

 
(繼續閱讀...)
文章標籤

DanBrother 發表在 痞客邦 留言(0) 人氣(71)

  • 個人分類:SQL / PL/SQL
▲top
  • 8月 28 週一 201717:33
  • JSON in Oracle 12c Demo


CREATE TABLE json_test_tab (
  id    RAW(16) NOT NULL,
  data  CLOB,
  CONSTRAINT json_test_tab_pk PRIMARY KEY (id),
  CONSTRAINT json_test_tab_json_chk CHECK (data IS JSON)
);

INSERT INTO json_test_tab (id, data)
VALUES(SYS_GUID(),
'{
    "name": "Irene Palmer",
    "gender": "female",
    "company": "SPEEDBOLT",
    "email": "irenepalmer@speedbolt.com",
    "phone": "+1 (845) 436-2413",
    "address": "983 Roosevelt Place, Leyner, Illinois, 5767",
    "registered": "2017-02-14T09:51:25 -08:00",
    "latitude": 52.001456,
    "longitude": 161.045489,
    "friends": [
      {
        "id": 0,
        "name": "Chelsea Waller"
      },
      {
        "id": 1,
        "name": "Thomas Mccall"
      },
      {
        "id": 2,
        "name": "Booth Crawford"
      }
    ],
    "favoriteFruit": "apple"
  }');
  
INSERT INTO json_test_tab (id, data)
VALUES(SYS_GUID(),  
  '{
    "name": "Emma Mcdonald",
    "gender": "female",
    "company": "BYTREX",
    "email": "emmamcdonald@bytrex.com",
    "phone": "+1 (951) 413-2195",
    "address": "143 Arkansas Drive, Leola, Maryland, 5138",
    "registered": "2017-02-25T04:04:50 -08:00",
    "latitude": -28.083351,
    "longitude": 30.897873,
    "friends": [
      {
        "id": 0,
        "name": "Powers Turner"
      },
      {
        "id": 1,
        "name": "Hinton Delgado"
      },
      {
        "id": 2,
        "name": "Barrera Hutchinson"
      }
    ],
    "favoriteFruit": "banana"
  }');
  
INSERT INTO json_test_tab (id, data)
VALUES(SYS_GUID(),
'{
    "name": "Solis Rollins",
    "gender": "male",
    "company": "GROK",
    "email": "solisrollins@grok.com",
    "phone": "+1 (911) 439-3918",
    "address": "910 Bragg Court, Trail, Virginia, 3065",
    "registered": "2014-07-15T02:58:32 -08:00",
    "latitude": 37.970592,
    "longitude": -79.152205,
    "friends": [
      {
        "id": 0,
        "name": "Deborah Parrish"
      },
      {
        "id": 1,
        "name": "House Rich"
      },
      {
        "id": 2,
        "name": "Bennett Aguirre"
      }
    ],
    "favoriteFruit": "apple"
  }');
  
INSERT INTO json_test_tab (id, data)
VALUES(SYS_GUID(),
'{
    "name": "Dorthy Hoffman",
    "gender": "female",
    "company": "ARTIQ",
    "email": "dorthyhoffman@artiq.com",
    "phone": "+1 (806) 592-2352",
    "address": "257 Clarkson Avenue, Vowinckel, Virgin Islands, 1478",
    "registered": "2016-07-18T10:20:27 -08:00",
    "latitude": 34.322025,
    "longitude": 13.665359,
    "friends": [
      {
        "id": 0,
        "name": "Kristine Herrera"
      },
      {
        "id": 1,
        "name": "Branch Phillips"
      },
      {
        "id": 2,
        "name": "Wall Myers"
      }
    ],
    "favoriteFruit": "strawberry"
  }');
  
INSERT INTO json_test_tab (id, data)
VALUES(SYS_GUID(),
'{
    "name": "Medina Mcbride",
    "gender": "male",
    "company": "AVENETRO",
    "email": "medinamcbride@avenetro.com",
    "phone": "+1 (875) 470-2147",
    "address": "863 Ridgecrest Terrace, Rockbridge, Vermont, 366",
    "registered": "2014-11-03T08:32:50 -08:00",
    "latitude": 81.576249,
    "longitude": -41.531397,
    "friends": [
      {
        "id": 0,
        "name": "Angeline Powers"
      },
      {
        "id": 1,
        "name": "Mcdowell Perry"
      },
      {
        "id": 2,
        "name": "Luz Moody"
      }
    ],
    "favoriteFruit": "strawberry"
  }');
  
commit;

(繼續閱讀...)
文章標籤

DanBrother 發表在 痞客邦 留言(0) 人氣(57)

  • 個人分類:SQL / PL/SQL
▲top
  • 12月 01 週四 201616:14
  • Oracle Password Policy Checking PL/SQL Function Using REGEXP_COUNT

Oracle Password Policy Checking PL/SQL Function Using REGEXP_COUNT
create or replace function pwd_policy_check_fnc(pwd varchar2)
return pls_integer
is
v_ct smallint default null;
begin
v_ct:=REGEXP_COUNT(pwd, '^[a-zA-Z][a-zA-Z0-9]{7,}$');  -- Password with more than 7 Alphanumeric characters without special ones and start with alphabet
return(nvl(v_ct,0));
end;
/
(繼續閱讀...)
文章標籤

DanBrother 發表在 痞客邦 留言(0) 人氣(20)

  • 個人分類:SQL / PL/SQL
▲top
  • 2月 24 週三 201617:02
  • Reading Loaded Files from XML DB through Oracle Embedded PL/SQL Gateway

Reading Loaded Files from XML DB through Oracle Embedded PL/SQL Gateway
 
type myfilelist.bat
(繼續閱讀...)
文章標籤

DanBrother 發表在 痞客邦 留言(0) 人氣(65)

  • 個人分類:SQL / PL/SQL
▲top
  • 2月 16 週二 201616:36
  • Building a simple webpage using Embedded PL/SQL Gateway

Building a simple webpage using Embedded PL/SQL Gateway
-- Create a demo user
create user demo_user identified by demo_user default tablespace users temporary tablespace temp;
grant connect,resource to demo_user;

(繼續閱讀...)
文章標籤

DanBrother 發表在 痞客邦 留言(0) 人氣(24)

  • 個人分類:SQL / PL/SQL
▲top
  • 3月 05 週四 201515:44
  • Using Oracle REGEXP_SUBSTR function & CONNECT BY LEVEL clause to Decompose String

Using Oracle REGEXP_SUBSTR function & CONNECT BY LEVEL clause to Decompose String
 
(繼續閱讀...)
文章標籤

DanBrother 發表在 痞客邦 留言(0) 人氣(554)

  • 個人分類:SQL / PL/SQL
▲top
  • 1月 27 週二 201513:52
  • Change public synonyms to private synonyms in Oracle

Change public synonyms to private synonyms in Oracle
The following anonymous PL/SQL block will change the public synonyms granted by SCOTT to private synonyms:
. oraenv
sqlplus / as sysdba
grant create any synonym to scott;
grant drop public synonym to scott;
(繼續閱讀...)
文章標籤

DanBrother 發表在 痞客邦 留言(0) 人氣(15)

  • 個人分類:SQL / PL/SQL
▲top
  • 10月 14 週二 201411:38
  • Pragma Serially_Reusable Practice

Pragma Serially_Reusable Practice:
According to Oracle® Database PL/SQL Language Reference 11g Release 1 (11.1),
the pragma SERIALLY_REUSABLE indicates that the package state is needed only for the duration of one call to the server. After this call, the storage for the package variables can be reused, reducing the memory overhead for long-running sessions.
(繼續閱讀...)
文章標籤

DanBrother 發表在 痞客邦 留言(0) 人氣(24)

  • 個人分類:SQL / PL/SQL
▲top
  • 10月 08 週三 201416:12
  • Upload File using PL/SQL Web Toolkit

File Upload Demo
Upload File using PL/SQL Web Toolkit
Step 1: Create a document storage table called “UPLOAD_FILES”
(繼續閱讀...)
文章標籤

DanBrother 發表在 痞客邦 留言(0) 人氣(64)

  • 個人分類:SQL / PL/SQL
▲top
  • 9月 16 週二 201414:26
  • Use of Quote operator "q" in Oracle 11g

Use of Quote operator "q" in Oracle 11g
The following SQL statements will produce the same results.
select q'<Welcome to DanBrother's Blog. It's fantastic!>' as text from dual;
select q'#Welcome to DanBrother's Blog. It's fantastic!#' as text from dual;
select q'+Welcome to DanBrother's Blog. It's fantastic!+' as text from dual;
select q'@Welcome to DanBrother's Blog. It's fantastic!@' as text from dual;
select q'*Welcome to DanBrother's Blog. It's fantastic!*' as text from dual;
select q'(Welcome to DanBrother's Blog. It's fantastic!)' as text from dual;
select Q'cWelcome to DanBrother's Blog. It's fantastic!c' as text from dual;
(繼續閱讀...)
文章標籤

DanBrother 發表在 痞客邦 留言(0) 人氣(45)

  • 個人分類:SQL / PL/SQL
▲top
123»

廣告

個人資訊

DanBrother
暱稱:
DanBrother
分類:
數位生活
好友:
累積中
地區:

熱門文章

  • (49,256)Excel 2007 中文字顯示亂碼之修復步驟
  • (136)crsctl command usage
  • (83)ORA-15306: ASM Password File Update Failed On At Last One Node
  • (542)Workaround for NI cryptographic checksum mismatch error: 12599 (TNS-12599)
  • (1,847)FRM-91111 and FRM-10039 When Starting Oracle Forms Builder 11g on Linux
  • (21)PL/SQL BULK COLLECT Using LIMIT Clause Practice
  • (3,644)[OHS-2171] NZ Library Error: SSL negotiation error [Hint: too restrictive SSLCipherSuite]
  • (41)OPatch failed with error code 73 (Solved)
  • (137)Oracle HTTP Server 12c (12.1.3) standalone installation Procedures on Linux
  • (784)如何讓樞紐分析表區分大小寫

文章分類

  • Android (1)
  • Java (1)
  • MongoDB (1)
  • MariaDB (7)
  • Python (10)
  • HTML (1)
  • ORDS (1)
  • Apache Tomcat (1)
  • Oracle Streams (1)
  • Javascript (1)
  • Oracle Data Guard (2)
  • Oracle VirtualBox (3)
  • Grid Infrastructure (4)
  • Oracle SQL Tuning (6)
  • OEM11g / 12c (28)
  • IT Links (1)
  • 心靈饗宴 (161)
  • Oracle Clusterware (5)
  • ORACLE RAC (21)
  • Oracle ASM (18)
  • Oracle Export/Import (10)
  • MySQL (22)
  • Windows Series (18)
  • Oracle HTTP Server (8)
  • Linux (49)
  • Microsoft Office (6)
  • SQL SERVER (19)
  • Install Apache & PHP (2)
  • Oracle in General (111)
  • RMAN (15)
  • SQL / PL/SQL (30)
  • 未分類文章 (1)

最新文章

  • MySQL Array Simulation in Stored Procedure
  • Extracts, orders, and then prints grants for MySQL user accounts (pt-show-grants)
  • MySQL Stored Procedure - Nested Loop Example
  • Metabase H2 DB Migration to MySQL 5.7
  • Steps for Upgrading Percona-Toolkit to the Latest Version
  • MySQL Slave - Skip Replication for A Particular Table
  • MySQL - Export & Import Table Data Based on the SQL Query
  • MySQL Table Fragmentation Detection and De-fragmentation Implementation
  • Multiple Log File Viewer (Linux Bash)
  • Solving MySQL slave lag Issues

動態訂閱

文章精選

文章搜尋

誰來我家

參觀人氣

  • 本日人氣:
  • 累積人氣:

留言板