2024-11-19 Oracle操作
1.创建XXX_DATA 表空间:create tablespace [表空间_DATA] datafile '/opt/oracle/oradata/[存放表空间和临时表空间dbf文件夹]/[表空间_DATA].dbf' size 2048M extent management local autoallocate;
create tablespace XXX_DATA datafile '/opt/oracle/oradata/XXX/XXX_DATA.dbf' size 2048M extent management local autoallocate;
2.创建XXX_TEMP 临时表空间:create temporary tablespace [临时表空间_TEMP] tempfile '/opt/oracle/oradata/[存放表空间和临时表空间dbf文件夹]/[临时表空间_TEMP].dbf' size 4096m extent management local;
create temporary tablespace XXX_TEMP tempfile '/opt/oracle/oradata/XXX/XXX_TEMP.dbf' size 4096m extent management local;
3.创建XXX用户:create user [用户] identified by [密码] default tablespace [表空间_DATA] temporary tablespace [临时表空间_TEMP];
create user XXX identified by pwdxxx default tablespace XXX_DATA temporary tablespace XXX_TEMP;
4.赋角色:grant dba,resource,connect to [用户];
grant dba,resource,connect to XXX;
5.oracle启停操作
1.切换Oracle:su - oracle
2.起侦听:lsnrctl start(关闭将start切换为stop)
3.起实例:
sqlplus /nolog
conn / as sysdba;
startup;
4.关闭:
su - oracle
lsnrctl stop
原文地址:https://blog.csdn.net/ZT1090258642/article/details/143877720
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!