当前位置:首页 » 操作系统 » oracle10g数据库创建

oracle10g数据库创建

发布时间: 2022-09-24 17:07:44

⑴ 在Oracle 10g中创建数据库的方法有哪些它们分别由哪些优点和缺点

一般分为图形化界面(OUI)和silent模式。
图形界面比较直观,你能看到各个component如何设置,缺点是要开图形化界面,而且对于客制化的部分需要写脚本
silent模式主要使用数据库创建脚本,不需要人工过多干涉,只要把脚本完善即可。并且可以在建库同时把客制化部分加进来。缺点是需要熟悉脚本设置

⑵ Oracle Database 10g Express Edition 如何创建一个数据库

按照步骤走,挺灵活的。但是要在选择数据库模版时注意一下,有三个选项,选择第二项可以定义数据库的目录,然后在自己创建主目录下分别创建自己的子目录,例如我,有REDOLOGS、ARCHIVELOGS、DATAFILES、CONTROLFILES等目录,同时也要为FLASHRECOVERY指定目录,完全可以自定义。在最后一步,就是显示所有文件目录的页面上可以定义。但是要注意,10G的DBCA好像有些BUG,我曾经出现创建不成功的情况。但步骤应该是这样的。包括数据库的NLS类型,建议在创建时(如果是中文系统)定义为AMERICAN_AMERICA.WE8IS08859P1.因为用默认中文在CMD下会有显示问题。当然也可以尝试用CREATE DATABASE脚本创建,也比较灵活。更详细的答案: http://www..com/s?bs=Oracle+Database+10g+Express+Edition+%C8%E7%BA%CE%B4%B4%BD%A8%D2%BB%B8%F6%CA%FD%BE%DD%BF%E2&f=8&wd=Oracle10g%C8%E7%BA%CE%B4%B4%BD%A8%D2%BB%B8%F6%CA%FD%BE%DD%BF%E2

⑶ 在Oracle 10g中创建数据库的方法有哪些它们分别由哪些优点和缺点

创建表语法:
create
table
表名(
字段名1
字段类型,
字段名2
字段类型,
.....
字段名n
字段类型
);
案例:创建学生表,包括字段
学号,姓名,性别,年龄,生日,电话
sql>
create
table
student(
2
no
varchar2(10),
3
name
varchar2(20),
4
sex
char(2),
5
age
number(3),
6
birthday
date,
7
tel
varchar2(20)
8
);
*
desc
表名;//查询表的结构
//采用复制表的方式创建表
create
table
emp2
as
select
*
from
emp;
//疯狂复制法
insert
into
emp2
select
*
from
emp2;
常采用第一种:直接创建表

⑷ oracle数据库10g安装步骤

  • 运行解压缩出的 Oracle 10g 安装程序。打开oracle10g的安装目录,找到setup.exe,双击即可进入安装状态

⑸ 如何手工创建一个Oracle 10g数据库

1.首先要有一个参数文件,这个我利用了历史的参数文件
[oracle@dbstatsvr dbstat]$ sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.2.0 - Proction on Thu Sep 17 18:21:20 2009
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 1778384896 bytes
Fixed Size 1261332 bytes
Variable Size 301990124 bytes
Database Buffers 1459617792 bytes
Redo Buffers 15515648 bytes

2.创建脚本,参考其他数据库,编写一个
SQL> create database dbstat
2 logfile group 1 ('/data1/dbstat/redo1.log') size 50M,
3 group 2 ('/data1/dbstat/redo2.log') size 50M,
4 group 3 ('/data1/dbstat/redo3.log') size 50M
5 character set ZHS16GBK
6 national character set utf8
7 datafile '/data1/dbstat/system.dbf'
8 size 500M autoextend on next 10M maxsize unlimited extent management local
12 sysaux datafile '/data1/dbstat/sysaux.dbf'
13 size 500M autoextend on next 10M maxsize unlimited
17 undo tablespace undotbs1
18 datafile '/data1/dbstat/undo.dbf' size 100M
20 default temporary tablespace temp
21 tempfile '/data1/dbstat/temp.dbf' size 100M;
Database created.
3.在后台跑一跑其他脚本:
[oracle@dbstatsvr dbstat]$ nohup sqlplus "/ as sysdba" @?/rdbms/admin/catalog.sql &
[1] 5399
[oracle@dbstatsvr dbstat]$ nohup: appending output to `nohup.out'
[oracle@dbstatsvr dbstat]$
[1]+ Stopped nohup sqlplus "/ as sysdba" @?/rdbms/admin/catalog.sql
[oracle@dbstatsvr dbstat]$
[oracle@dbstatsvr dbstat]$ nohup sqlplus "/ as sysdba" @?/rdbms/admin/catproc.sql &
[2] 5402
[oracle@dbstatsvr dbstat]$ nohup: appending output to `nohup.out'

这样就基本上有了一个数据库的雏形了。
4.还有一个脚本要运行
这是数据库用普通用户登录会出现一个错误,提示以SYSTEM运行PUPBLD.SQL脚本:
SQL> connect sms/sms
Error accessing PRODUCT_USER_PROFILE
Warning: Proct user profile information not loaded!
You may need to run PUPBLD.SQL as SYSTEM
Connected.
这个脚本会创建一个表,用于限制用户执行某些特定的SQL*PLUS命令:
SQL> @?/sqlplus/admin/pupbld.sql
DROP SYNONYM PRODUCT_USER_PROFILE
*
ERROR at line 1:
ORA-01434: private synonym to be dropped does not exist
DATE_VALUE FROM PRODUCT_USER_PROFILE
*
ERROR at line 3:
ORA-00942: table or view does not exist
DROP TABLE PRODUCT_USER_PROFILE
*
ERROR at line 1:
ORA-00942: table or view does not exist
ALTER TABLE SQLPLUS_PRODUCT_PROFILE ADD (LONG_VALUE LONG)
*
ERROR at line 1:
ORA-00942: table or view does not exist
Table created.
DROP TABLE PRODUCT_PROFILE
*
ERROR at line 1:
ORA-00942: table or view does not exist
DROP VIEW PRODUCT_PRIVS
*
ERROR at line 1:
ORA-00942: table or view does not exist
View created.
Grant succeeded.
DROP PUBLIC SYNONYM PRODUCT_PROFILE
*
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist
Synonym created.
DROP SYNONYM PRODUCT_USER_PROFILE
*
ERROR at line 1:
ORA-01434: private synonym to be dropped does not exist
Synonym created.
DROP PUBLIC SYNONYM PRODUCT_USER_PROFILE
*
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist
Synonym created.
SQL> connect sms/sms
Connected.

⑹ 一般的应用系统在生产环境下Oracle10g数据库的创建全过程

1、安装oracle软件,直接点下一步就行了,oracle安装完了以后
2、然后安装数据库,默认orcl,也可以改成别的名字,最好把用户名密码记下来别搞忘了
3、登陆数据库,使用数据库工具创建表空间,设置一个最小值,让它自动增长就可以了,最大值就不用设置了,因为到时候你不能估计你数据库到底有多大
4、创建一个草鸡用户,然后把表空间分配给这个用户,以后操作数据库就方便了,怎么分配权限就看你系统怎么使用了
5、备份和使用很简单的,就cmd里面使用imp命令就可以对数据库进行导出了,导入也差不多

⑺ oracle10G怎么里怎么创建多个数据库

一个数据库创建多个实例
1. 先要关闭数据库(进程和内存关闭)
[Oracle@oracle_2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Proction on TueNov 12 20:34:53 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release10.2.0.1.0 - Proction
With the Partitioning, OLAP and Data Mining options
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
2. 设置环境变量
[oracle@oracle_2 ~]$ vi .bash_profile
此时环境变量已经设置好了
3. 创建目录
i. 创建相关文件
此时我们可以看见已经有了相关目录,那是我们之前创建的实例ORCL的相关目录
创建目录是采用了批量创建目录{a,b,c,u}mp
[oracle@oracle_2 ~]$ cd $ORACLE_BASE
[oracle@oracle_2 oracle]$ ls
admin flash_recovery_area oradata oraInventory proct
[oracle@oracle_2 oracle]$
[oracle@oracle_2 oracle]$ mkdir -p admin/ORA10G/{a,b,c,u}mp
[oracle@oracle_2 oracle]$ ls
admin flash_recovery_area oradata oraInventory proct
[oracle@oracle_2 oracle]$ cd admin/
[oracle@oracle_2 admin]$ ls
ORA10G ORCL
[oracle@oracle_2 admin]$ cd ORA10G/
[oracle@oracle_2 ORA10G]$ ls
amp bmp cmp ump
[oracle@oracle_2 ORA10G]$
[oracle@oracle_2 ORA10G]$ ls
amp bmp cmp ump
[oracle@oracle_2 ORA10G]$ cd ..
[oracle@oracle_2 admin]$ ls
ORA10G ORCL
[oracle@oracle_2 admin]$ cd ..
[oracle@oracle_2 oracle]$ ls
admin flash_recovery_area oradata oraInventory proct
[oracle@oracle_2 oracle]$ mkdir -p oradata/ORA10G
[oracle@oracle_2 oracle]$
ii. 创建密码文件
创建密码文件需要到ORACLE_HOME/dbs目录下创建
[oracle@oracle_2 10.2.0]$ cd $ORACLE_HOME/dbs
[oracle@oracle_2 dbs]$ ls
hc_ORCL.dat initdw.ora init.ora lkORCL orapwORCL spfileORCL.ora
[oracle@oracle_2 dbs]$ orapwd
Usage: orapwd file=<fname>password=<password> entries=<users> force=<y/n>
where
file -name of password file (mand),
password- password for SYS (mand),
entries -maximum number of distinct DBA and force - whether to overwrite existing file (opt),
OPERs (opt),
There areno spaces around the equal-to (=) character.
[oracle@oracle_2 dbs]$ orapwd file=orapwORA10Gpassword=oracle entries=30
[oracle@oracle_2 dbs]$ ls
hc_ORCL.dat init.ora orapwORA10G spfileORCL.ora
initdw.ora lkORCL orapwORCL
[oracle@oracle_2 dbs]$
[oracle@oracle_2 dbs]$ cat init.ora |grep -v^#|grep -v ^$ >initORA10G.ora
[oracle@oracle_2 dbs]$ ls
hc_ORCL.dat init.ora lkORCL orapwORCL
initdw.ora initORA10G.ora orapwORA10G spfileORCL.ora
[oracle@oracle_2 dbs]$
[oracle@oracle_2 dbs]$ vi initORA10G.ora
将内容改的和下面的一样
db_name=ORA10G
db_files = 80 # SMALL
db_file_multiblock_read_count = 8 #SMALL
log_checkpoint_interval = 10000
processes = 50 # SMALL
parallel_max_servers = 5 #SMALL
log_buffer = 32768 # SMALL
max_mp_file_size = 10240 # limit trace file size to 5 Meg each
global_names = false
control_files =(/u01/app/oracle/oradata/ORA10G/ora_control1.ctl,/u01/app/oracle/oradata/ORA10G/ora_control2.ctl)
sga_max_size=300m
sga_target=300m
4. 启动实例为ORA10G的数据库
[oracle@oracle_2 dbs]$ export $ORACLE_SID=ORA10G
[oracle@oracle_2 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Proction on TueNov 12 21:08:55 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SYS@ORA10G>
SYS@ORA10G>create spfile from pfile;
File created.
SYS@ORA10G>startup nomount;
ORACLE instance started.
Total System Global Area 314572800 bytes
Fixed Size 1219184 bytes
Variable Size 96470416 bytes
Database Buffers 213909504 bytes
Redo Buffers 2973696 bytes
SYS@ORA10G>
SYS@ORA10G>show parameter undo
NAME TYPE VALUE
------------------------------------ -----------------------------------------
undo_management string MANUAL
undo_retention integer 900
undo_tablespace string
SYS@ORA10G>
修改参数,由于undo_management参数为静态参数,所以需要加上scope=spfile
SYS@ORA10G>alter system set undo_management=autoscope=spfile;
System altered.
SYS@ORA10G>show parameter undo
NAME TYPE VALUE
------------------------------------ -----------------------------------------
undo_management string MANUAL
undo_retention integer 900
undo_tablespace string
SYS@ORA10G>shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
此时发现并没有更改,是由于静态参数需要重启才有效
SYS@ORA10G>startup nomount;
ORACLE instance started.
Total System Global Area 314572800 bytes
Fixed Size 1219184 bytes
Variable Size 96470416 bytes
Database Buffers 213909504 bytes
Redo Buffers 2973696 bytes
SYS@ORA10G>
此时只是改了spfile的参数还需要改pfile的参数
SYS@ORA10G>create pfile from spfile;
File created.
SYS@ORA10G>
5. 多个实例的切换
i. 实例为ORCL启动数据库
[oracle@oracle_2 dbs]$ export ORACLE_SID=ORCL
[oracle@oracle_2 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Proction on TueNov 12 21:19:19 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SYS@ORCL>
ii. 实例为ORCL10G启动数据库
SYS@ORCL>exit
Disconnected
[oracle@oracle_2 dbs]$ export ORACLE_SID=ORA10G
[oracle@oracle_2 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Proction on TueNov 12 21:24:54 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release10.2.0.1.0 - Proction
With the Partitioning, OLAP and Data Mining options
SYS@ORA10G>

⑻ 、oracle10g怎么创建数据库

方法1.
开始/程序->Oracle - OraDb10g_home1->配置和移植工具->Database Configuration Assistant
一步一步走下去,最后生成脚本即可,这样的脚本可以多次使用,每次只需要根据需求,修改相关参数即可
方法2、
直接写sql语句,create database dtabase_name这个比较麻烦,而且容易出问题!

⑼ oracle 10g在安装时让创建启动数据库是什么意思

oracle 10g在安装时让创建启动数据库的意思是在安装oracle软件过程中由安装程序为你创建一个数据库实例。
具体解释如下:
1、如果选择此选项,则安装程序会为你安装一个数据库实例,并将此实例运行,即OPEN状态,你可以在系统运行的本地服务中查看到此服务。
2、如果不选择此选项,则安装程序会为你安装一个数据库实例,则安装程序只为你安装oracle软件。你可以在oracle程序的菜单中,配置和迁移工具部分,选择database configuration assistant进行手动安装自己的数据库实例。

热点内容
html文件上传表单 发布:2024-09-17 03:08:02 浏览:783
聊天软件编程 发布:2024-09-17 03:00:07 浏览:725
linuxoracle安装路径 发布:2024-09-17 01:57:29 浏览:688
两个安卓手机照片怎么同步 发布:2024-09-17 01:51:53 浏览:207
cf编译后没有黑框跳出来 发布:2024-09-17 01:46:54 浏览:249
安卓怎么禁用应用读取列表 发布:2024-09-17 01:46:45 浏览:524
win10设密码在哪里 发布:2024-09-17 01:33:32 浏览:662
情逢敌手迅雷下载ftp 发布:2024-09-17 01:32:35 浏览:337
安卓如何让软件按照步骤自动运行 发布:2024-09-17 01:28:27 浏览:197
Z包解压命令 发布:2024-09-17 01:27:51 浏览:221