oracle12c基本操作

1。查询oracle数据库字符编码

select userenv('language') from dual;

2。 oracle 命令行进入。

sqlplus 用户名/密码;

3。命令行里面执行sql文件

@c:/app/xxx.sql;

4。 oracle系统默认管理用户登陆

sqlplus / as sysdba

5。创建新用户,注意CDB容器中创建一个通用用户,用户名必须以C##或者c##开头

create user c##fds identified by fds123;    (其中c##fds为用户名,fds123为密码)

6。给新用户授权

grant create session to c##fds;

grant create table to c##fds;

grant create tablespace to c##fds;

grant create view to c##fds;

grant create sequence,select any sequence to c##fds; // 创建 查询sequence权限。

7。授予用户使用表空间的权限

grant unlimited tablespace to c##fds; 授权用户空间 (no privileges on tablespace users)

8。执行oracle sql脚本出现中文乱码解决。

检查客户端的编码格式

使用sqlplus 连接数据库 执行 Select userenv('language') from dual;  查询结果为:AMERICAN_AMERICA.ZHS16GBK

设置windows 环境变量 

NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

猜你喜欢

转载自blog.csdn.net/qq_37054881/article/details/80914747
今日推荐