怎么修改ora文件内容|oracle中怎么重建控制文件或是修改控制文件参数

怎么修改ora文件内容|oracle中怎么重建控制文件或是修改控制文件参数的第1张示图

❶ Oracle中listener.ora配置文件无法修改

修改listener.ora配置文件与监听器是否在运行没有关系。正常情况下随时都可以修改。说一回下你用什么工具,在什答么状态下做的修改,还有不能修改的准确错误信息是什么。也有可能你所在的操作系统用户,没有对于该磁盘写权限。

❷ 如何正确配置tnsname.ora文件

正确配置tnsname.ora文件的方法

可以在客户端机器上使用 Oracle Net Configuration Assistant 或 Oracle Net Manager 图形配置工具对客户端进行配置,该配置工具实际上修改 tnsnames.ora 文件。所以我们可以直接修改 tnsnames.ora 文件,下面以直接修改 tnsnames.ora 文件为例:oracle培训

该文件的位置为: …networkadmintnsnames.ora (for windows)

…/network/admin/tnsnames.ora (for unix)

此处,假设服务器名为 testserver,服务名为 orcl.testserver.com,使用的侦听端口为1521,则 tnsnams.ora 文件中的一个test网络服务名(数据库别名)为:

test =

(DESCRIPTION=

(ADDRESS_LIST=

(ADDRESS=(PROTOCOL=TCP)(HOST=testserver)(PORT=1521))

)

(CONNECT_DATA=(SERVICE_NAME=orcl.testserver.com)

)

)

❸ 如何修改sqlnet.ora文件

你的操作系统看如果是windows,直接用记事本打开文件,将expire_time=3最后一行即可。如果是linux/unix:su – oraclecd $ORACLE_HOME/nework/admin/vi sqlnet.ora

❹ 求助关于批处理修改ora文件内容

其实代码这样就满足你的要求了@echo off&setlocal EnableDelayedExpansioncd.>c:\oracle\listener_tmp.orafor /f "delims=" %%a in (c:\oracle\ora92\network\admin\listener.ora) do ( set "str=%%a" set "str=!str:fzjk403-01=%computername%!" >>c:\oracle\listener_tmp.ora echo/!str!)move /y c:\oracle\listener_tmp.ora c:\oracle\ora92\network\admin\listener.ora如果与源文件有不小的差别很大,可能是编码不同的原因,自己检查一下listener.ora文件是不是Unicode编码,如果是这样你还得下载一个转码工具自己关键词GB2Ue.vbs网络或Google搜索此工具http://www..com/s?cl=3&wd=GB2Ue%2Evbs&fr=ikw1000

❺ 如何自动修改tnsname.ora文件内容

可以在客户端机器上使用 Oracle Net Configuration Assistant 或 Oracle Net Manager 图形配置工具对客户端进行回配置,该配置工具实际上修改答 tnsnames.ora 文件。所以我们可以直接修改 tnsnames.ora 文件,下面以直接修改 tnsnames.ora 文件为例:oracle培训

❻ oracle中tnsnames.ora的文件拒绝修改怎么办

在oracle安装文件中找到tnsnames.ora文件,鼠标右击tnsnames.ora选择属性。会弹出“tnsnames属性”窗口。默认在“常规”选项卡。在“tnsnames属性”窗口中,点击“安全”选项卡。在“安全”选项卡下,点击“编辑”,会弹出“tnsnames的权限”窗口。找到并选中“写入”复选框后,点击“应用”。6最后依次点击“确定”。tnsnames.ora文件属性修改完成,可以编辑了!

❼ oracle中怎么重建控制文件或是修改控制文件参数

环境:OS:Red Hat Linux As 5DB:10.2.0.4 在全部控制文件丢失或损坏,而且没有备份的情况下,可以使用重建控制文件的办法打开数据库.以下模拟所有的控制文件丢失的情况下重建控制文件. 1.备份控制文件(数据库mount或是open状态)SQL> select status from v$instance;STATUS————OPENSQL>alter database backup controlfile to trace as '/u01/ftp/bak_controlfile'; 2.删除控制文件[[email protected] oracl]$ rm control01.ctlrm: remove regular file `control01.ctl'? y[[email protected] oracl]$ rm control02.ctlrm: remove regular file `control02.ctl'? y[[email protected] oracl]$ rm control03.ctlrm: remove regular file `control03.ctl'? y 3.关闭数据库后尝试打开数据库SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL> startupORACLE instance started.Total System Global Area 734003200 bytesFixed Size 1221564 bytesVariable Size 218106948 bytesDatabase Buffers 511705088 bytesRedo Buffers 2969600 bytesORA-00205: error in identifying control file, check alert log for more info这个时候数据无法打开,以为我们已经删除了控制文件. 4.查看备份控制文件的内容[[email protected] ftp]$ more bak_controlfile– The following are current System-scope REDO Log Archival related– parameters and can be included in the database initialization file.—- LOG_ARCHIVE_DEST=''– LOG_ARCHIVE_DUPLEX_DEST=''—- LOG_ARCHIVE_FORMAT=%t_%s_%r.dbf—- DB_UNIQUE_NAME="oracl"—- LOG_ARCHIVE_CONFIG='SEND, RECEIVE, NODG_CONFIG'– LOG_ARCHIVE_MAX_PROCESSES=2– STANDBY_FILE_MANAGEMENT=MANUAL– STANDBY_ARCHIVE_DEST=?/dbs/arch– FAL_CLIENT=''– FAL_SERVER=''—- LOG_ARCHIVE_DEST_10='LOCATION=USE_DB_RECOVERY_FILE_DEST'– LOG_ARCHIVE_DEST_10='OPTIONAL REOPEN=300 NODELAY'– LOG_ARCHIVE_DEST_10='ARCH NOAFFIRM NOEXPEDITE NOVERIFY SYNC'– LOG_ARCHIVE_DEST_10='REGISTER NOALTERNATE NODEPENDENCY'– LOG_ARCHIVE_DEST_10='NOMAX_FAILURE NOQUOTA_SIZE NOQUOTA_USED NODB_UNIQUE_NAME'– LOG_ARCHIVE_DEST_10='VALID_FOR=(PRIMARY_ROLE,ONLINE_LOGFILES)'– LOG_ARCHIVE_DEST_STATE_10=ENABLE—- Below are two sets of SQL statements, each of which creates a new– control file and uses it to open the database. The first set opens– the database with the NORESETLOGS option and should be used only if– the current versions of all online logs are available. The second– set opens the database with the RESETLOGS option and should be used– if online logs are unavailable.– The appropriate set of statements can be copied from the trace into– a script file, edited as necessary, and executed when there is a– need to re-create the control file.—- Set #1. NORESETLOGS case—- The following commands will create a new control file and use it– to open the database.– Data used by Recovery Manager will be lost.– Additional logs may be required for media recovery of offline– Use this only if the current versions of all online logs are– available.– After mounting the created controlfile, the following SQL– statement will place the database in the appropriate– protection mode:– ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCESTARTUP NOMOUNTCREATE CONTROLFILE REUSE DATABASE "ORACL" NORESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292LOGFILE GROUP 1 '/u01/app/oracle/oradata/oracl/redo01.log' SIZE 50M, GROUP 2 '/u01/app/oracle/oradata/oracl/redo02.log' SIZE 50M, GROUP 3 '/u01/app/oracle/oradata/oracl/redo03.log' SIZE 50M– STANDBY LOGFILEDATAFILE '/u01/app/oracle/oradata/oracl/system01.dbf', '/u01/app/oracle/oradata/oracl/undotbs01.dbf', '/u01/app/oracle/oradata/oracl/sysaux01.dbf', '/u01/app/oracle/oradata/oracl/users01.dbf'CHARACTER SET WE8ISO8859P1;– Commands to re-create incarnation table– Below log names MUST be changed to existing filenames on– disk. Any one log file from each branch can be used to– re-create incarnation records.– ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/flash_recovery_area/ORACL/archivelog/2012_06_12/o1_mf_1_1_%u_.arc';– ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/flash_recovery_area/ORACL/archivelog/2012_06_12/o1_mf_1_1_%u_.arc';– ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/flash_recovery_area/ORACL/archivelog/2012_06_12/o1_mf_1_1_%u_.arc';– ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/flash_recovery_area/ORACL/archivelog/2012_06_12/o1_mf_1_1_%u_.arc';– Recovery is required if any of the datafiles are restored backups,– or if the last shutdown was not normal or immediate.RECOVER DATABASE– All logs need archiving and a log switch is needed.ALTER SYSTEM ARCHIVE LOG ALL;– Database can now be opened normally.ALTER DATABASE OPEN;– Commands to add tempfiles to temporary tablespaces.– Online tempfiles have complete space information.– Other tempfiles may require adjustment.ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/oracl/temp01.dbf' SIZE 20971520 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;– End of tempfile additions.—- Set #2. RESETLOGS case—- The following commands will create a new control file and use it– to open the database.– Data used by Recovery Manager will be lost.– The contents of online logs will be lost and all backups will– be invalidated. Use this only if online logs are damaged.– After mounting the created controlfile, the following SQL– statement will place the database in the appropriate– protection mode:– ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCESTARTUP NOMOUNTCREATE CONTROLFILE REUSE DATABASE "ORACL" RESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292LOGFILE GROUP 1 '/u01/app/oracle/oradata/oracl/redo01.log' SIZE 50M, GROUP 2 '/u01/app/oracle/oradata/oracl/redo02.log' SIZE 50M, GROUP 3 '/u01/app/oracle/oradata/oracl/redo03.log' SIZE 50M– STANDBY LOGFILEDATAFILE '/u01/app/oracle/oradata/oracl/system01.dbf', '/u01/app/oracle/oradata/oracl/undotbs01.dbf', '/u01/app/oracle/oradata/oracl/sysaux01.dbf', '/u01/app/oracle/oradata/oracl/users01.dbf'CHARACTER SET WE8ISO8859P1;– Commands to re-create incarnation table– Below log names MUST be changed to existing filenames on– disk. Any one log file from each branch can be used to– re-create incarnation records.– ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/flash_recovery_area/ORACL/archivelog/2012_06_12/o1_mf_1_1_%u_.arc';– ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/flash_recovery_area/ORACL/archivelog/2012_06_12/o1_mf_1_1_%u_.arc';– ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/flash_recovery_area/ORACL/archivelog/2012_06_12/o1_mf_1_1_%u_.arc';– ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/flash_recovery_area/ORACL/archivelog/2012_06_12/o1_mf_1_1_%u_.arc';– Recovery is required if any of the datafiles are restored backups,– or if the last shutdown was not normal or immediate.RECOVER DATABASE USING BACKUP CONTROLFILE– Database can now be opened zeroing the online logs.ALTER DATABASE OPEN RESETLOGS;– Commands to add tempfiles to temporary tablespaces.– Online tempfiles have complete space information.– Other tempfiles may require adjustment.ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/oracl/temp01.dbf' SIZE 20971520 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;– End of tempfile additions.–5.从备份控制文件中提取我们需要的部分,这里我们选择RESETLOGS,将如下内容保存文件为create_confile.sql CREATE CONTROLFILE REUSE DATABASE "ORACL" RESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292LOGFILE GROUP 1 '/u01/app/oracle/oradata/oracl/redo01.log' SIZE 50M, GROUP 2 '/u01/app/oracle/oradata/oracl/redo02.log' SIZE 50M, GROUP 3 '/u01/app/oracle/oradata/oracl/redo03.log' SIZE 50M– STANDBY LOGFILEDATAFILE '/u01/app/oracle/oradata/oracl/system01.dbf', '/u01/app/oracle/oradata/oracl/undotbs01.dbf', '/u01/app/oracle/oradata/oracl/sysaux01.dbf', '/u01/app/oracle/oradata/oracl/users01.dbf'CHARACTER SET WE8ISO8859P1; 6.执行create_confile.sqlSQL>set sqlblanklines on — 因为文件中有空行,需要将该选项打开,否则执行的时候报语法错误SQL>@/u01/ftp/create_confile.sql SQL> alter database open resetlogs;Database altered. 说明:重建控制文件后,若备份信息是存储在控制文件的,该信息会丢失.

❽ oracle 11G数据库修改 数据库实例读取的数据文件位置

首先,导入导出不一定用命令,你电脑中毒导致你命令不好使,可能是环境变量等有问题出现回,答你安装oracle 的文件磁盘没有损坏的情况,数据库可以正常运行的情况,你可一选择用快捷方式的方式去将,实例整个导出来

安装目录下有一堆导出的快捷方式,不一定必须使用cmd 按命令去导出

按照你描述的处理方式,具体是需要改控制文件还是怎么样的,这个就不了解,毕竟没有处理过你这种情况,抱歉爱莫能助。

❾ ora24324解决办法

同事在Win XP sp2上安装Oracle DataBase 10g Enterprise Edition Release 10.1.0.2.0后,在创建数据库是发生如下错误:

开始是出现一个错误提示对话框:

ORA-28547:连接服务器失败,可能是Net8管理错误。

忽略这个错误后又出现一个错误提示对话框:

ORA-24324:未初始化服务句柄

忽略这个错误后又接连出现两个错误:

ORA-01041: 内部错误,hostdef扩展名不存在

ORA-01034: ORACE not available

最后出现的一个错误提示框是:

由于一下错误,Enterprise Manager配置失败,‘job queue_process’必须大于等于1…..

这时数据库创建失败,在oradata文件并没有发现预想的数据文件。

工具/原料

Win XP系统

Oracle DataBase 10g

方法/步骤

修改oracle的网络配置文件,具体做法是:在oracle安装目录下搜索sqlnet.ora文件,一般在$NETWORKADMIN目录下,

用记事本打开把文件中的一行:

SQLNET_AUTHENTICATION_SERVICES= (NTS)

修改为:

SQLNET_AUTHENTICATION_SERVICES= (NONE)

修改监听器配置文件,具体做法是: 在oracle安装目录下搜索listener.ora文件,一般在$NETWORKADMIN目录下,把主机名用ip地址代替,例如(ADDRESS = (PROTOCOL = TCP)(HOST = HBONLINE1)(PORT = 1523))改为(ADDRESS = (PROTOCOL = TCP)(HOST = 168.168.168.42)(PORT = 1523))。

3

修改这两个文件后,顺利创建数据库。

❿ 连接不上oracle数据库怎么修改tnsnames.ora

前段时间在使用数据库时,由于工作的需要,必须在数据库中添加一个新的连接串。利用以往的方法,在数据库中找到tnsnames.ora文件后,加入连接串。但是令我意外的是,当文件被修改后,却无法进行保存。后来经过在网上查找资料,这种现象产生的原因可能是因为该文件被加密过,所以不允许修改。解决的方法如下: 1、首先打开tnsnames.ora文件2、右键该文件,点击属性,并进入到常规选项中 3、点击“安全页签”,可以选择“编辑”按钮,然后进入到新的界面4、最后将写入操作的“允许”列的勾上,并点击应用,即可以将tnsnames.ora修改后并保存。

未经允许不得转载:山九号 » 怎么修改ora文件内容|oracle中怎么重建控制文件或是修改控制文件参数

赞 (0)