Oracle Statements
数据库  /  管理员 发布于 2年前   96
Oracle Statements
--create tablespace
CREATE TABLESPACE "TABLESPACE_NAME" LOGGING
DATAFILE 'F:\oracle\product\10.2.0\oradata\orcl\TABLESPACE_DATA_NAME.dbf' SIZE 200 M
AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED EXTENT
MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
-- Create an user
create user USER_NAME
identified by "password"
default tablespace SPACE_NAME
temporary tablespace TEMP
profile DEFAULT;
-- Grant/Revoke role privileges
grant connect to USER_NAME;
grant dba to USER_NAME;
-- Grant/Revoke system privileges
grant unlimited tablespace to USER_NAME;
数据库DB Link:
select * from dba_db_links;
create public database link link名称 connect to 远端用户名 identified by "远端"
using '(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 远端IP)(PORT = 1521)) )
(CONNECT_DATA = (SERVICE_NAME = 远端实例名)))';
select 'create table '||table_name ||' as select * from '||table_name||'@link名称;' from user_tables;
select 'drop table '|| table_name ||';' as aa from user_tables;
drop public database link dblink_name;
导出数据文件
exp 用户名/密码@实例名 file=将要保存的数据文件名
导入数据库
imp 用户名/密码@实例名 file=要导入的数据文件名 full=y
导入/导出指定表
imp user/password@实例名 file=D:\sampleDB.dmp log=D:\imp.log fromuser=userName tables=(table1,table2)
exp user/password@实例名 file=d:/sampleDB.dmp tables=(table1,table2)
用户管理:进入sqlplus / as sysdba
建用户及授权
create user 用户名 identified by 密码 default tablespace users temporary tablespace temp;
grant connect,resource,dba to 用户名;
删除用户
drop user 用户名 cascade;
nkt 在
阿里云香港服务器搭建自用vpn:Shadowsocks使用流程步骤中评论 用了三分钟就被禁了,直接阿里云服务器22端口都禁了..熊丽 在
安装docker + locust + boomer压测环境实现对接口的压测中评论 试试水..博主 在
阿里云香港服务器搭建自用vpn:Shadowsocks使用流程步骤中评论 @test 也可能是国内大环境所至,也是好事,督促你该研究学习新技术..test 在
阿里云香港服务器搭建自用vpn:Shadowsocks使用流程步骤中评论 打了一次网页,然后再也打不开了。。是阿里云的缘故吗?..博主 在
centos7中Meili Search搜索引擎安装流程步骤中评论 @鹿 执行以下命令看看你的2.27版本是否存在strin..
Copyright·© 2019 侯体宗版权所有·
粤ICP备20027696号