第一篇基本操作--解锁用户 alteruser 用户 accountunlock;--锁定用户 alteruser 用户 accountlock;alteruserscottaccountunlock;--创建一个用户 yc 密码为 acreateuser 用户名 identifiedby 密码;createuserycidentifiedbya;--登录不成功,会缺少 createsession 权限,赋予权限的语法 grant 权限名to 用户;grantcreatesessiontoyc;--修改密码 alteruser 用户名 identifiedby 新密码;alteruserycidentifiedbyb;--删除用户 dropuseryc;--查询表空间select*fromdba_tablespaces;--查询用户信息select*fromdba_users;--创建表空间 createtablespaceycspacedatafile'E:\oracle\app\product\11.2.0\dbhome_l\oradata\ycspace.dbfsize2mautoextendonnext2mmaxsize5moffline;--创建临时表空间 createtemporaryyctempspacetempfile'E:\oracle\app\product\11.2.0\dbhome_1\oradata\ycspace.dbfsize2mautoextendonnext2mmaxsize5moffline;--查询数据文件select*fromdba_data_files;--修改表空间--1、修改表空间的状态--默认情况下是 online,只有在非离线情况下才可以进行修改altertablespaceycspaceoffline;--离线状态,不允许任何对象对该表空间的使用,使用情况:应用需要更新或维护的时候;数据库备份的时候altertablespaceycspacereadwrite;--读写状态altertablespaceycspaceonline;altertablespaceycspacereadonly;--只读,可以查询信息,可以删除表空间的对象,但是不能创建对象和修改对象。使用情况:数据存档的时候--2、修改表空间的大小--增加文件的大小alterdatabasedatafile'E:\oracle\app\product\11.2.0\dbhome_l\oradata\ycspace.dbfresize10m;--增加数据文件altertablespaceycspaceadddatafile'E:\oracle\app\product\11.2.0\dbhome_1\oradata\add.dbfsize2m;--删除表空间的数据文件altertablespace 表空间的名字 dropdatafile 数据文件名;--删除表空间droptablespaceycspace;--删除表空间且表空间中的内容和数据文件droptablespaceycspaceincludingcontentsanddatafiles;--指定表空间的创建用户的语法createuseryc1identifiedbyadefaulttablespaceycspacetemporarytablespacetemp;--删除用户dropuseryc1;--权限--赋予创建会话的权限grantcreatesessiontoyc1;--创建一个表createtablestudentInfo(sidint,snamevarchar2(10));--赋予 ycl 用户创建表的权限 grantcreatetabletoycl;--赋予 ycl 使用表空间的...