1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
DROP USER lob_user CASCADE;
DROP DIRECTORY SAMPLE_FILES_DIR;
CREATE USER lob_user IDENTIFIED BY lob_password;
CREATE DIRECTORY SAMPLE_FILES_DIR AS 'C:\sample_files';
GRANT read, write ON DIRECTORY SAMPLE_FILES_DIR TO lob_user;
GRANT connect, resource TO lob_user;
ALTER USER lob_user QUOTA 10M ON users;
CONNECT lob_user/lob_password;
CREATE TABLE clob_content ( id INTEGER PRIMARY KEY, clob_column CLOB NOT NULL );
CREATE TABLE blob_content ( id INTEGER PRIMARY KEY, blob_column BLOB NOT NULL );
CREATE TABLE bfile_content ( id INTEGER PRIMARY KEY, bfile_column BFILE NOT NULL );
CREATE TABLE long_content ( id INTEGER PRIMARY KEY, long_column LONG NOT NULL );
CREATE TABLE long_raw_content ( id INTEGER PRIMARY KEY, long_raw_column LONG RAW NOT NULL );
INSERT INTO clob_content ( id, clob_column ) VALUES ( 1, TO_CLOB('Creeps in this petty pace') );
INSERT INTO clob_content ( id, clob_column ) VALUES ( 2, TO_CLOB(' from day to day') );
INSERT INTO blob_content ( id, blob_column ) VALUES ( 1, TO_BLOB('100111010101011111') );
INSERT INTO blob_content ( id, blob_column ) VALUES ( 2, TO_BLOB('A0FFB71CF90DE') );
INSERT INTO bfile_content ( id, bfile_column ) VALUES ( 1, BFILENAME('SAMPLE_FILES_DIR', 'textContent.txt') );
INSERT INTO bfile_content ( id, bfile_column ) VALUES ( 2, BFILENAME('SAMPLE_FILES_DIR', 'binaryContent.doc') );
INSERT INTO long_content ( id, long_column ) VALUES ( 1, 'Creeps in this petty pace' );
INSERT INTO long_content ( id, long_column ) VALUES ( 2, ' from day to day' );
INSERT INTO long_raw_content ( id, long_raw_column ) VALUES ( 1, '100111010101011111' );
INSERT INTO long_raw_content ( id, long_raw_column ) VALUES ( 2, 'A0FFB71CF90DE' );
COMMIT;
|