Oracle创建表空间
创建表空间
create tablespace SIRMPM
datafile 'C:\softWare\oracleDownLoad\SIRMPM.dbf'
size 5G
autoextend on
next 2G
maxsize 15G;
创建用户并指定表空间
create user ghzq_dev identified by ghzq_dev default tablespace SIRMPM;
grant connect, resource,dba to ghzq_dev;
grant create session,create table, create view,create sequence,unlimited tablespace to ghzq_dev;
create or replace directory dump_dir as 'D:\ideaSpace';
grant read,write on directory dump_dir to ghzq_dev;
导入表空间数据
impdp ghzq_dev/ghzq_dev@orcl directory=dump_dir dumpfile=PROD_V520E.dmp logfile=ghzq.log remap_schema=PROD_V520:SIRMPM table_exists_action=replace;
迁移表空间
alter tablespace YUANYT offline;(
alter database rename file 'C:\softWare\oracleDownLoad\SIRM2.DBF' to 'D:\oracleTableSpace\SIRM2.DBF';
alter tablespace YUANYT online;
select file_name from sys.dba_data_files;
删除用户和表空间
drop user cjzq_sirm cascade;
drop tablespace CJZQ including contents and datafiles cascade constraint;
MySQL连接赋值
grant all privileges on *.* to 'root'@'%'identified by '123456' with grant option;
flush privileges;