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 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 ALICE DCS WorkshopSvetozár Kapusta Get the Oracle Database server software

4 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 ALICE DCS WorkshopSvetozár Kapusta

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

7 ALICE DCS WorkshopSvetozár Kapusta Select your Operating System

8 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 ALICE DCS WorkshopSvetozár Kapusta Download Unzip to /Disk1 Directory Run setup

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

11 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 ALICE DCS WorkshopSvetozár Kapusta Basic Installation

13 ALICE DCS WorkshopSvetozár Kapusta Running setup.exe

14 ALICE DCS WorkshopSvetozár Kapusta

15 ALICE DCS WorkshopSvetozár Kapusta

16 ALICE DCS WorkshopSvetozár Kapusta

17 ALICE DCS WorkshopSvetozár Kapusta

18 ALICE DCS WorkshopSvetozár Kapusta

19 ALICE DCS WorkshopSvetozár Kapusta

20 ALICE DCS WorkshopSvetozár Kapusta

21 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 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:

23 ALICE DCS WorkshopSvetozár Kapusta

24 ALICE DCS WorkshopSvetozár Kapusta

25 ALICE DCS WorkshopSvetozár Kapusta

26 ALICE DCS WorkshopSvetozár Kapusta

27 ALICE DCS WorkshopSvetozár Kapusta

28 ALICE DCS WorkshopSvetozár Kapusta

29 ALICE DCS WorkshopSvetozár Kapusta

30 ALICE DCS WorkshopSvetozár Kapusta

31 ALICE DCS WorkshopSvetozár Kapusta

32 ALICE DCS WorkshopSvetozár Kapusta

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

34 ALICE DCS WorkshopSvetozár Kapusta

35 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 ALICE DCS WorkshopSvetozár Kapusta Configuring the client 2 Edit tnsnames.ora: DCS006 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DCSDEV.ALIDCS.CERN.CH) (INSTANCE_NAME = DCSDEV) (GLOBAL_NAME = DCSDEV.ALIDCS.CERN.CH) )

37 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 ALICE DCS WorkshopSvetozár Kapusta Thank you for your attention Questions ?

39 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 ALICE DCS WorkshopSvetozár Kapusta Oracle Terminology Schema Table Tablespace Index View Materialized view Synonym

41 ALICE DCS WorkshopSvetozár Kapusta

42 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 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 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 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 ArchiveControl.CreateSite('dcsdev', 'dcs006', ' ', 'd:\oracle10g\pvss\backup\'); 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 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 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 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 ALICE DCS WorkshopSvetozár Kapusta Advanced setup

50 ALICE DCS WorkshopSvetozár Kapusta

51 ALICE DCS WorkshopSvetozár Kapusta

52 ALICE DCS WorkshopSvetozár Kapusta

53 ALICE DCS WorkshopSvetozár Kapusta

54 ALICE DCS WorkshopSvetozár Kapusta

55 ALICE DCS WorkshopSvetozár Kapusta

56 ALICE DCS WorkshopSvetozár Kapusta

57 ALICE DCS WorkshopSvetozár Kapusta

58 ALICE DCS WorkshopSvetozár Kapusta

59 ALICE DCS WorkshopSvetozár Kapusta

60 ALICE DCS WorkshopSvetozár Kapusta

61 ALICE DCS WorkshopSvetozár Kapusta

62 ALICE DCS WorkshopSvetozár Kapusta

63 ALICE DCS WorkshopSvetozár Kapusta

64 ALICE DCS WorkshopSvetozár Kapusta

65 ALICE DCS WorkshopSvetozár Kapusta

66 ALICE DCS WorkshopSvetozár Kapusta

67 ALICE DCS WorkshopSvetozár Kapusta

68 ALICE DCS WorkshopSvetozár Kapusta

69 ALICE DCS WorkshopSvetozár Kapusta

70 ALICE DCS WorkshopSvetozár Kapusta

71 ALICE DCS WorkshopSvetozár Kapusta

72 ALICE DCS WorkshopSvetozár Kapusta

73 ALICE DCS WorkshopSvetozár Kapusta

74 ALICE DCS WorkshopSvetozár Kapusta

75 ALICE DCS WorkshopSvetozár Kapusta

76 ALICE DCS WorkshopSvetozár Kapusta

77 ALICE DCS WorkshopSvetozár Kapusta

78 ALICE DCS WorkshopSvetozár Kapusta

79 ALICE DCS WorkshopSvetozár Kapusta

80 ALICE DCS WorkshopSvetozár Kapusta

81 ALICE DCS WorkshopSvetozár Kapusta

82 ALICE DCS WorkshopSvetozár Kapusta

83 ALICE DCS WorkshopSvetozár Kapusta

84 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 ALICE DCS WorkshopSvetozár Kapusta PHP-Apache-Oracle10g

86 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