2、Sql-oracle创建新用户
1.首先我们可以用scott用户以sysdba的身份登录oracle.
conn scott/tiger as sysdba
2.然后我就可以来创建用户了.
create user zs identified by zs;
3.修改用户的密码.
alter user zs identified by 123456;
4.创建一个表空间.
create tablespace zs_zs datafile \'f:\zs_zs.dbf\' size 200M;
5.创建好表空间,还需要将表空间分配给用户.
alter user zs default tablespace zs_zs;
6.给用户分配了表空间,用户还不能登陆(没有登录权限),因此还需要为用户分配权限
grant create session,create table,create view,create sequence,unlimited tablespace to zs;
grant create public database link to zs;
grant create any procedure to zs;
grant execute any procedure to zs;
7.sqlpus连接
sqlplus username/pwd@ip:1521/实例名; oracle19c
8.Oracle 低版本客户端连接 19c 报ORA-28040 和 ORA-01017 错误的解决方法
编辑sqlnet.ora文件,新增 SQLNET.ALLOWED_LOGON_VERSION=8
然后报错ORA-01017
重新修改一下用户密码就行了
9.ora-12560: TNS:协议适配器错误
注册表问题。regedit,然后进入HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME
修改环境变量ORACLE_SID=实例名(如 orcl)