Presentation is loading. Please wait.

Presentation is loading. Please wait.

Setting up of an Oracle Database for testing purposes Quick guideline for ALICE Detectors (http://alicedcs.web.cern.ch/AliceDCS/)http://alicedcs.web.cern.ch/AliceDCS/

Similar presentations


Presentation on theme: "Setting up of an Oracle Database for testing purposes Quick guideline for ALICE Detectors (http://alicedcs.web.cern.ch/AliceDCS/)http://alicedcs.web.cern.ch/AliceDCS/"— Presentation transcript:

1 Setting up of an Oracle Database for testing purposes Quick guideline for ALICE Detectors (http://alicedcs.web.cern.ch/AliceDCS/)http://alicedcs.web.cern.ch/AliceDCS/ Svetozár Kapusta (CERN/Comenius University Bratislava)

2 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Outline This presentation: Contains many appendixes with technical details Available also on the ALICE DCS homepage (http://alicedcs.web.cern.ch/AliceDCS/)http://alicedcs.web.cern.ch/AliceDCS/ Get the Oracle Database server software Set up an Oracle server Get the Oracle Database client software Set up the Oracle client Configure PVSS to archive to the Oracle Database (preliminary and in the appendix)

3 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Get the Oracle Database server software

4 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Server Requirements RAM: 1 GB minimum Virtual memory: 512 MB Hard disk space: ~2.8 GB Temp disk space: 140 MB Video adapter: 256 color Windows version 4.0, 5.0, 5.1, 5.2 or Linux version x86 or Other OS (Mac OS X, Solaris, AIX5L, IBM...)

5 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta www.oracle.com

6 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Download… Oracle Database 10g

7 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Select your Operating System

8 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta License Agreement We (Oracle) grant you a nonexclusive, nontransferable limited license to use the programs only for the purpose of developing a single prototype of your application, and not for any other purpose.

9 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Download Unzip to /Disk1 Directory Run setup

10 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Downloading ~ 600MB Time for registration + download + unziping ~ 1-2h

11 28.02.2005 ALICE DCS WorkshopSvetozár KapustaInstalling No restart needed No “full” uninstallation possible Installation types: Basic ~1h Advanced (Select: Installation Type, DB Configuration, Management, File Storage, Backup and Recovery Options) ~1.3 h

12 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta http://www.oracle.com/technology/obe/2day_dba/install/install.htm Basic Installation

13 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Running setup.exe

14 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

15 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

16 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

17 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

18 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

19 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

20 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

21 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Security, Users, Privileges Pick a good password for SYS, SYSTEM, DBSNMP and SYSTEM accounts and/or restrict web access from outside If you need to use the database not only for PVSS – grant only necessary privileges to users

22 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Creating users Connect to your database Type and run SQL query: –CREATE USER "SPDUSER" PROFILE "DEFAULT" IDENTIFIED BY “USERPASS" DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK –GRANT UNLIMITED TABLESPACE TO " SPDUSER“ –GRANT "CONNECT" TO " SPDUSER“ –GRANT "RESOURCE" TO " SPDUSER “ –GRANT ALTER SESSION TO " SPDUSER “ –GRANT CREATE MATERIALIZED VIEW TO " SPDUSER “ –GRANT CREATE SYNONYM TO " SPDUSER “ –GRANT CREATE TABLE TO " SPDUSER “ –GRANT INSERT ANY TABLE TO " SPDUSER “ –GRANT SELECT ANY DICTIONARY TO " SPDUSER “ –GRANT SELECT ANY TABLE TO " SPDUSER “ –GRANT UPDATE ANY TABLE TO " SPDUSER “ Or: http://localhost:5500/em

23 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

24 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

25 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

26 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

27 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

28 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

29 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

30 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

31 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

32 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

33 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Get the Oracle Database client software and configure the client

34 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

35 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Configuring the client 1 Download the basic and SQL *plus packages Unzip to a directory (c:\instantclient) SET User variable SQLPATH=c:\instantclient SET User variable TNS_ADMIN=c:\instantclient SET System variable PATH=c:\instantclient Copy tnsnames.ora to c:\instantclient

36 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Configuring the client 2 Edit tnsnames.ora: DCS006 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.39.6)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DCSDEV.ALIDCS.CERN.CH) (INSTANCE_NAME = DCSDEV) (GLOBAL_NAME = DCSDEV.ALIDCS.CERN.CH) )

37 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Conclusions Setting up of an Oracle Database for testing purposes is easy We plan to start performance tests in the DCS lab with many clients

38 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Thank you for your attention Questions ?

39 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Slides not shown The following slides were not shown in the presentation but were used in discussions afterwards An Internal note will explain the topics described in these slides

40 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Oracle Terminology Schema Table Tablespace Index View Materialized view Synonym

41 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

42 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Configuring the DB server for PVSS 1 New environment variable: ORACLE_HOME=your_oracle_home_path Copy the file (PVSSOraExt.dll for win, PVSSOraExt.so for linux) contained in the PVSS patch to your_orahome\BIN Create directories archive_path\ –alert –backup –event –history

43 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Configuring the DB server for PVSS 2 Edit tnsnames.ora in the orahome\NETWORK\ADMIN directory your_connect_identifier = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = host)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = service_name) ) EXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)) ) (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO) )

44 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Configuring the DB server for PVSS 3 Edit listener.ora in the orahome\NETWORK\ADMIN directory SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = orahome) (PROGRAM = extproc) (ENV="EXTPROC_DLLS=ANY") ) (SID_DESC = (GLOBAL_NAME = global_name) (ORACLE_HOME = orahome) (SID_NAME = sid_name) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = host)(PORT = 1521)) ) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)) )

45 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Configuring the client for PVSS 1 Patch PVSS up to patch 45 Unzip rdbsetup from PVSS patch Edit rdb_arcsite.sql: begin -- lokal92@liwrk024 -- 1. ArchiveControl.CreateSite('dcsdev', 'dcs006', '192.168.39.6', 'd:\oracle10g\pvss\backup\'); -- 2. i := ArchiveControl.SetConfig('def_dbfile_path', 'C', 'd:\oracle10g\pvss\history\'); dbms_output.put_line('Setting Default Database File Path Returned: '||i); -- create standard groups i := ArchiveControl.CreateNewGroup('ALERT','ALERT', 'd:\oracle10g\pvss\alert\'); dbms_output.put_line('Anlage dynamisch ALERT: '||i); i := ArchiveControl.CreateNewGroup('EVENT', 'EVENT', 'd:\oracle10g\pvss\event\'); dbms_output.put_line('Anlage dynamisch EVENT: '||i); ArchiveControl.Init_Jobs; end; / commit;

46 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Configuring the client for PVSS 2 Run setup.bat Create new PVSS project Kill all archive managers Append new manager (rdb archive manager) with option –num 99, start mode manual

47 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Configuring the client for PVSS 3 Edit the config file: useRDBArchive = 1 [ValueArchiveRDB] dbuser = "pvssa" dbtype = "oracle" db = "dcs006" [ui] queryRDBdirect = 1 CtrlDLL = "CtrlRDBArchive.dll" CtrlDLL = "CtrlRDBCompr.dll" [ctrl] queryRDBdirect = 1 CtrlDLL = "CtrlRDBArchive.dll" CtrlDLL = "CtrlRDBCompr.dll"

48 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Configuring the client for PVSS 4 Run the project Edit the internal datapoint _rdbarchive – Set the host, user and password as chosen after running setup.bat Restart PVSS

49 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta Advanced setup

50 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

51 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

52 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

53 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

54 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

55 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

56 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

57 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

58 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

59 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

60 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

61 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

62 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

63 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

64 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

65 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

66 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

67 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

68 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

69 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

70 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

71 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

72 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

73 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

74 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

75 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

76 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

77 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

78 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

79 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

80 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

81 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

82 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

83 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta

84 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta DB Access Web access for DB users and administrators (called Enterprise Manager Console) Web access with own code (PHP-Apache) C++ access based on ADO

85 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta PHP-Apache-Oracle10g

86 28.02.2005 ALICE DCS WorkshopSvetozár Kapusta C++ ADO Oracle10g connstring[]="Driver={Microsoft ODBC for Oracle};"; CREATEiNSTANCE(spCON,Connection); spCON->ConnectionString = connstring; spCON->Open("DSN=dcsconf","scott","tiger",0); CREATEiNSTANCE(svetest,Recordset) svetest->PutRefActiveConnection( spCON ); sprintf(a, "SELECT * FROM scott.dcs"); svetest->Open(a, vtMissing,adOpenKeyset,adLockOptimistic, -1); svetest->MoveFirst(); while(svetest->adoEOF == false) { ID=(unsigned long)RsITEM(svetest,"ID"); svetest->MoveNext();} svetest->Close();


Download ppt "Setting up of an Oracle Database for testing purposes Quick guideline for ALICE Detectors (http://alicedcs.web.cern.ch/AliceDCS/)http://alicedcs.web.cern.ch/AliceDCS/"

Similar presentations


Ads by Google