Best way to point/update a file during PROD and BCP failover.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Best way to point/update a file during PROD and BCP failover.
# 1  
Old 02-25-2015
Best way to point/update a file during PROD and BCP failover.

Hi All,

In UNIX servers we are switching from DR to PROD. After switching to DR
we need to update some configuration files which contains the server names.

Ex - If we switch to BCP we need to update BCP server name.
If we switch back to PROD we need to update PROD server name.

I have below options for performing above task.
  1. Create a link to PROD and BCP separately and just invoke the link.
  2. Update the config file with the server name.

May I know which option is better.

Kindly advise me for any better option

Last edited by rbatte1; 02-25-2015 at 07:34 AM.. Reason: Added LIST=1 tags and corrected spelling
# 2  
Old 03-02-2015
Question is a bit vague...

If you are referring to configuration files regarding your application, best approach would be to use one master configuration file which is relinked during DR and back.

So i guess, option one.

You can also use exported variable in your users $HOME folder .profile
For instance, you have a variable in your .profile export DR=1 and every other code ran on that machine references to it...

if DR=1 we are on DR will use these configuration files, else if DR=0 we are on primary site using other set of configuration.
Change would be only one number(DR 1 or 0), sourcing .profile after, and application start.

Regards
Peasant.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Prod runs RHEL6 but pprod uses RHEL5??

Hi, I am currently building out a new production environment. Our current prod env uses RHEL5.8 but I am thinking of building out a RHEL6 environment since a complete end-to-end testing will need to take place prior to go-live anyway. Plus it is an ideal time to upgrade the OS across the... (4 Replies)
Discussion started by: Duffs22
4 Replies

2. Shell Programming and Scripting

How to perform a hexdump using dd from start point to end point?

hi, I would like to ask or is it possible to dump a hex using dd from starting point to end point just like the "xxd -s 512 -l 512 <bin file>" I know the redirect hexdump -C but i can't figure it out the combination options of dd. Hope someone can share their knowledge.. Thanks in... (3 Replies)
Discussion started by: jao_madn
3 Replies

3. Shell Programming and Scripting

Awk sub command - Prod - Urgent

Hi I have this check in file for replacing text in unix .This code use to work in linux but stopped working when we moved to unix. cat xyz.dat | awk '/\x07/{sub(/\"/,"")};{print}'|awk '/\x07/{sub(/\"\,\"/,"\x07")};{print}'|awk '/\x07/{sub(/\"\,\"/,"\x07")};{print}'|awk... (5 Replies)
Discussion started by: er_zeeshan05
5 Replies

4. Shell Programming and Scripting

how can I bcp out a table into a text file including the header row in the text file

Hi All, I need to BCP out a table into a text file along with the table headers. Normal BCP out command only bulk copies the data, and not the headers. I am using the following command: bcp database1..table1 out file1.dat -c -t\| -b1000 -A8192 -Uuser -Ppassword -efile.dat.err Regards,... (0 Replies)
Discussion started by: shilpa_acc
0 Replies

5. AIX

-805 error in AIX UNIX accessing TEST DB from PROD

Hi, I am getting -805 error when i tried accessing TEST DB from PROD environment in AIX UNIX. Could anyone help me in this regard. Thx, Satish (1 Reply)
Discussion started by: satishstar2
1 Replies

6. UNIX for Advanced & Expert Users

to create format file for bcp in

I want to create the format file for bcp in a file to the table. My Versions are: Unix: Sun OS, DB: Sybase. How can i create the format file. Is there any way to create the format by bcp command or some system sp. Please help. (3 Replies)
Discussion started by: Arunprasad
3 Replies

7. Programming

Migrating C Executable in UNIX from DEV to PROD

Hi Is there any specific way to FTP a C executable from DEV to PROD. We recently changed a C program compiled in DEV, created EXE and tested fine. But when we moved the EXE to PROD. It did not work. We have tried restarting the sever too. Once we put back the old Exe it starts to work again. The... (1 Reply)
Discussion started by: rainbow29
1 Replies

8. UNIX for Dummies Questions & Answers

copy prod data to QA

We keep getting production files into an input directory. These files will be processed three times a day. 8:00AM 1:30PM 5:30PM file1.20041005_05303423.dat File2.200041005_14232313.dat Once the files are processed, they are archived immediately to prod/archive directory ... (1 Reply)
Discussion started by: zomboo
1 Replies

9. UNIX for Advanced & Expert Users

Fibre connection Point to Point SUN

Anyone know of a guide or instructions for Solaris I got to configure a SBUS HBA to talk to a tape robot. I have done this on a switch but not point to point. just going HBA >>>>> TAPE Fibre simple two nodes Kie (6 Replies)
Discussion started by: kie
6 Replies

10. Shell Programming and Scripting

What is $PROD ? Does it represent some Unix directory?

Hi , Could u tell me What is $PROD ? Does it represent some Unix directory? Regards Ashish Malviya (2 Replies)
Discussion started by: Ashishm
2 Replies
Login or Register to Ask a Question