SlideShare uma empresa Scribd logo
1 de 2
Baixar para ler offline
1 #!/bin/bash
2 # +--------------------------------------------------------------------------+
3 # | Lanzar: ./crear_servicios_RAC.sh | tee -a crear_servicios_RAC.sh.log |
4 # +--------------------------------------------------------------------------+
5
6 # +--------------------------------------------------------------------------+
7 # | VARIABLES A CONFIGURAR |
8 # +--------------------------------------------------------------------------+
9 export DB_UNIQUE_NAME=PRAC # +----> Nombre de la db_uniq_name
10 export DB_NAME=RAC # +----> Nombre de la db_name
11 # +--------------------------------------------------------------------------+
12
13 # +--------------------------------------------------------------------------+
14 # | VARIABLES FIJAS dependientes de las anteriores |
15 # +--------------------------------------------------------------------------+
16 export BATCH=${DB_NAME}_BATCH # +----> Servicio BATCH
17 export ONLINE=${DB_NAME}_ONLINE # +----> Servicio ONLINE
18 export DBLINK=${DB_NAME}_DBLINK # +----> Servicio DBLINK
19 export BPM=${DB_NAME}_BPM # +----> Servicio BPM
20 export LOCALCS=${DB_NAME}_LOCALCS # +----> Servicio LOCALCS
21 export INSTANCIAS=${DB_UNIQUE_NAME}1,${DB_UNIQUE_NAME}2,${DB_UNIQUE_NAME}3 # +---->
Instancias posibles
22 # +--------------------------------------------------------------------------+
23
24 # +--------------------------------------------------------------------------+
25 # | Parada de los 5 servicios diferenciados por tipologia de apps de acceso|
26 # +--------------------------------------------------------------------------+
27 echo "*****************************************************************************"
28 echo "Parando los servicios creados"
29 echo "*****************************************************************************"
30 for servicio in $ONLINE $BATCH $DBLINK $BPM $LOCALCS
31 do
32 echo "srvctl stop service -db $DB_UNIQUE_NAME -service $servicio "
33 srvctl stop service -db $DB_UNIQUE_NAME -service $servicio
34 done
35
36
37 # +--------------------------------------------------------------------------+
38 # | Borrado de los 5 servicios diferenciados por tipologia de apps de acceso|
39 # +--------------------------------------------------------------------------+
40 echo "*****************************************************************************"
41 echo "Borrando los servicios creados"
42 echo "*****************************************************************************"
43 for servicio in $ONLINE $BATCH $DBLINK $BPM $LOCALCS
44 do
45 echo "srvctl remove service -db $DB_UNIQUE_NAME -service $servicio "
46 srvctl remove service -db $DB_UNIQUE_NAME -service $servicio
47 done
48
49 # +--------------------------------------------------------------------------+
50 # | Creacion de los 5 servicios diferenciados por tipologia de apps de acceso|
51 # +--------------------------------------------------------------------------+
52 # | ONLINE ...... Aplicaciones Online Operacionales |
53 # | BATCH ....... Procesos planificados CTM o procesos BATCH en general |
54 # | DBLINK ...... Conexiones entre Bases de Datos Oracle |
55 # | LOCALCS ..... Aplicaciones Cliente/Servidor (ODBC's, OLEDB, SQLPLUS) |
56 # | BPM ......... Procesos y/o Apps correspondientes a BPM |
57 # +--------------------------------------------------------------------------+
58
59 echo "*****************************************************************************"
60 echo "Creando los servicios creados"
61 echo "*****************************************************************************"
62 for servicio in $ONLINE $BATCH $DBLINK $BPM $LOCALCS
63 do
64 echo "srvctl add service -db $DB_UNIQUE_NAME -service $servicio -tafpolicy BASIC
-failovertype SESSION -failovermethod BASIC -failoverdelay 5 -failoverretry 24
-preferred "${INSTANCIAS}" "
65 srvctl add service -db $DB_UNIQUE_NAME -service $servicio -tafpolicy BASIC -failovertype
SESSION -failovermethod BASIC -failoverdelay 5 -failoverretry 24 -preferred
"${INSTANCIAS}"
66
67 ## srvctl add service -db $DB_UNIQUE_NAME -service $servicio -tafpolicy BASIC
-failovertype SESSION -failovermethod BASIC -failoverdelay 5 -failoverretry 24
-preferred "${INSTANCIAS}"
68 ## srvctl add service -db $DB_UNIQUE_NAME -service $servicio -tafpolicy BASIC
-failovertype SESSION -failovermethod BASIC -failoverdelay 5 -failoverretry 24
-preferred "${INSTANCIAS}" - available <OTRA_INSTANCIA>
69 done
70
71 # +--------------------------------------------------------------------------+
72 # | Verificacion de la configuracion de los diferentes servicios |
73 # +--------------------------------------------------------------------------+
74 echo "*****************************************************************************"
75 echo "Verificando los servicios creados"
76 echo "*****************************************************************************"
77 for servicio in $ONLINE $BATCH $DBLINK $BPM $LOCALCS
78 do
79 echo "# +--------------------------------------------------------------------------+"
80 echo "srvctl config service -db $DB_UNIQUE_NAME -s $servicio"
81 srvctl config service -db $DB_UNIQUE_NAME -s $servicio
82 echo "# +--------------------------------------------------------------------------+"
83 done
84
85
86 # +--------------------------------------------------------------------------+
87 # | Verificando los servicios |
88 # +--------------------------------------------------------------------------+
89 echo "*****************************************************************************"
90 echo "Verificando los servicios creados"
91 echo "*****************************************************************************"
92 for servicio in $ONLINE $BATCH $DBLINK $BPM $LOCALCS
93 do
94 ### Ponemos en mayusculas
95 db_name_lower=`echo $DB_NAME | tr '[:upper:]' '[:lower:]'`
96 db_uniq_name_lower=`echo $DB_UNIQUE_NAME | tr '[:upper:]' '[:lower:]'`
97 servicio_lower=`echo $servicio | tr '[:upper:]' '[:lower:]'`
98
99 echo "# +--------------------------------------------------------------------------+"
100 echo "crsctl stat res ora.${db_uniq_name_lower}.${servicio_lower}.svc -t"
101 crsctl stat res ora.${db_uniq_name_lower}.${servicio_lower}.svc -t
102 echo "# +--------------------------------------------------------------------------+"
103 done
104
105
106 # +--------------------------------------------------------------------------+
107 # | Iniciar los servicios creados |
108 # +--------------------------------------------------------------------------+
109 echo "*****************************************************************************"
110 echo "Iniciando los servicios creados"
111 echo "*****************************************************************************"
112 for servicio in $ONLINE $BATCH $DBLINK $BPM $LOCALCS
113 do
114 echo "# +--------------------------------------------------------------------------+"
115 echo "srvctl start service -db $DB_UNIQUE_NAME -s $servicio"
116 srvctl start service -db $DB_UNIQUE_NAME -s $servicio
117 echo "# +--------------------------------------------------------------------------+"
118 done
119

Mais conteúdo relacionado

Destaque

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

Destaque (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Crear servicios rac oracle

  • 1. 1 #!/bin/bash 2 # +--------------------------------------------------------------------------+ 3 # | Lanzar: ./crear_servicios_RAC.sh | tee -a crear_servicios_RAC.sh.log | 4 # +--------------------------------------------------------------------------+ 5 6 # +--------------------------------------------------------------------------+ 7 # | VARIABLES A CONFIGURAR | 8 # +--------------------------------------------------------------------------+ 9 export DB_UNIQUE_NAME=PRAC # +----> Nombre de la db_uniq_name 10 export DB_NAME=RAC # +----> Nombre de la db_name 11 # +--------------------------------------------------------------------------+ 12 13 # +--------------------------------------------------------------------------+ 14 # | VARIABLES FIJAS dependientes de las anteriores | 15 # +--------------------------------------------------------------------------+ 16 export BATCH=${DB_NAME}_BATCH # +----> Servicio BATCH 17 export ONLINE=${DB_NAME}_ONLINE # +----> Servicio ONLINE 18 export DBLINK=${DB_NAME}_DBLINK # +----> Servicio DBLINK 19 export BPM=${DB_NAME}_BPM # +----> Servicio BPM 20 export LOCALCS=${DB_NAME}_LOCALCS # +----> Servicio LOCALCS 21 export INSTANCIAS=${DB_UNIQUE_NAME}1,${DB_UNIQUE_NAME}2,${DB_UNIQUE_NAME}3 # +----> Instancias posibles 22 # +--------------------------------------------------------------------------+ 23 24 # +--------------------------------------------------------------------------+ 25 # | Parada de los 5 servicios diferenciados por tipologia de apps de acceso| 26 # +--------------------------------------------------------------------------+ 27 echo "*****************************************************************************" 28 echo "Parando los servicios creados" 29 echo "*****************************************************************************" 30 for servicio in $ONLINE $BATCH $DBLINK $BPM $LOCALCS 31 do 32 echo "srvctl stop service -db $DB_UNIQUE_NAME -service $servicio " 33 srvctl stop service -db $DB_UNIQUE_NAME -service $servicio 34 done 35 36 37 # +--------------------------------------------------------------------------+ 38 # | Borrado de los 5 servicios diferenciados por tipologia de apps de acceso| 39 # +--------------------------------------------------------------------------+ 40 echo "*****************************************************************************" 41 echo "Borrando los servicios creados" 42 echo "*****************************************************************************" 43 for servicio in $ONLINE $BATCH $DBLINK $BPM $LOCALCS 44 do 45 echo "srvctl remove service -db $DB_UNIQUE_NAME -service $servicio " 46 srvctl remove service -db $DB_UNIQUE_NAME -service $servicio 47 done 48 49 # +--------------------------------------------------------------------------+ 50 # | Creacion de los 5 servicios diferenciados por tipologia de apps de acceso| 51 # +--------------------------------------------------------------------------+ 52 # | ONLINE ...... Aplicaciones Online Operacionales | 53 # | BATCH ....... Procesos planificados CTM o procesos BATCH en general | 54 # | DBLINK ...... Conexiones entre Bases de Datos Oracle | 55 # | LOCALCS ..... Aplicaciones Cliente/Servidor (ODBC's, OLEDB, SQLPLUS) | 56 # | BPM ......... Procesos y/o Apps correspondientes a BPM | 57 # +--------------------------------------------------------------------------+ 58 59 echo "*****************************************************************************" 60 echo "Creando los servicios creados" 61 echo "*****************************************************************************" 62 for servicio in $ONLINE $BATCH $DBLINK $BPM $LOCALCS 63 do 64 echo "srvctl add service -db $DB_UNIQUE_NAME -service $servicio -tafpolicy BASIC -failovertype SESSION -failovermethod BASIC -failoverdelay 5 -failoverretry 24 -preferred "${INSTANCIAS}" " 65 srvctl add service -db $DB_UNIQUE_NAME -service $servicio -tafpolicy BASIC -failovertype SESSION -failovermethod BASIC -failoverdelay 5 -failoverretry 24 -preferred
  • 2. "${INSTANCIAS}" 66 67 ## srvctl add service -db $DB_UNIQUE_NAME -service $servicio -tafpolicy BASIC -failovertype SESSION -failovermethod BASIC -failoverdelay 5 -failoverretry 24 -preferred "${INSTANCIAS}" 68 ## srvctl add service -db $DB_UNIQUE_NAME -service $servicio -tafpolicy BASIC -failovertype SESSION -failovermethod BASIC -failoverdelay 5 -failoverretry 24 -preferred "${INSTANCIAS}" - available <OTRA_INSTANCIA> 69 done 70 71 # +--------------------------------------------------------------------------+ 72 # | Verificacion de la configuracion de los diferentes servicios | 73 # +--------------------------------------------------------------------------+ 74 echo "*****************************************************************************" 75 echo "Verificando los servicios creados" 76 echo "*****************************************************************************" 77 for servicio in $ONLINE $BATCH $DBLINK $BPM $LOCALCS 78 do 79 echo "# +--------------------------------------------------------------------------+" 80 echo "srvctl config service -db $DB_UNIQUE_NAME -s $servicio" 81 srvctl config service -db $DB_UNIQUE_NAME -s $servicio 82 echo "# +--------------------------------------------------------------------------+" 83 done 84 85 86 # +--------------------------------------------------------------------------+ 87 # | Verificando los servicios | 88 # +--------------------------------------------------------------------------+ 89 echo "*****************************************************************************" 90 echo "Verificando los servicios creados" 91 echo "*****************************************************************************" 92 for servicio in $ONLINE $BATCH $DBLINK $BPM $LOCALCS 93 do 94 ### Ponemos en mayusculas 95 db_name_lower=`echo $DB_NAME | tr '[:upper:]' '[:lower:]'` 96 db_uniq_name_lower=`echo $DB_UNIQUE_NAME | tr '[:upper:]' '[:lower:]'` 97 servicio_lower=`echo $servicio | tr '[:upper:]' '[:lower:]'` 98 99 echo "# +--------------------------------------------------------------------------+" 100 echo "crsctl stat res ora.${db_uniq_name_lower}.${servicio_lower}.svc -t" 101 crsctl stat res ora.${db_uniq_name_lower}.${servicio_lower}.svc -t 102 echo "# +--------------------------------------------------------------------------+" 103 done 104 105 106 # +--------------------------------------------------------------------------+ 107 # | Iniciar los servicios creados | 108 # +--------------------------------------------------------------------------+ 109 echo "*****************************************************************************" 110 echo "Iniciando los servicios creados" 111 echo "*****************************************************************************" 112 for servicio in $ONLINE $BATCH $DBLINK $BPM $LOCALCS 113 do 114 echo "# +--------------------------------------------------------------------------+" 115 echo "srvctl start service -db $DB_UNIQUE_NAME -s $servicio" 116 srvctl start service -db $DB_UNIQUE_NAME -s $servicio 117 echo "# +--------------------------------------------------------------------------+" 118 done 119