oracle新增实例名,改Oracle实例名

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> quit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@localhost Desktop]$ cd

[oracle@localhost ~]$ vim .bashrc

[oracle@localhost ~]$ cat .bashrc

# .bashrc

# Source global definitions

if [ -f /etc/bashrc ]; then

. /etc/bashrc

fi

# User specific aliases and functions

export ORACLE_SID=orcl_new #将实例名改为orcl_new

export ORACLE_BASE=/oracle/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

export LIBPATH=$ORACLE_HOME/lib

export

PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin

umask 022

[oracle@localhost ~]$ source .bashrc

[oracle@localhost ~]$ cd $ORACLE_HOME/dbs

[oracle@localhost dbs]$ ls -lrt

total 20

-rw-r--r--. 1 oracle oinstall 2851 May 15 2009 init.ora

-rw-r-----. 1 oracle oinstall 24 May 31 16:51 lkORCL

-rw-r-----. 1 oracle oinstall 1536 May 31 16:52 orapworcl

-rw-r-----. 1 oracle oinstall 2560 Jun 5 23:48 spfileorcl.ora

-rw-rw----. 1 oracle oinstall 1544 Jun 6 03:28 hc_orcl.dat

[oracle@localhost dbs]$ cp spfileorcl.ora spfileorcl_new.ora

[oracle@localhost dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jun 6 03:37:10 2018

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

Connected to an idle instance.

SQL> startup nomount;

ORACLE instance started.

Total System Global Area 1603411968 bytes

Fixed Size 2228784 bytes

Variable Size 939527632 bytes

Database Buffers 654311424 bytes

Redo Buffers 7344128 bytes

SQL> alter database mount;

Database altered.

SQL> select status from v$instance;

STATUS

------------

MOUNTED

SQL> alter database open;

Database altered.

SQL> select status from v$instance;

STATUS

------------

OPEN

SQL> show parameter name;

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

db_file_name_convert string

db_name string orcl

db_unique_name string orcl

global_names boolean FALSE

instance_name string orcl_new #实例名已改为orcl_new

lock_name_space string

log_file_name_convert string

processor_group_name string

service_names string orcl

SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@localhost dbs]$ echo $ORACLE_SID

#实例名已改为orcl_new

orcl_new

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值