README Manually Upgrading PstgreSQL 9.1 t PstgreSQL 9.4.13 Databases managed by the SAS Web Infrastructure Platfrm Data Server (including SAS slutin data servers cnfigured with the SAS Deplyment Wizard) are based n PstgreSQL 9.1.9. This dcument describes hw t manually update thse databases t PstgreSQL 9.4.13. Nte: In this dcument, the term data server refers t the SAS Web Infrastructure Platfrm Data Server r the slutin-specific data server. Required Infrmatin Cllect the fllwing infrmatin befre beginning the upgrade. The hst name and prt number fr the SAS Web Infrastructure Platfrm Data Server, and any SAS slutin data server. Fr instance: wipds.hstname.cm, 9432 fmdb.hstname.cm, 9632 Nte: The hst name and prt can be lcated using the SAS Management Cnsle Server Manager plug-in. Lcatin f SASHme. Fr instance: UNIX - /usr/lcal/sashme Windws - C:\Prgram Files\SASHme Lcatin f the SAS Cnfiguratin Directry. Fr instance: UNIX - /usr/lcal/sascnfig/lev1 Windws - C:\SAS\SASCnfig\Lev1 Data Server Administratr ID and passwrd fr all data servers in yur cluster. Fr instance: Nte: SAS Web Infrastructure Platfrm Data Server: dbmswner/xxxxxxxx Jb Mnitr Data Server: jmdbadmin/xxxxxxxx Data Remediatin Server: rmdbadmin/xxxxxxxx Fr each data server, the Data Server Administratr ID has a lgin defined fr SAS Administratr. Use the SAS Management Cnsle User Manager plug-in t lcate the ID by displaying prperties fr the SAS Administratr and clicking the Accunts tab. Read/write access in the WebInfrastructurePlatfrmDataServer install directry (lcatin f the PstgreSQL server binaries). Fr instance: UNIX - /usr/lcal/sashme/saswebinfrastructureplatfrmdataserver/9.4 Windws - C:\Prgram Files\SASHme \SASWebInfrastructurePlatfrmDataServer\9.4 1
UNIX and Linux Each cmmand in the fllwing steps shuld be run as the SAS installer ID. 1. Shut dwn yur SAS servers and middle-tier servers. Clse all SAS clients, such as SAS Management Cnsle. 2. Start the data servers. Fr example, this is hw t start the default Web Infrastructure Platfrm cd < SAS Cnfiguratin Directry>/WebInfrastructurePlatfrmDataServer b. Run the Web Infrastructure Platfrm Data Server start/stp script../webinfdsvrc.sh start c. Ensure that the database has started. ps ef grep i pstgres d. Repeat steps 2a 2c fr each data server. 3. Back up the database. a. G t the directry the PstgreSQL server binaries are in. cd <SASHme>/SASWebInfrastructurePlatfrmDataServer/9.4/bin b. Fr data servers n AIX, set LIBPATH. exprt LIBPATH=<SASHme>/SASWebInfrastructurePlatfrmDataServer /9.4/lib:$LIBPATH c. Set the fllwing envirnment variable. exprt LD_LIBRARY_PATH=<SASHme>/SASWebInfrastructurePlatfrmDataServer /9.4/lib:$LD_LIBRARY_PATH d. Set the fllwing envirnment variables. exprt PGUSER=<Data Server Administratr ID> exprt PGPASSWORD=<Data Server Administratr passwrd> exprt PGHOST=<hstname> exprt PGPORT=<prt number> e. Back up the database../pg_dumpall -f "<SAS Cnfiguratin Directry> /<Data Server Cnfiguratin Directry>/db_update.dat" Fr example:./pg_dumpall -f "<SAS Cnfiguratin Directry> /WebInfrastructurePlatfrmDataServer/db_update.dat" Nte: Make sure n errrs have ccurred and the file has been created. 2
f. Repeat steps 3d 3e fr each data server, being sure t use the apprpriate hst name, prt, Data Server Administratr, and full path fr each data server in the cmmand in step 3d. 4. Stp the data servers. Fr example, this is hw t stp the default Web Infrastructure Platfrm cd <SAS Cnfiguratin Directry>/WebInfrastructurePlatfrmDataServer b. Run the Web Infrastructure Platfrm Data Server start/stp script../webinfdsvrc.sh stp c. Ensure that ALL the pstgres prcesses have stpped. ps ef grep i pstgres d. Repeat steps 4a 4c fr each Data server. 5. Mve the 9.1.x database. Fr example, this is hw t mve the default Web Infrastructure Platfrm Data Server database. cd <SAS Cnfiguratin Directry>/WebInfrastructurePlatfrmDataServer b. Rename the 9.1.x database. mv data data_91x c. Repeat steps 5a 5b fr each data server. 6. Put the 9.4.13 PstgreSQL binaries int place. This step will nly be perfrmed nce. a. G t the server binaries install directry. cd <SASHme>/SASWebInfrastructurePlatfrmDataServer/9.4 b. Rename the fllwing 9.1.x directries. mv bin bin_91x mv lib lib_91x mv share share_91x mv include include_91x c. Cpy in the 9.4.13 binary package. cp /xxx/xxx/pgsql_9.4.13_<three-byte cde fr the perating system>.tar <SASHme>/ SASWebInfrastructurePlatfrmDataServer/9.4 d. Unpackage the 9.4.13 binary package. tar xvf pgsql_9.4.13_<three-byte cde fr the perating system>.tar Nte: This cmmand creates new bin, lib, share, and include directries 3
7. Initialize a new PstgreSQL 9.4.13 database. a. G t the server binaries directry. cd <SASHme>/SASWebInfrastructurePlatfrmDataServer/9.4/bin b. Run the initialize database cmmand. Fr example, this is hw t initialize the default Web Infrastructure Platfrm./initdb -D <SAS Cnfiguratin Directry> /WebInfrastructurePlatfrmDataServer/data -U updateuser12 -A trust - E UTF8 --lcale=c c. Repeat steps 7a 7b fr each data server. 8. Update PstgreSQL cnfiguratin settings. Fr example, this is hw t d this fr the default Web Infrastructure Platfrm cd <SAS Cnfiguratin Directry> /WebInfrastructurePlatfrmDataServer/data b. Rename pstgresql.cnf. mv pstgresql.cnf pstgresql.cnf_94 c. Cpy pstgresql.cnf frm ld database t this database. cp../data_91x/pstgresql.cnf. d. Fr data servers n the HP-UX fr the Itanium Prcessr Family Architecture, edit pstgresql.cnf. vi pstgresql.cnf Then add the fllwing line t the very bttm f the file: dynamic_shared_memry_type = sysv e. Repeat steps 8a 8d fr each data server. 9. Start the data servers. Fr example, this is hw t start the default Web Infrastructure Platfrm cd <SAS Cnfiguratin Directry>/WebInfrastructurePlatfrmDataServer b. Run the Web Infrastructure Platfrm Data Server start/stp script../webinfdsvrc.sh start c. Ensure that the database has started. ps ef grep i pstgres d. Repeat steps 9a 9c fr each data server. 4
10. Restre the data. Fr example, this is hw t restre the default Web Infrastructure Platfrm Data Server instance. a. G t the server binaries directry. cd <SASHme>/SASWebInfrastructurePlatfrmDataServer/9.4/bin b. Set the envirnment variables. exprt LD_LIBRARY_PATH=<SASHme>/SASWebInfrastructurePlatfrmDataServer /9.4/lib:$LD_LIBRARY_PATH exprt PGUSER=<Data Server Administratr ID> exprt PGPASSWORD=<Data Server Administratr passwrd> exprt PGHOST=<hstname> exprt PGPORT=<prt number> c. Fr data servers n AIX, als set LIBPATH. exprt LIBPATH=<SASHme>/SASWebInfrastructurePlatfrmDataServer/9.4 /lib:$libpath d. Run the cmmand t restre the data../pgsql -h lcalhst -d pstgres -U updateuser12 --set ON_ERROR_STOP=1 -f "<SAS Cnfiguratin Directry> /WebInfrastructurePlatfrmDataServer/db_update.dat" e. Run the cmmand t disable lgin fr the updateuser12../pgsql -h lcalhst -d pstgres -c "alter rle \"updateuser12\" NOLOGIN;" f. Repeat steps 10a 10e fr each data server. 11. Stp the data servers. Fr example, this is hw t stp the default Web Infrastructure Platfrm cd <SAS Cnfiguratin Directry>/WebInfrastructurePlatfrmDataServer b. Run the Web Infrastructure Platfrm Data Server start/stp script../webinfdsvrc.sh stp c. Ensure that ALL the pstgres prcesses have stpped. ps ef grep i pstgres d. Repeat steps 11a 11c fr each data server. 5
12. Update the PstgreSQL cnfiguratin settings. Fr example, this is hw t update the settings fr the default Web Infrastructure Platfrm cd <SAS Cnfiguratin Directry> /WebInfrastructurePlatfrmDataServer/data b. Cpy pg_hba.cnf frm the ld database t this database. cp../data_91x/pg_hba.cnf. c. Repeat steps 12a 12b fr each data server. 13. On the machine where PstgreSQL was upgraded, rename the <SAS Cnfiguratin Directry>/Lev1/Web/SASEnvirnmentManager/agent-5.8.0-EE/data directry. mv <SAS Cnfiguratin Directry>/Lev1/Web/SASEnvirnmentManager /agent-5.8.0-ee/data <SAS Cnfiguratin Directry>/Lev1/Web /SASEnvirnmentManager/agent-5.8.0-EE/data_archive 14. Restart yur SAS servers, middle-tier servers, and clients. 15. Using the prcedures described in the middle tier Instructins.html dcument, perfrm the fllwing tasks: Validate the middle tier. Perfrm an ad hc backup with the Deplyment Backup and Recvery Tl (r Backup Manager). 16. After yu finish the upgrade, if yu see that the server versin is still 9.1.x in the SAS Envirnment Manager cnsle r that sme metrics are unavailable fr a lng time, perfrm a rediscvery with SAS Envirnment Manager. After yu have upgraded PstgreSQL, the SAS Installatin Qualificatin tl will return failures n the updated files in the /SASWebInfrastructurePlatfrmDataServer/9.4 directry. This is expected and shuld nt be a cncern. 6
Windws Each cmmand in the fllwing steps must be run as the SAS installer ID. 1. Shut dwn yur SAS servers and middle-tier servers. Clse all SAS clients, such as SAS Management Cnsle. 2. Start the data servers. Fr example, this is hw t start the default Web Infrastructure Platfrm a. Open the Services app by clicking the Start buttn. b. Type services in the search text bx, and click Services in the results. c. Scrll thrugh the Services windw and find the data server (fr example, "SAS [Metadata- Lev1] Web Infrastructure Platfrm Data Server"). d. Right-click the data server and select Start. e. Repeat steps2a 2d fr each data server. 3. Back up the database. a. Open a cmmand prmpt by clicking the Start buttn. b. Type cmd.exe in the search text bx, right-click cmmand prmpt r cmd.exe under Prgrams, and select Run as administratr c. G t the directry the PstgreSQL server binaries are in. cd <SASHme>\SASWebInfrastructurePlatfrmDataServer\9.4\bin d. Run the cmmand t back up the data stre. Fr example, this is the cmmand t back up the data stre fr the Web Infrastructure Platfrm pg_dumpall -h <hst name> -p <prt> -U <Data Server Administratr> -S <Data Server Administratr> -W -l pstgres f "<SAS Cnfiguratin Directry>\WebInfrastructurePlatfrmDataServer \db_update.dat" e. Enter the Data Server Administratr passwrd when prmpted. This will happen multiple times. Nte: Ensure the file is created and n errrs ccurred. f. Repeat steps 3d 3e fr each data server, being sure t use the apprpriate hst name, prt, Data Server Administratr, and full path fr each data server in the cmmand in step 3d. 4. Stp the data servers. Fr example, this is hw t stp the default Web Infrastructure Platfrm a. Open the Services app by clicking the Start buttn. b. Type services in the search text bx, and click Services in the results. c. Scrll thrugh the Services windw and find the data server (fr example, "SAS [Metadata- Lev1] Web Infrastructure Platfrm Data Server"). 7
d. Right-click the data server and select Stp. e. Repeat steps 4a 4d fr each data server. Nte: Ensure that all pstgres prcesses have stpped by checking the task manager. 5. Mve the 9.1.x database. Fr example, this is hw t mve the default Web Infrastructure Platfrm Data Server database. cd <SAS Cnfiguratin Directry>\WebInfrastructurePlatfrmDataServer b. Rename the 9.1.x database. rename data data_91x c. Repeat steps 5a 5b fr each data server. 6. Upgrade t the 9.4.13 PstgreSQL binaries. This step will nly be perfrmed nce. a. G t the server binaries install directry. cd <SASHme>\SASWebInfrastructurePlatfrmDataServer\9.4 b. Rename the 9.1.x directries. rename bin bin_91x rename lib lib_91x rename share share_91x rename include include_91x c. Cpy in the 9.4.13 binary package. d. Unpackage the 9.4.13 binary package by unzipping pgsql_9.4.13_<three-byte cde fr the perating system>.zip in the <SASHme>\SASWebInfrastructurePlatfrmDataServer\9.4 directry. Depending n the settings f yur system, yu may see a Destinatin Flder Access Denied message asking yu t prvide administratr permissin. 7. Initialize a new PstgreSQL 9.4.13 database. a. G t the server binaries directry. cd <SASHme>\SASWebInfrastructurePlatfrmDataServer\9.4\bin b. Run the initialize database cmmand. Fr example, this is hw t initialize the database in the default Web Infrastructure Platfrm initdb -D "<SAS Cnfiguratin Directry> \WebInfrastructurePlatfrmDataServer\data" -U updateuser12 -A trust -E UTF8 --lcale=c c. Repeat steps 7a 7b fr each data server. 8
8. Update the PstgreSQL cnfiguratin settings. Fr example, this is hw t d this fr the default Web Infrastructure Platfrm cd <SAS Cnfiguratin Directry>\WebInfrastructurePlatfrmDataServer\data b. Rename pstgresql.cnf. rename pstgresql.cnf pstgresql.cnf_94 c. Cpy in pstgresql.cnf frm ld database t this database. cpy..\data_91x\pstgresql.cnf. d. Repeat steps 8a 8c fr each data server. 9. Start the data servers. Fr example, this is hw t start the default Web Infrastructure Platfrm a. Open the Services app by clicking the Start buttn. b. Type services in the search text bx, and click Services in the results. c. Scrll thrugh the Services windw and find the data server (fr example, "SAS [Metadata- Lev1] Web Infrastructure Platfrm Data Server"). d. Right-click the data server and select Start. e. Repeat steps 9a 9d fr each data server. 10. Restre the data. Fr example, this is hw t restre the default Web Infrastructure Platfrm Data Server instance. a. G t the server binaries directry. cd <SASHme>\SASWebInfrastructurePlatfrmDataServer\9.4\bin b. (Optinal) Set the cmmand prmpt cnsle cde page. Fr example, English (United States) the cnsle is usually 437 and windws is 1252. Yu can run the fllwing cmmand t set the cmmand cnsle t 1252. chcp 1252 c. Run the cmmand t restre the data. pgsql -p <prt> -d pstgres -U updateuser12 --set ON_ERROR_STOP=1 -f "<SAS Cnfiguratin Directry>\WebInfrastructurePlatfrmDataServer \db_update.dat" d. Run the cmmand t disable lgin fr the updateuser12. pgsql -p <prt> -d pstgres -U <Data Server Administratr> -W -c "alter rle \"updateuser12\" NOLOGIN;" e. Enter the Data Server Administratr passwrd when prmpted. f. Repeat steps 10a 10e fr each data server. 9
11. Stp the data servers. Fr example, this is hw t stp the default Web Infrastructure Platfrm a. Open the Services app by clicking the Start buttn. b. Type services in the search text bx, and click Services in the results. a. Scrll thrugh the Services windw and find the data server (fr example, "SAS [Metadata- Lev1] Web Infrastructure Platfrm Data Server"). b. Right-click the data server and select Stp. c. Repeat steps 11a 11d fr each data server. Nte: Check the task manager t ensure that all pstgres prcesses have stpped. 12. Update the PstgreSQL cnfiguratin settings. Fr example, this is hw t d this fr the default Web Infrastructure Platfrm cd <SAS Cnfiguratin Directry>\WebInfrastructurePlatfrmDataServer\data b. Cpy in pg_hba.cnf frm ld database t this database. cpy..\data_91x\pg_hba.cnf. c. Repeat steps 12a 12b fr each data server. 13. On the machine where PstgreSQL was upgraded, rename the <SAS Cnfiguratin Directry>/Lev1/Web/SASEnvirnmentManager/agent-5.8.0-EE/data directry t <SAS Cnfiguratin Directry>/Lev1/Web/SASEnvirnmentManager/agent- 5.8.0-EE/data_archive 14. Restart yur SAS servers, middle-tier servers, and clients. 15. Using the prcedures described in the middle tier Instructins.html dcument, perfrm the fllwing tasks: Validate the middle tier. Perfrm an ad hc backup with the Deplyment Backup and Recvery Tl (r Backup Manager). 16. After yu finish the upgrade, if yu see that the server versin is still 9.1.x in the SAS Envirnment Manager cnsle r that sme metrics are unavailable fr a lng time, perfrm a rediscvery with SAS Envirnment Manager. After yu have upgraded PstgreSQL, the SAS Installatin Qualificatin tl will return failures n the updated files in the /SASWebInfrastructurePlatfrmDataServer/9.4 directry. This is expected and shuld nt be a cncern. 10
Migratin If yu need t migrate an upgraded data server (including Web Infrastructure Platfrm Data Server) t a new lcatin, yu must ensure that all data servers still using PstgreSQL 9.1 n each machine have been upgraded. This shuld t be dne prir t running the SAS Migratin Utility t create the migratin package. Nte that the PstgreSQL 9.1 installatin files, lcated in <SASHme>/SASWebInfrastructurePlatfrmDataServer/9.4 when present, must be upgraded even if there is n Web Infrastructure Platfrm Data Server running n the machine. Here are the specific steps: 1. On the migratin surce machines, use steps 1-16 f the perating system-specific instructins in the previus sectins t upgrade all data server instances in the cnfiguratin directries t be migrated. 2. If a migratin surce machine has a <SASHme>/SASWebInfrastructurePlatfrmDataServer/9.4 (fr UNIX; <SASHme>\SASWebInfrastructurePlatfrmDataServer\9.4 fr Windws) installatin directry but n cnfigured Web Infrastructure Platfrm Data Server, the files still must be upgraded frm PstgreSQL 9.1 t PstgreSQL 9.4.13. T accmplish this upgrade, perfrm step 6 frm the apprpriate perating system-specific sectin. Step 6 upgrades the PstgreSQL installatin files nly. 3. Perfrm the fllwing steps n each target machine: a. Run the SAS Deplyment Wizard and select Install SAS Sftware n the Select Deplyment Type page. Ensure that Cnfigure SAS Sftware is nt selected. b. After the SAS Deplyment Wizard has cmpleted, perfrm step 6 frm the apprpriate perating system-specific sectin. Step 6 upgrades the PstgreSQL installatin files nly. c. Rerun the SAS Deplyment Wizard and select Cnfigure SAS Sftware n the Select Deplyment Type page. Ensure that Install SAS Sftware is nt selected. The SAS Deplyment Wizard will initialize the databases at the PstgreSQL 9.4 versin, s n additinal manual steps are needed. SAS and all ther SAS Institute Inc. prduct r service names are registered trademarks r trademarks f SAS Institute Inc. in the USA and ther cuntries. indicates USA registratin. Other brand and prduct names are trademarks f their respective cmpanies. Cpyright 2017 SAS Institute Inc. Cary, NC, USA. All rights reserved. 11 1 Nvember 2017