Windows下Oracle创建数据库的3种方式

本文详细介绍了在Windows操作系统中创建Oracle数据库的两种方法:使用Database Configuration Assistant (DBCA) 和通过CREATE DATABASE SQL语句。DBCA提供图形化界面和命令行选项,适合自动化创建,而CREATE DATABASE SQL语句则更手动,适合在脚本中使用。文章提供了创建数据库的具体步骤,包括设置环境变量、选择认证方法、创建初始化参数文件等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.   Creating a Database with DBCA

DatabaseConfiguration Assistant (DBCA) is the preferred way to create a database,because it is a more automated approach, and your database is ready to use whenDBCA completes. DBCA can be launched by the Oracle Universal Installer (OUI),depending upon the type of install that you select. You can also launch DBCA asa standalone tool at any time after Oracle Database installation. You can runDBCA in interactive mode or noninteractive/silent mode. Interactivemodeprovides a graphical interface and guided workflow for creating and configuringa database. Noninteractive/silent mode enables you to script database creation.You can run DBCA in noninteractive/silent mode by specifying command-linearguments, a response file, or both.

1.1 Creating a Database with Interactive DBCA












1.2  Creating a Database with Noninteractive/Silent DBCA

The following examplecreates a database by passing command-line arguments to DBCA:

dbca -silent -createDatabase-templateName General_Purpose.dbc

-gdbname ora11g -sidora11g -responseFile NO_VALUE -characterSet AL32UTF8

-memoryPercentage 30-emConfiguration LOCAL

Enter SYSTEM userpassword:

password

Enter SYS userpassword:

password

Copying database files

1% complete

3% complete

...

To ensure completely silent operation, you can redirect stdout to a file.In this case, however, you must supply passwords for the administrativeaccounts in command-line arguments or the response file.

To view brief help for DBCA command-line arguments, enter the followingcommand:

dbca -help

For more detailed argument information, including defaults, view theresponse file template found on your distribution media. Appendix A of yourplatform installation guide provides the name and location of this file.

 dbca -help

dbca  [-silent | -progressOnly |-customCreate] {<command> <options> }  | { [<command> [options] ]-responseFile  <response file > }[-continueOnNonFatalErrors <true | false>]

有关详细信息, 请参阅手册。

可以输入以下命令之一:

 

通过指定以下参数创建数据库:

-createDatabase

-templateName <默认位置或完整模板路径中现有模板的名称>

[-cloneTemplate]

-gdbName <全局数据库名>

[-sid <数据库系统标识符>]

[-sysPassword <SYS 用户口令>]

[-systemPassword <SYSTEM 用户口令>]

[-emConfiguration <CENTRAL|LOCAL|ALL|NONE>

-dbsnmpPassword <DBSNMP 用户口令>

-sysmanPassword <SYSMAN 用户口令>

[-hostUserName <EM 备份作业的主机用户名>

-hostUserPassword <EM 备份作业的主机用户口令>

-backupSchedule <使用 hh:mm 格式的每日备份计划>]

[-centralAgent <Enterprise Manager 中央代理主目录>]]

[-disableSecurityConfiguration <ALL|AUDIT|PASSWORD_PROFILE|NONE>

[-

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值