0

我有一个问题,我无法访问 ALL_TABLES、ALL_USERS 等字典视图。

我有一个安装了 Oracle Database 19.3.0.0 EE - Gen1 映像的 Azure-VM。

我是如何设置机器的:

  1. 设置 ORACLE_BASE、ORACLE_HOME、ORACLE_SID 环境变量
  2. 创建目录 /u01/app/oracle/oradata
    /u01/app/oracle/admin/DBname/adump
    /u01/app/oracle/fast_recovery_area
  3. 在 /u01/app/oracle/product/19.0.0/dbhome_1/dbs/initDBName.ora 之后创建
    db_name='<DBName>'
    memory_target=1G
    processes = 150
    audit_file_dest='$ORACLE_BASE/admin/<DBName>/adump'
    audit_trail ='db'
    db_block_size=8192
    db_domain=''
    db_recovery_file_dest='$ORACLE_BASE/fast_recovery_area'
    db_recovery_file_dest_size=2G
    diagnostic_dest='$ORACLE_BASE'
    dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
    open_cursors=300
    remote_login_passwordfile='EXCLUSIVE'
    undo_management=AUTO
    undo_tablespace='undotbs'
    # You may want to ensure that control files are created on separate physical
    # devices
    control_files = (ora_control1)
    compatible ='11.2.0'
  1. 我运行了 sqlplus 命令
    sqlplus / as sysdba
    startup nomount;
  1. 使用以下命令创建数据库:
    CREATE DATABASE <DBName>
    USER SYS IDENTIFIED BY <Password>
    USER SYSTEM IDENTIFIED BY <Password>
    LOGFILE GROUP 1 ('/u01/logs/redo01a.log','/u01/logs/redo01b.log') SIZE 100M,
           GROUP 2 ('/u01/logs/redo02a.log','/u01/logs/redo02b.log') SIZE 100M,
           GROUP 3 ('/u01/logs/redo03a.log','/u01/logs/redo03b.log') SIZE 100M
    MAXLOGHISTORY 1
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 1024
    CHARACTER SET AL32UTF8
    NATIONAL CHARACTER SET AL16UTF16
    EXTENT MANAGEMENT LOCAL
    DATAFILE '/u01/app/oracle/oradata/<DBName>/system01.dbf'
     SIZE 700M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
    SYSAUX DATAFILE '/u01/app/oracle/oradata/<DBName>/sysaux01.dbf'
     SIZE 550M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
    DEFAULT TABLESPACE users
      DATAFILE '/u01/app/oracle/oradata/<DBName>/users01.dbf'
      SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
    DEFAULT TEMPORARY TABLESPACE tempts1
      TEMPFILE '/u01/app/oracle/oradata/<DBName>/temp01.dbf'
      SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
    UNDO TABLESPACE undotbs
      DATAFILE '/u01/app/oracle/oradata/<DBName>/undotbs01.dbf'
      SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
    USER_DATA TABLESPACE usertbs
      DATAFILE '/u01/app/oracle/oradata/<DBName>/usertbs01.dbf'
      SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

现在我想访问 ALL_USERS 视图但收到此错误:

ORA-00942: 表或视图不存在

所有其他字典表也是如此。

4

1 回答 1

0

正如@AlexPoole 所写,我必须按照步骤 11中的说明运行 sql 脚本

于 2022-02-10T13:23:50.190 回答