日期:2014-05-16 浏览次数:20456 次
oracle 9i/10g中,如果数据库实例中没有scott模式,可以手工创建,方法如下:
登录数据库
ora_test@oracle[/home/oracle]> sqlplus / as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 24 09:21:26 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options |
创建scott用户
sys@CNHTM> create user scott identified by tiger; User created. |
为scott用户分配权限
sys@CNHTM> grant connect,resource to scott; Grant succeeded. |
用scott用户登录
sys@CNHTM> conn scott/tiger Connected. |
执行demobld.sql脚本
scott@CNHTM> @?/sqlplus/demo/demobld.sql Building demonstration tables. Please wait. Demonstration table build is complete. Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options |
附件:demobld.sql 脚本内容
----------------------demobld.sql begin----------------------- -- -- Copyright (c) Oracle Corporation 1988, 2000. All Rights Reserved. -- -- NAME -- demobld.sql -- -- DESCRIPTION -- This script. creates the SQL*Plus demonstration tables in the -- current schema. It should be STARTed by each user wishing to -- access the tables. To remove the tables use the demodrop.sql -- script. -- -- USAGE -- From within SQL*Plus, enter: -- START demobld.sql SET TERMOUT ON PROMPT Building demonstration tables. Please wait. SET TERMOUT OFF DROP TABLE EMP; D
免责声明: 本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
|