免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: spouter
打印 上一主题 下一主题

第一次装oracle 10g,不能创建ora_control1问题。 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2011-09-14 09:16 |只看该作者
本帖最后由 spouter 于 2011-09-14 09:26 编辑

这个目录是有的,求解下:
[oracle@srv131 dbs]$ ll /data/oracle/product/10.2.0/db_1/dbs/
总计 68
-rw-rw---- 1 oracle oinstall  1552 09-13 19:48 hc_UC.dat
-rw-r----- 1 oracle oinstall 12920 2001-05-03 initdw.ora
-rw-r----- 1 oracle oinstall  8385 1998-09-11 init.ora
-rw-r----- 1 oracle oinstall  8386 09-13 18:12 initUC.ora
-rw-rw---- 1 oracle oinstall    24 09-13 18:14 lkDEFAULT

论坛徽章:
0
12 [报告]
发表于 2011-09-14 10:26 |只看该作者
试试在使用操作系统命令创建一个空文件,将权限和属主设置一下。看看可不可以。

论坛徽章:
0
13 [报告]
发表于 2011-09-14 10:48 |只看该作者
创建了以下几个文件,还是不行啊
[oracle@srv131 dbs]$  ll /data/oracle/product/10.2.0/db_1/dbs/
总计 84
-rw-rw---- 1 oracle oinstall  1552 09-14 10:32 hc_UC.dat
-rw-r----- 1 oracle oinstall 12920 2001-05-03 initdw.ora
-rw-r----- 1 oracle oinstall  8385 1998-09-11 init.ora
-rw-r----- 1 oracle oinstall  8386 09-14 10:31 initUC.ora
-rw-rw---- 1 oracle oinstall    24 09-14 10:32 lkDEFAULT
-rwxrwxrwx 1 oracle oinstall     0 09-14 10:37 rbs01.dbs
-rwxrwxrwx 1 oracle oinstall     0 09-14 10:36 system01.dbf
-rwxrwxrwx 1 oracle oinstall     0 09-14 10:37 temp01.dbs
-rwxrwxrwx 1 oracle oinstall     0 09-14 10:37 users01.dbs



SQL> CREATE CONTROLFILE
  2     SET DATABASE DEFAULT
  3     LOGFILE GROUP 1 ('/data/oracle/product/10.2.0/db_1/dbs/redo01_01.log',
                    '/data/oracle/product/10.2.0/db_1/dbs/redo01_02.log'),
           GROUP 2 ('/data/oracle/product/10.2.0/db_1/dbs/redo02_01.log',
                    '/data/oracle/product/10.2.0/db_1/dbs/redo02_02.log'),
           GROUP 3 ('/data/oracle/product/10.2.0/db_1/dbs/redo03_01.log',
                    '/data/oracle/product/10.2.0/db_1/dbs/redo03_02.log')
   RESETLOGS
   DATAFILE '/data/oracle/product/10.2.0/db_1/dbs/system01.dbf' SIZE 3M,
  4    5    6    7    8    9   10   11  '/data/oracle/product/10.2.0/db_1/dbs/rbs01.dbs' SIZE 5M,
12  '/data/oracle/product/10.2.0/db_1/dbs/users01.dbs' SIZE 5M,
13  '/data/oracle/product/10.2.0/db_1/dbs/temp01.dbs' SIZE 5M
14   MAXLOGFILES 50
15   MAXLOGMEMBERS 3
16   MAXLOGHISTORY 400
17   MAXDATAFILES 200
18   MAXINSTANCES 6
19   ARCHIVELOG;
CREATE CONTROLFILE
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01565: error in identifying file
'/data/oracle/product/10.2.0/db_1/dbs/system01.dbf'
ORA-27047: unable to read the header block of file
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 1

论坛徽章:
0
14 [报告]
发表于 2011-09-14 14:55 |只看该作者
如果是这样,我只能理解为CREATE CONTROLFILE命令只能在控制文件损坏后使用,在没有建库之前不能使用。谢谢,我也从中学到东西。共同提高吧,哈!

论坛徽章:
0
15 [报告]
发表于 2011-09-15 09:22 |只看该作者
那如果没建库,又没有control控制文件怎么样;

论坛徽章:
59
2015七夕节徽章
日期:2015-08-24 11:17:25ChinaUnix专家徽章
日期:2015-07-20 09:19:30每周论坛发贴之星
日期:2015-07-20 09:19:42ChinaUnix元老
日期:2015-07-20 11:04:38荣誉版主
日期:2015-07-20 11:05:19巳蛇
日期:2015-07-20 11:05:26CU十二周年纪念徽章
日期:2015-07-20 11:05:27IT运维版块每日发帖之星
日期:2015-07-20 11:05:34操作系统版块每日发帖之星
日期:2015-07-20 11:05:36程序设计版块每日发帖之星
日期:2015-07-20 11:05:40数据库技术版块每日发帖之星
日期:2015-07-20 11:05:432015年辞旧岁徽章
日期:2015-07-20 11:05:44
16 [报告]
发表于 2011-09-15 12:16 |只看该作者
回复 15# spouter


    那你应该先运行dbca创建数据库啊。

论坛徽章:
0
17 [报告]
发表于 2011-09-15 13:10 |只看该作者
同意版主!

论坛徽章:
0
18 [报告]
发表于 2011-09-15 15:39 |只看该作者
这个不是一般的复杂

论坛徽章:
0
19 [报告]
发表于 2011-09-15 16:39 |只看该作者
按照网上的流程,我只安装数据库没建库,然后的步骤是:
1、cp $ORACLE_HOME/dbs/init.ora $ORACLE_HOME/dbs/initUC.ora
2、vi $ORACLE_HOME/dbs/initUC.ora将其中的shared_pool_size = 35000000改成62198988;
3、SQL> startup
ORACLE instance started.
Total System Global Area  159383552 bytes
Fixed Size                  2018744 bytes
Variable Size              88080968 bytes
Database Buffers           67108864 bytes
Redo Buffers                2174976 bytes
ORA-00205: error in identifying control file, check alert log for more info
4、没有control file,也没法重建。

现在按各位的说法我要建立数据库,怎么建能详细说说嘛?

论坛徽章:
0
20 [报告]
发表于 2011-09-15 17:43 |只看该作者
1.dbca
在Linux图形页面下,使用oracle用户身份登录,输入dbca就可以启动dbca页面。

2.手工建库
手工建库的前提条件
●数据库软件已经安装完毕
●使用sqlplus命令可以正常进入SQL >
2.准备工作
●建立口令文件
[oracle@localhost/]$file=/u01/app/oracle/product/11.1.0/db_1/bin/orapworcl password=oracle
●修改pfile文件,在安装Oracle软件的过程中,已经建立了一个pfile文件,你可以在/u01/app/oracle/product/11.1.0/db_1/dbs目录下找到它,先将它的名字修改成init+库名字.ora的格式,在我们这个例子里我们使用名字initorcl.ora。
●initorcl.ora文件内容

# $Header: init.ora 06-aug-98.10:24:40 atsukerm Exp $
#
# Copyright (c) 1991, 1997, 1998 by Oracle Corporation
# NAME
# init.ora
# FUNCTION
# NOTES
# MODIFIED
# atsukerm 08/06/98 - fix for 8.1.
# hpiao 06/05/97 - fix for 803
# glavash 05/12/97 - add oracle_trace_enable comment
# hpiao 04/22/97 - remove ifile=, events=, etc.
# alingelb 09/19/94 - remove vms-specific stuff
# dpawson 07/07/93 - add more comments regarded archive start
# maporter 10/29/92 - Add vms_sga_use_gblpagfile=TRUE
# jloaiza 03/07/92 - change ALPHA to BETA
# danderso 02/26/92 - change db_block_cache_protect to _db_block_cache_p
# ghallmar 02/03/92 - db_directory -> db_domain
# maporter 01/12/92 - merge changes from branch 1.8.308.1
# maporter 12/21/91 - bug 76493: Add control_files parameter
# wbridge 12/03/91 - use of %c in archive format is discouraged
# ghallmar 12/02/91 - add global_names=true, db_directory=us.acme.com
# thayes 11/27/91 - Change default for cache_clone
# jloaiza 08/13/91 - merge changes from branch 1.7.100.1
# jloaiza 07/31/91 - add debug stuff
# rlim 04/29/91 - removal of char_is_varchar2
# Bridge 03/12/91 - log_allocation no longer exists
# Wijaya 02/05/91 - remove obsolete parameters
#
##############################################################################
# Example INIT.ORA file
#
# This file is provided by Oracle Corporation to help you customize
# your RDBMS installation for your site. Important system parameters
# are discussed, and example settings given.
#
# Some parameter settings are generic to any size installation.
# For parameters that require different values in different size
# installations, three scenarios have been provided: SMALL, MEDIUM
# and LARGE. Any parameter that needs to be tuned according to
# installation size will have three settings, each one commented
# according to installation size.
#
# Use the following table to approximate the SGA size needed for the
# three scenarious provided in this file:
#
# -------Installation/Database Size------
# SMALL MEDIUM LARGE
# Block 2K 4500K 6800K 17000K
# Size 4K 5500K 8800K 21000K
#
# To set up a database that multiple instances will be using, place
# all instance-specific parameters in one file, and then have all
# of these files point to a master file using the IFILE command.
# This way, when you change a public
# parameter, it will automatically change on all instances. This is
# necessary, since all instances must run with the same value for many
# parameters. For example, if you choose to use private rollback segments,
# these must be specified in different files, but since all gc_*
# parameters must be the same on all instances, they should be in one file.
#
# INSTRUCTIONS: Edit this file and the other INIT files it calls for
# your site, either by using the values provided here or by providing
# your own. Then place an IFILE= line into each instance-specific
# INIT file that points at this file.
#
# NOTE: Parameter values suggested in this file are based on conservative
# estimates for computer memory availability. You should adjust values upward
# for modern machines.
#
# You may also consider using Database Configuration Assistant tool (DBCA)
# to create INIT file and to size your initial set of tablespaces based
# on the user input.
###############################################################################

# replace DEFAULT with your database name
db_name=orcl

db_files = 80 # SMALL
# db_files = 400 # MEDIUM
# db_files = 1500 # LARGE

db_file_multiblock_read_count = 8 # SMALL
# db_file_multiblock_read_count = 16 # MEDIUM
# db_file_multiblock_read_count = 32 # LARGE

db_block_buffers = 100 # SMALL
# db_block_buffers = 550 # MEDIUM
# db_block_buffers = 3200 # LARGE

shared_pool_size = 102341017 # SMALL
# shared_pool_size = 5000000 # MEDIUM
# shared_pool_size = 9000000 # LARGE

log_checkpoint_interval = 10000

processes = 50 # SMALL
# processes = 100 # MEDIUM
# processes = 200 # LARGE

parallel_max_servers = 5 # SMALL
# parallel_max_servers = 4 x (number of CPUs) # MEDIUM
# parallel_max_servers = 4 x (number of CPUs) # LARGE

log_buffer = 32768 # SMALL
# log_buffer = 32768 # MEDIUM
# log_buffer = 163840 # LARGE

# audit_trail = true # if you want auditing
# timed_statistics = true # if you want timed statistics
max_dump_file_size = 10240 # limit trace file size to 5 Meg each

# Uncommenting the line below will cause automatic archiving if archiving has
# been enabled using ALTER DATABASE ARCHIVELOG.
# log_archive_start = true
# log_archive_dest = disk$rdbms:[oracle.archive]
# log_archive_format = "T%TS%S.ARC"

# If using private rollback segments, place lines of the following
# form in each of your instance-specific init.ora files:
# rollback_segments = (name1, name2)

# If using public rollback segments, define how many
# rollback segments each instance will pick up, using the formula
# # of rollback segments = transactions / transactions_per_rollback_segment
# In this example each instance will grab 40/5 = 8:
# transactions = 40
# transactions_per_rollback_segment = 5

# Global Naming -- enforce that a dblink has same name as the db it connects to
global_names = TRUE

# Edit and uncomment the following line to provide the suffix that will be
# appended to the db_name parameter (separated with a dot) and stored as the
# global database name when a database is created. If your site uses
# Internet Domain names for e-mail, then the part of your e-mail address after
# the '@' is a good candidate for this parameter value.

# db_domain = us.acme.com # global database name is db_name.db_domain

# FOR DEVELOPMENT ONLY, ALWAYS TRY TO USE SYSTEM BACKING STORE
# vms_sga_use_gblpagfil = TRUE

# FOR BETA RELEASE ONLY. Enable debugging modes. Note that these can
# adversely affect performance. On some non-VMS ports the db_block_cache_*
# debugging modes have a severe effect on performance.

#_db_block_cache_protect = true # memory protect buffers
#event = "10210 trace name context forever, level 2" # data block checking
#event = "10211 trace name context forever, level 2" # index block checking
#event = "10235 trace name context forever, level 1" # memory heap checking
#event = "10049 trace name context forever, level 2" # memory protect cursors

# define parallel server (multi-instance) parameters
#ifile = ora_system:initps.ora

# define two control files by default
control_files = (ora_control1, ora_control2)

# Uncomment the following line if you wish to enable the Oracle Trace product
# to trace server activity. This enables scheduling of server collections
# from the Oracle Enterprise Manager Console.
# Also, if the oracle_trace_collection_name parameter is non-null,
# every session will write to the named collection, as well as enabling you
# to schedule future collections from the console.

# oracle_trace_enable = TRUE

# Uncomment the following line, if you want to use some of the new 8.1
# features. Please remember that using them may require some downgrade
# actions if you later decide to move back to 8.0.

#compatible = 8.1.0

这些工作完成后,就可以开始建立数据库了。

2.创建数据库
[oracle@localhost ~]$ sqlplus /nolog

SQL*Plus: Release 11.1.0.6.0 - Production on Fri Nov 20 12:11:49 2009

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

SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.

Total System Global Area 138100736 bytes
Fixed Size 1298388 bytes
Variable Size 130023468 bytes
Database Buffers 4194304 bytes
Redo Buffers 2584576 bytes
SQL> create database orcl;

Database created.

3.测试数据库
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 138100736 bytes
Fixed Size 1298388 bytes
Variable Size 130023468 bytes
Database Buffers 4194304 bytes
Redo Buffers 2584576 bytes
Database mounted.
Database opened.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP