oracle 10g data guard question

Hi experts I want to know if I can shutdown my standby db to start it with spfile without any problems. I have a dataguard environment running fine but I wanted to configure data guard broker during normal operation hours but I see now that the standby db is not started with spfile and so I can not configure the data guard broker on the standby db. I wanted to just do a shutdown immediate and a startup mount. I guess I have to issue the command: alter database recover managed standby database disconnect from session; to start the arch log to be applied..
Can someone advice me what is best to do in this situation?
sharschoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Praveen Kumar ChandrashekatrDatabase Analysist Senior Commented:
You can shutdown your standy database and start it with spfile.
and as u said run

alter database recover managed standby database disconnect from session;
check the archive log list for log sequence no of your standby and primary database.

                                                       
alter database recover managed standy datababse cancel;
POracleCommented:
Steps:-

on Standby database:-

sql>alter database recover managed standby database cancel;
sql>shutdown immediate;
sql> startup mount --with spfile
sql>alter database recover managed standby database disconnect from session

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sharschoAuthor Commented:
Thanks POracle, this looks more like it. I will do the steps and let you know.
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

sharschoAuthor Commented:
I did not configure the standby db yet because I ahve noticed that the entries in my primary and standby init.ora does not contain the service _names parameter, is this parameter essential for the good functioning of the data guard broker?
POracleCommented:
No service_name is not essential for data_guard_broker, instead you need db_unique_name parameter. But I suggest to refer this documentation for oracle data guard broker.

http://download.oracle.com/docs/cd/B19306_01/server.102/b14230/concepts.htm#i1012797
sharschoAuthor Commented:
OK I see. I did configure the standby db now and it went good, thank you very much but I am now at the point of the listener and the tnsnames.ora and I see that in the tnsnames the service_name is defined, Is that not necessary to place this service_name in the spfile? I could not find anything about that in the link that you have send me, I only info for the listener.ora...
But My listener.ora looks like this and only the global_name,  the sid_name and the host differs on both servers and so I corrected it to becone the same listener file for both the prim and standby db like it is said in the doc you have send me. Is this OK?
Here is a copy of the listener file:
$ vi listener.ora
"listener.ora" 14 lines, 286 characters
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = computron.alm.local)
      (ORACLE_HOME = /opt/oracle/product/10.2.0/db_1)
      (SID_NAME = computron)
    )
    (SID_DESC = (GLOBAL_DBNAME = computrons.alm.local)
     (ORACLE_HOME = /opt/oracle/product/10.2.0/db_1)
     (SID_NAME = computrons)
   )
  )

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = hercules.alm.local)(PORT = 1521))
  )
POracleCommented:
I see that in the tnsnames the service_name is defined, Is that not necessary to place this service_name in the spfile?>>

You can use sid name in tnsnames.ora file like ,

PriDb =  
(DESCRIPTION =  
 (ADDRESS_LIST =  
     (ADDRESS = (PROTOCOL = TCP) (HOST = PrimaryHost) (PORT = 1521))
   )  
 (CONNECT_DATA =      (SID = computrons)  
  )
 )
POracleCommented:
Remember, dataguard and data guard broker are two different things.

Data guard broker is management architecture, which can ease your data guard environment monitoring task.



sharschoAuthor Commented:
POracle, |I thank you for your advice but I am still struggling with the listener file that has to reside on both the prime as the standby server. In all the examples that I have gone through they show that the host entry has to remain the same for both servers. So  (ADDRESS = (PROTOCOL = TCP)(HOST = hercules.alm.local)(PORT = 1521))
this line has to exist exactly the same on both server. Or better, bother listener files has to be identical on both server. right now the host entry has a value of the name of each server resp. why is it that for data guard broker to function correctly the host entry for the listener files on both servers has to point to only the primary server????
POracleCommented:
. In all the examples that I have gone through they show that the host entry has to remain the same for both servers.>>

Please, post link for the docs you visit.
POracleCommented:
See. if both databases, means primary and standby database are on same server then it is possible to have same host name on both listener file. otherwise this is not true...
POracleCommented:
sharscho,

Here is very good blog for standby database configuration. it contains each steps in details. Though it is for oracle 9i but still very good to understand standby database.

http://curiosityatoracle.blogspot.com/
POracleCommented:
sharscho,

Let us know whether you solve this or still have some issue.
khadermoinuddinCommented:
please refer  the below tnsnames.ora and try it.

Prod =  
(DESCRIPTION =  
 (ADDRESS_LIST =  
     (ADDRESS = (PROTOCOL = TCP) (HOST = ProdHost) (PORT = 1521))
   )  
 (CONNECT_DATA =      (SID = devo)  
 )
 )
khadermoinuddinCommented:
sharschoAuthor Commented:
This question took a long time because I had to go with pregnancy leave earlier due to complications. I could not try this databroker setup due to some issues with the application. It is so that the application uses one tns.ora and when a failover has to take place what we do is start the standby db with the sidname of the prod db and start the listener to point to the prod db name and so no changes need to be made for the application that is why the failover is occurring manually. So I can not state that the problem is solved but I am going to close the question since I am still on leave and whe I start back I am going to test the the setup and place comments about it. I thank you for your advices, I appreciate it.
sharschoAuthor Commented:
Thank you all!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.