Oracle数据库中创建Schema的过程可以用代码来实现,本文我们就介绍了一个Oracle数据库创建Schema的代码示例,希望能够对您有所帮助。
首先执行下面的代码:
class="dp-xml">
- clear screen;
- disconn;
- conn / as sysdba;
- drop user USER CASCADE;
- DROP TABLESPACE USER_INDX including contents and datafiles;
- DROP TABLESPACE USER_TS_TABLES including contents and datafiles;
- DROP TABLESPACE USER_TEMP including contents and datafiles;
- CREATE TABLESPACE USER_TS_TABLES
- NOLOGGING
- DATAFILE 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\USER_TS_TABLES' SIZE 5120K AUTOEXTEND ON
- NEXT 32m maxsize 4096m
- EXTENT MANAGEMENT LOCAL
- ONLINE
- SEGMENT SPACE MANAGEMENT AUTO;
- CREATE TEMPORARY TABLESPACE USER_TEMP
- TEMPFILE 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\USER_TEMP' SIZE 5120K AUTOEXTEND ON
- NEXT 32m maxsize 8192m
- EXTENT MANAGEMENT LOCAL;
- create user USER IDENTIFIED BY USER
- default tablespace USER_TS_TABLES
- temporary tablespace USER_TEMP
- quota unlimited on USER_TS_TABLES;
然后执行一下的代码:
- GRANT CONNECT,RESOURCE,IMP_FULL_DATABASE TO USER;
- disconn;
- pause;
- conn USER/USER;
- @D:\0706\start.ddl;
- disconn;
关于Oracle数据库创建Schema的代码示例就介绍到这里了,希望本次的介绍能够对您有所收获!