Home  >  Article  >  Database  >  在安装Oracle 10.2.0.1数据库时没有安装scott/tiger用户解决办法

在安装Oracle 10.2.0.1数据库时没有安装scott/tiger用户解决办法

WBOY
WBOYOriginal
2016-06-07 17:04:451004browse

在安装oracle10.2.0.1数据库时没有安装scott/tiger用户,如何创建scott用户和该用户下的表如下:可以在$ORACLE_HOME/rdbms/admin

在安装Oracle10.2.0.1数据库时没有安装scott/tiger用户,如何创建scott用户和该用户下的表如下:

可以在$ORACLE_HOME/rdbms/admin/scott.sql 找到此脚本进行创建,

dlp-> sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Tue May 25 23:53:17 2010

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL> connect sys as sysdba
Enter password:
Connected.
SQL> @$ORACLE_HOME/rdbms/admin/scott.sql
SQL> show user
USER is "SCOTT"
SQL> select table_name from user_tables;

TABLE_NAME
------------------------------
DEPT
EMP
BONUS
SALGRADE

SQL> select * from dept;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON

创建成功,OK!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn