暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Oracle数据库初始化脚本

TNodes 2021-07-19
885
  • 创建表空间

1

create tablespace mhpt datafile 'E:\htzqjj\ts_data.ora' size 1000m;

select file_id from dba_data_files where tablespace_name='MHPT';

alter database datafile 9 autoextend on next 10M;  --9是之前查出的file_id;



  • 创建用户并赋予权限

2

grant create any index to NAME;

grant create database link to NAME;

grant create procedure to NAME;

grant create sequence to NAME;

grant create table to NAME;

grant create view to NAME;

grant debug connect session to NAME;

grant delete any table to NAME;

grant select any table to NAME;

grant unlimited tablespace to NAME;

grant update any table to NAME;

grant dba to NAME;

grant connect to NAME;

grant resource to NAME;

  • 数据导入

3

imp mhpt/mhpt2@127.0.0.1/orcl file=D:\mhpt_20170726.dmp log=D:\temp\log.txt full=y ignore=y


文章转载自TNodes,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论