数据库

img llmmysun

10 G RAC (zz)

发表于2004/11/3 15:44:00  1212人阅读

Q1. How to configure "listener.ora" and "tnsnames.ora"
A1. Usually, NETCA will launch automatically during the DBCA.
IF you have encountered some errors or want to reconfig
them later, please do the following things:

(1) Launch NETCA ;
(2) Choose the option "Cluster" in the first page;
(3) Choose one type such as "create listener",
"create local net service";
(4) Test the new created listener or local net service until success;
(5) By default, the application "srvctl" can only manage those
listeners with the suffix(host_name),So,please be very carefully
when modifying;
(6) Check and modify the initialization paratemter file if possible;

Steps:
Create a new initialization parameter file 'init.ora' on host (test1),
this file will be shared by each instance.

1. Invoke SQLPLUS, issue the following command:

SQL> create pfile='xxx' from spfile;

2. open "init.ora", add the following lines:

orcl1.local_listener=listener_orcl1
orcl2.local_listener=listener_orcl2
orcl1.remote_listener=listeners_orcl
orcl2.remote_listener=listeners_orcl

remove or comment this line:
*.remote_listener=listeners_orcl
(* represents this parameter will be used by each instance)

save the modification.

3. Invoke SQLPLUS again
SQL> shutdown immediate;
SQL> exit

SQL> startup pfile='xxx'
SQL> create spfile from pfile='xxx'
SQL> shutdown immediate;
SQL> exit

SQL> startup (new spfile will be used this time)


Note:
. If you don't change the listener's default port(1521), It's
unnecessary to add SID's entry in "listener.ora", Oracle
background process PMON will discovery all available
services every 60 seconds.

. If you use listener's default port(1521), It's unnecessary to
config parameter 'instance_name.local_listener=xxx' in
"init.ora" , you also shouldn't add this entry in
"tnsnames.ora" (local_listener_name = ...)

For example, a typical "listener.ora" should be like this:

listener_hostname =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(host=xxx)(port=1521))
(ADDRESS = (PROTOCOL = TCP)(host=your-vip-addr)(port=1521))
)

sid_list_listener_hostname =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = xxx)
(PROGRAM = extproc)
)

(SID_DESC =
(SID_NAME=xxx)
(ORACLE_HOME=xxx)
)
)

For example, a typical "tnsnames.ora" should be like this:

listener_hostname1=(address=(protocol=tcp)(host=test1)(port=1521))
listener_hostname2=(address=(protocol=tcp)(host=test2)(port=1521))

listeners_orcl =
(address_list =
(address=(protocol=tcp)(host=test1-vip)(port=1521))
(address=(protocol=tcp)(host=test2-vip)(port=1521))
)


# database connection: orcl
orcl =
(description =
(load_balance=on)
(address=(protocol=tcp)(host=test1-vip)(port=1521))
(address=(protocol=tcp)(host=test2-vip)(port=1521))
(connect_data =
(service_name=orcl)
)
)


# instance connection: orcl1
orcl1 =
(description =
(address=(protocol=tcp)(host=test1-vip)(port=1521))
(address=(protocol=tcp)(host=test2-vip)(port=1521))
(load_balance = yes)
(connect_data =
(server=dedicated)
(service_name=orcl)
(instance_name=orcl1)
)
)

# instance connection: orcl2
orcl2 =
(description =
(address=(protocol=tcp)(host=test1-vip)(port=1521))
(address=(protocol=tcp)(host=test2-vip)(port=1521))
(load_balance = yes)
(connect_data =
(server=dedicated)
(service_name=orcl2)
(failover_mode =
(type = select)
(method = basic)
(retries=180)
(delay=5)
)
)
)



Q2. How to recofig VIP ?
A2:
(1) delete the database using DBCA;
(2) delete the ASM(if configured) using documented procedure in 10g
Release notes;
(3) delete listeners using NetCA;
(4) delete nodeapps using srvctl as root user for all nodes.
for example:
srvctl stop nodeapps -n <node>
srvctl remove nodeapps -n <node>

Then you rerun vipca to reconfigure the VIPs, run netca to configure
listeners and dbca to create database to arrive at your initial state.


Q3: How to configure EM environment for RAC ?
1. Usually we only need run DBCA again to check the following
things exist:

. Check whether a schema "SYSMAN" has been created
(select username from all_users);

. Check if tablespace "SYSAUX" exists
(select tablespace_name from dba_tablespaces);

. Check if there is a directory <hostname_sid> has been
created under $ORACLE_HOME;

. Issue these commands to check dbconsole's status:

emctl start(stop/status) dbconsole

2. Trouble Shooting:

Q: Target's information is wrong or lost

A:
. Go to directory: $ORACLE_HOME/hostname_sid/emd,
open "targets.xml" to check if all available targets have
been discovered by EM;

. If the file <targets.xml> doesn't include all targets'
information you need, You can try:

emctl stop dbconsole;
remove all files under these directories;
$ORACLE_HOME/hostname_sid/sysman/emd/upload
$ORACLE_HOME/hostname_sid/sysman/emd/state

check file <targets.xml> again, make sure that at least
agent and host's info can be found from this file;

emctl start dbconsole; --wait for the new metic data
to be uploaded into the repository

3. If you've modified some settings of EM and the repository
has been created, you can execute "emca -r " to configure
the EM repository again;


4. Launch "http://host_name: port_number/em" on all nodes and
check them.

...


阅读全文
0 0

相关文章推荐

img
取 消
img