select * from dba_data_files ; ---查看用来导数据库的数据库数据文件路径信息 ----创建顺德一体化项目的数据库的对应的表空间。该数据库文件最少需要2个 create tablespace sync_plus_1 datafile '/u01/app/oracle/oradata/orcl/sync_plus_1_01.dbf' size 500M autoextend on next 100M , '/u01/app/oracle/oradata/orcl/sync_plus_1_02.dbf' size 500M autoextend on next 100M , '/u01/app/oracle/oradata/orcl/sync_plus_1_03.dbf' size 500M autoextend on next 100M , '/u01/app/oracle/oradata/orcl/sync_plus_1_04.dbf' size 500M autoextend on next 100M , '/u01/app/oracle/oradata/orcl/sync_plus_1_05.dbf' size 500M autoextend on next 100M , '/u01/app/oracle/oradata/orcl/sync_plus_1_06.dbf' size 500M autoextend on next 100M , '/u01/app/oracle/oradata/orcl/sync_plus_1_07.dbf' size 500M autoextend on next 100M , '/u01/app/oracle/oradata/orcl/sync_plus_1_08.dbf' size 500M autoextend on next 100M maxsize unlimited logging extent management local autoallocate segment space management auto /* create tablespace SYNC_PLUS_1 datafile '/u01/app/oracle/oradata/orcl/SYNC_PLUS_1.DBF' size 100M --生成数据文件并定义文件大小 autoextend on next 100M maxsize unlimited logging --设置自动扩展 extent management local autoallocate segment space management auto; */ --创建用户 设置权限 create user SYNC_PLUS_1 identified by SYNC_PLUS_1 default tablespace SYNC_PLUS_1 quota 500m on users; ---- 这里第一个 TEST_SYNC 为用户名,第二个 TEST_SYNC 为密码,第三个 SYNC_PLUS_1 为表空间名。然后执行。 grant all privileges to SYNC_PLUS_1; --- 执行该语句给 TEST_SYNC 用户授权,此时 TEST_SYNC 用户就可以登录了。 ---创建角色 create role ALLINONE_JX ; create role ALLOUTSIDE ; create role ALLTAX ; create role RDCX; ---给用户分配角色 grant ALLTAX to sync_plus_1 ; grant ALLINONE_JX to sync_plus_1 ; grant ALLOUTSIDE to sync_plus_1 ; grant dba to sync_plus_1; grant RDCX to sync_plus_1; ---增加表空间的数据文件 alter tablespace sync_plus_1 add datafile 'D:\SOFT\DEVELOP\DATABASE\ORACLE\ORADATA\ORCL\sync_plus_1_01.dbf' size 500M autoextend on next 100M , 'D:\SOFT\DEVELOP\DATABASE\ORACLE\ORADATA\ORCL\sync_plus_1_02.dbf' size 500M autoextend on next 100M , 'D:\SOFT\DEVELOP\DATABASE\ORACLE\ORADATA\ORCL\sync_plus_1_03.dbf' size 500M autoextend on next 100M , 'D:\SOFT\DEVELOP\DATABASE\ORACLE\ORADATA\ORCL\sync_plus_1_04.dbf' size 500M autoextend on next 100M , 'D:\SOFT\DEVELOP\DATABASE\ORACLE\ORADATA\ORCL\sync_plus_1_05.dbf' size 500M autoextend on next 100M , 'D:\SOFT\DEVELOP\DATABASE\ORACLE\ORADATA\ORCL\sync_plus_1_06.dbf' size 500M autoextend on next 100M , 'D:\SOFT\DEVELOP\DATABASE\ORACLE\ORADATA\ORCL\sync_plus_1_07.dbf' size 500M autoextend on next 100M , 'D:\SOFT\DEVELOP\DATABASE\ORACLE\ORADATA\ORCL\sync_plus_1_08.dbf' size 500M autoextend on next 100M
select * from dba_data_files ; select * from dba_users; -- 删除 用户 DROP USER SYNC_PLUS_1 cascade; -- 删除表空间 drop tablespace SYNC_PLUS_ORCLPDB1 including contents and datafiles ;
标签:100M,autoextend,创建,数据库,用户,sync,plus,next,size From: https://www.cnblogs.com/ios9/p/17631232.html