Kỹ Thuật - Công Nghệ - Báo cáo khoa học, luận văn tiến sĩ, luận văn thạc sĩ, nghiên cứu - Công nghệ thông tin Universal CMDB Software Version: 10.33 Database Guide Document Release Date: July 2017 Software Release Date: July 2017 Legal Notices Disclaimer Certain versions of software andor documents (“Material”) accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard EnterpriseHPE marks is historical in nature, and the HP and Hewlett Packard EnterpriseHPE marks are the property of their respective owners. Warranty The only warranties for products and services of Micro Focus and its affiliates and licensors (“Micro Focus”) are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. Micro Focus shall not be liable for technical or editorial errors or omissions contained herein. The information contained herein is subject to change without notice. Restricted Rights Legend Confidential computer software. Except as specifically indicated otherwise, a valid license from Micro Focus is required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor''''s standard commercial license. Copyright Notice 2002 - 2017 Micro Focus or one of its affiliates. Trademark Notices MICRO FOCUS and the Micro Focus logo, among others, are trademarks or registered trademarks of Micro Focus (IP) Limited or its subsidiaries in the United Kingdom, United States and other countries. All other marks are the property of their respective owners. Adobe™ is a trademark of Adobe Systems Incorporated. Microsoft and Windows are U.S. registered trademarks of Microsoft Corporation. UNIX is a registered trademark of The Open Group. Documentation Updates To check for recent updates or to verify that you are using the most recent edition of a document, go to: https:softwaresupport.softwaregrp.com. This site requires that you register for a Software Passport and to sign in. To register for a Software Passport ID, click Register for Software Passport on the Micro Focus Support website at https:softwaresupport.softwaregrp.com. You will also receive updated or new editions if you subscribe to the appropriate product support service. Contact your Micro Focus sales representative for details. Support Visit the Micro Focus Support site at: https:softwaresupport.softwaregrp.com. This website provides contact information and details about the products, services, and support that Micro Focus offers. Micro Focus online support provides customer self-solve capabilities. It provides a fast and efficient way to access interactive technical support tools needed to manage your business. As a valued support customer, you can benefit by using the support website to: l Search for knowledge documents of interest l Submit and track support cases and enhancement requests l Download software patches l Manage support contracts l Look up Micro Focus support contacts l Review information about available services l Enter into discussions with other software customers l Research and register for software training Most of the support areas require that you register as a Software Passport user and to sign in. Many also require a support contract. To register for a Software Passport ID, click Register for Software Passport on the Micro Focus Support website at https:softwaresupport.softwaregrp.com. To find more information about access levels, go to: https:softwaresupport.softwaregrp.comwebsoftwaresupportaccess-levels. Integration Catalog accesses the Micro Focus Integration Catalog website. This site enables you to explore Micro Focus Product Solutions to meet your business needs, includes a full list of Integrations between Micro Focus Products, as well as a listing of ITIL Processes. The URL for this website is https:softwaresupport.softwaregrp.comkmKM01702731. Database Guide Micro Focus Universal CMDB (10.33) Page 2 of 77 Contents Part I: Introducing the Database Environment 6 Chapter 1: Introduction to Preparing the Database Environment 7 Databases in Use Overview 7 Universal CMDB Sizing 8 Hardware Requirements 8 UCMDB Server Connection Retries to the Database 9 How to Modify Composite Indexes 10 How to Reconfigure UCMDB to Use Another SchemaDatabase 11 Large Capacity Planning for UCMDB 12 Large Capacity Planning Overview 12 Configuring the UCMDB Server for Large Capacity 13 Configuring the Oracle Database for Large Capacity 14 Configuring the Microsoft SQL Database for Large Capacity 14 System Capacity Test 14 Part II: Deploying the Microsoft SQL Server Database 17 Chapter 2: Overview of Microsoft SQL Server Deployment 18 About Microsoft SQL Server Deployment 18 System Requirements 18 Installation Prerequisites 19 Checklist for Support and Certification 19 Chapter 3: Manually Creating the Microsoft SQL Server Databases 21 Overview of the Microsoft SQL Server Databases 21 Manually Creating the Universal CMDB Microsoft SQL Server Database 21 Chapter 4: Creating and Configuring the Microsoft SQL Server Database 23 Creating the Database 23 Configuring the Database 28 Monitoring the Fragmentation Indexes 32 Chapter 5: Using Windows Authentication to Access the Microsoft SQL Server Database 34 Enabling Universal CMDB to Work with Windows Authentication 34 Part III: Deploying the Oracle Server Database 37 Chapter 6: Overview of Oracle Server Deployment 38 Database Guide Micro Focus Universal CMDB (10.33) Page 3 of 77 About Oracle Server Deployment 38 System Requirements 39 Chapter 7: Manually Creating the Oracle Server Database Schemas 40 Overview of the Oracle Database Schema 40 Prerequisites 40 Creating Schema Default and Temporary Tablespaces 41 Creating Schema User Permissions 41 Creating Schemas and Schema Objects 42 Chapter 8: Oracle Server Configuration and Sizing Guidelines 43 Oracle Parameter Settings 43 Oracle Tablespaces 46 Locally Managed Tablespaces 47 Oracle Tablespace Settings 47 Using RAID Configuration 50 Connecting to an Oracle Database Using Service Name 52 Configuring Oracle JDBC Driver 53 Composite Indexes vs. Non Composite Indexes 53 Checklist for Universal CMDB Support and Certification 54 How to Enable Support for Oracle Advanced Security (OAS) in Generic DB Adapter Based Integrations 56 Chapter 9: Real Application Cluster Support 58 About Oracle Real Application Cluster (RAC) 58 Single Client Access Name 59 Client Side Configuration for Oracle RAC 59 CreateConnect to a Universal CMDB Database 62 Part IV: Deploying the PostgreSQL Server Database 64 Chapter 10: Overview of PostgreSQL Server Deployment 65 About PostgreSQL Server Deployment 65 System Requirements 65 Overview of the PostgreSQL Server Databases 66 PostgreSQL Deployment Options 66 Initialize the PostgreSQL Server 67 Chapter 11: PostgreSQL Server Configuration 69 PostgreSQL Parameter Settings 69 Critical PostgreSQL Server Files 70 How to Configure PostgreSQL on Probe to Accept Local Connections 71 Database Guide Micro Focus Universal CMDB (10.33) Page 4 of 77 Only How to Validate If the PostgreSQL Instance Is Listening Only to Localhost? 72 How to Configure PostgreSQL Log Files Rotation by Size 74 Always Exclude PostgreSQL Data Folder from Anti-Virus Scan 75 Send documentation feedback 77 Database Guide Micro Focus Universal CMDB (10.33) Page 5 of 77 Micro Focus Universal CMDB (10.33) Page 6 of 77 Part I: Introducing the Database Environment Chapter 1: Introduction to Preparing the Database Environment This chapter includes: Databases in Use Overview 7 Universal CMDB Sizing 8 Hardware Requirements 8 UCMDB Server Connection Retries to the Database 9 How to Modify Composite Indexes 10 How to Reconfigure UCMDB to Use Another SchemaDatabase 11 Large Capacity Planning for UCMDB 12 Databases in Use Overview To work with Universal CMDB, you must set up the CMDB database. The CMDB database is used for storage of configuration information that is gathered from the various Universal CMDB and third-party applications and tools. This information is used when building Universal CMDB views. You can set up the Universal CMDB databases on a Microsoft SQL Server, on an Oracle Server, or on a PostgreSQL Server, depending on the type of database server used in your organization. If you are working with a Microsoft SQL Server database, refer to "Deploying the Microsoft SQL Server Database" on page 17. If you are working with an Oracle Server database, refer to "Deploying the Oracle Server Database" on page 37. If you are working with a PostgreSQL Server database, refer to "Deploying the PostgreSQL Server Database" on page 64. Note: l It is strongly recommended to host database server (Oracle, Microsoft SQL, or PostgreSQL) on a physical machine , and it should be an independent server without other applications (including the UCMDB server) running on it. Micro Focus Universal CMDB (10.33) Page 7 of 77 Also, if the database server machine is a virtual machine, the resource MUST be dedicated for the database server. l Apart from the embedded PostgreSQL database server, installing UCMDB server and database server (Oracle, Microsoft SQL, or PostgreSQL) together on the same machine is not supported. l Database servers must be set to the same time zone, daylight savings settings and time as the Universal CMDB servers. l For details on working in a non-English language Universal CMDB environment, see the section on non-English locales in the interactive Universal CMDB Deployment Guide. l The UCMDB server(s) should be located in the same LAN with the database servers (without a proxy and firewalls between them). Otherwise, your system''''s performance may be impacted. Universal CMDB Sizing Universal CMDB database configuration requirements are dependent on the amount of data, as well as on the runtime load, generated by Universal CMDB. A small Universal CMDB deployment requires a database that can hold up to 1.5 million CMDB objects and links. A large Universal CMDB deployment requires a database containing 1.5 million or more CMDB objects and links. For more details, see the Universal CMDB Sizing Guide. Hardware Requirements The following table describes the minimum hardware (CPU and memory) requirements recommended for the Universal CMDB Oracle, Microsoft SQL, or PostgreSQL database server: Deployment CIs and Relationships Number of Processors Physical Memory Small < 2 million Minimum 1 dual core 8 GB RAM Standard 2 - 10 million Minimum 2 dual core or 1 quad core 8 GB RAM Large 10 - 40 million Minimum 2 dual core or 1 quad core 16 GB RAM 40 - 60 million 2 x 4 cores 32 GB RAM 60 - 120 million 2 x 8 cores 64 GB RAM > 120 million 2 x 8 cores 128 GB RAM Database Guide Chapter 1: Introduction to Preparing the Database Environment Micro Focus Universal CMDB (10.33) Page 8 of 77 Note: It is strongly recommended to host database server (Oracle, Microsoft SQL, or PostgreSQL) on a physical machine , and it should be an independent server without other applications running on it. Also, if the database server machine is a virtual machine, the resource MUST be dedicated for the database server. UCMDB Server Connection Retries to the Database Configure UCMDB Server Connection Retries to the Database By default UCMDB server tries to connect to the database for 10 times when there is a network problem. If you need to increase the number of the retries, do the following: 1. Open the \bin\wapper.conf file using a text editor. 2. Locate the following entry in the wapper.conf file and increase the number of startup retries to a desired value: Number of startup retries before stopping the service wrapper.maxfailedinvocations=10 3. Save the file. 4. Restart the UCMDB server for the change to take affect. In case of HA, restart the UCMDB server cluster. Configure UCMDB Server Connection Pool Connections Validations There are several best practices used regarding database connections. The most popular approach uses a connection pool to interact with the database as opposed to creating and closing the connection every time a request to UCMDB database is needed. Making a connection every time is very costly on the way UCDMB operates. Because of this reason UCMDB uses a connection pool, Apache DBCP Component, which is a third party library used. Once the pool is operating, every time a UCMDB component needs a connection to database it takes one from the pool that is already established. After using the connection it is returned to the pool. Database Guide Chapter 1: Introduction to Preparing the Database Environment Micro Focus Universal CMDB (10.33) Page 9 of 77 One role of the connection pool is to ensure that the connections are opened and can be used at any time. There are several ways the Apache DBCP can achieve this. One is using validation queries which means a select statement is run against the database server. For example, “ select 1 from dual " is the Oracle specific validation query. The latest database drivers provides the feature of testing the database connection without running a validation query. UCMDB uses this mechanism by default. In case the old mechanism is needed to be used, you can configure it as follows: 1. Open the \conf\connectionpool.conf file using a text editor. 2. Locate the useValidationQuery setting and set its value to 1, as follows: useValidationQuery=1 Any other value will use the default mechanism. 3. Save the connectionpool.conf file. 4. Restart the UCMDB server. How to Modify Composite Indexes A composite index contains multiple key columns. You can invoke the modifyCompositeIndexes JMX method to add or remove the CMDBID column as a key column in the indexes for the specified class. The method then modifies the indexes according to the specified parameters. Note: l This method only works for a Microsoft SQL or Oracle database. l When you perform a fresh install of the UCMDB 10.30 (or later), by default there are no composite indexes with the CMDBID as a key column on Oracle database (ROOT tables), and on Microsoft SQL databases (ROOT and CDM tables). To create the composite indexes with the CMDBID as a key column, follow the steps described in this procedure. It is highly recommended that you follow these best practices for running the modifyCompositeIndexes method: Database Guide Chapter 1: Introduction to Preparing the Database Environment Micro Focus Universal CMDB (10.33) Page 10 of 77 l Run the method when the probes are stopped and the database is not heavily used. l Create a schema dump before running the method. l For environments that execute heavy data-in operations, in order to speed up the INSERT statements, it is recommended to transform the database from composite index to non composite index by invoking the modifyCompositeIndexes method with composite indexes setting to false. To modify composite indexes: 1. On the UCMDB server, launch the Web browser and enter the following address: https:localhost:8443jmx-console You may have to log in with a user name and password. 2. Locate UCMDB:service=Dal Services and click the link to open the JMX MBean View, and then locate the modifyCompositeIndexes method. 3. Specify the following parameters of the method: o customerId: Specify the Customer ID (leave empty for the default customer) o class name: Specify the class name (allowed values are root and all) o composite indexes: Specify if the method rebuilds the indexes with CMDBID as a key column l True: CMDBID is a key column l False: CMDBID is not a key column 4. Click Invoke. Note: If any problem occurs, the operation rolls back and causes no change in the database. How to Reconfigure UCMDB to Use Another SchemaDatabase To reconfigure UCMDB to use another schema or database, 1. Stop all the Data Flow Probes connected to the UCMDB Server. 2. Stop the UCMDB Server. Database Guide Chapter 1: Introduction to Preparing the Database Environment Micro Focus Universal CMDB (10.33) Page 11 of 77 3. Make sure the existing schemadatabase server is reachable. 4. Run the Configuration Wizard. Windows: Start > All Programs > UCMDB > Start Universal CMDB Server Configuration Wizard Linux: Run the binconfigure.sh script 5. Follow the wizard steps. 6. Start the UCMDB Server. 7. After the UCMDB Server has started, start all the Data Flow Probes. Large Capacity Planning for UCMDB This section includes: l Large Capacity Planning Overview l Configuring the UCMDB Server for Large Capacity l Configuring the Oracle Database for Large Capacity l Configuring the Microsoft SQL Database for Large Capacity l System Capacity Test Large Capacity Planning Overview Using the default configuration, Universal CMDB can work with a deployment of more than 25 million CIs and relationships. To work with a larger deployment, you must implement the following configuration: Depending in the number of CIs and relationships, increase the CMDB heap as follows: CIs and Relationships Heap Size ≤ 40 million 12 GB 40 million – 60 million 16 GB Database Guide Chapter 1: Introduction to Preparing the Database Environment Micro Focus Universal CMDB (10.33) Page 12 of 77 CIs and Relationships Heap Size 60 million – 125 million 24 GB > 125 million 55 GB l For capacity planning requirements, see the Support Matrix section of the UCMDB Help. l For details about the changes you must make to the system configuration to support this capacity, see "Configuring the UCMDB Server for Large Capacity" in the Deployment Guide. l For details on how to improve performance, see "Configuring the Oracle Database for Large Capacity" and "Configuring the Microsoft SQL Database for Large Capacity" in the Deployment Guide. l For details about the setup used for capacity testing and performance results, see "System Capacity Test" in the Deployment Guide. Configuring the UCMDB Server for Large Capacity For the system to support the desired number of CIs and relationships, update the following parameters on the UCMDB Server: Parameter Default CIs and Relationships (million) Location≤ 40 40 – 60 60 – 125 > 125 wrapper.java. initmemory 1024 2048 8192 l Windows: C:\hp\UCMDB\ UCMDBServer\bin\ wrapper-platform.conf l Linux: opthpUCMDB UCMDBServerbin wrapper-platform.conf wrapper.java. maxmemory 4096 8192 16384 24576 56320 dal.object.condi tion.max.result. size 2000000 50000000 50000000 l Windows: C:\hp\UCMDB\ UCMDBServer\conf\ settings.override.properties l Linux: opthpUCMDB UCMDBServerconf settings.override.properties dal.use.memory. instead.temp.tab le.high.threshold. oracle 600000 6000000 6000000 10000000 dal.joinf.max.res ult.size 400000 4000000 4000000 Database Guide Chapter 1: Introduction to Preparing the Database Environment Micro Focus Universal CMDB (10.33) Page 13 of 77 Configuring the Oracle Database for Large Capacity When working on a system containing more than 40 million objects and relationships, you can improve performance by increasing the Oracle SGA and PGA to the following suggested sizes: CIs and Relationships SGA PGA 40 million – 60 million 22 GB 6 GB 60 million – 120 million 42 GB 14 GB > 120 million 88 GB 24 GB This improves the performance of both the TQL calculation for several types of TQL queries, as well as for data-in operations performed on the system. Configuring the Microsoft SQL Database for Large Capacity When working on a system containing more than 40 million objects and relationships, you can improve performance by increasing the Microsoft SQL Server Memory to the following suggested sizes: CIs and Relationships Microsoft SQL Server Memory 40 million – 60 million 28 GB > 60 million 56 GB System Capacity Test Setup Database Guide Chapter 1: Introduction to Preparing the Database Environment Micro Focus Universal CMDB (10.33) Page 14 of 77 The system capacity test is conducted for Microsoft SQL Server (with 125 million CIs and relationships) and Oracle Database (with 200 million CIs and relationships) separately, by using the following hardware configurations. Role CPU Memory OS + 3rd Party SW CMDB 2 x 4-cores 2.67 GHz 32 GB Microsoft Windows Server 2008 R2 Enterprise Edition x64 SP1 Database 2 x 8-cores 2.93 GHz 64 GB l Microsoft Windows Server 2008 R2 Enterprise Edition x64 SP1 l Microsoft SQL Server 2014 - 12.0.2000.8 (x64) Microsoft SQL Server Role CPU Memory OS + 3rd Party SW CMDB 2 x E5-2630V3 2.40GHz 32 GB Red Hat Enterprise Linux 7.2 Database 2 x E5-2630V3 2.40GHz 97 GB l Oracle Linux 7.2 l Oracle Database 12c Enterprise Edition x64 - 12.1.0.2 Oracle Database The following business flows were tested as part of the system test: l TQL Calculation TQLs were divided into sub groups according to the result size ( Start Universal CMDB Server Configuration Wizard ). For details on manually creating databases for Universal CMDB, see "Manually Creating the Microsoft SQL Server Databases" on page 21. For details on creating a Microsoft SQL database, see "Creating and Configuring the Microsoft SQL Server Database" on page 23. System Requirements This section describes the system requirements for working with Microsoft SQL Server in conjunction with Universal CMDB. This section includes the following topics: "Hardware Requirements" on the next page Micro Focus Universal CMDB (10.33) Page 18 of 77 "Software Requirements" below Hardware Requirements For Universal CMDB hardware sizing guidelines, see "Hardware Requirements" on page 8. For Microsoft SQL Server hardware requirements, refer to the installation guide for your Microsoft SQL Server release for your operating system. Software Requirements For details on supported versions of Microsoft SQL Server, see the Server Database Requirements section of the Universal CMDB Support Matrix. Installation Prerequisites The following prerequisite must be met before installing Microsoft SQL Server: l If you want to install Universal CMDB using the installation wizard, you must provide a user account that has database creator privileges. If you are going to create the database manually, supply Universal CMDB with a user account that is a part of dbdatareader, dbdatawriter and dbddladmin in the Universal CMDB database. Note: When working with Microsoft SQL Server, the CMDB collation and the SQL Server collation must be the same. Checklist for Support and Certification Information is provided in this section for both supported and certified Microsoft SQL Server options. The certified options are recommended for working with Universal CMDB. Certified options are rigorously tested by Micro Focus quality assurance personnel. Supported options are those options for which Micro Focus quality assurance personnel have successfully performed basic tests. Subject Microsoft SQL Server Supported Recommended Instances Default, Single Database Guide Chapter 2: Overview of Microsoft SQL Server Deployment Micro Focus Universal CMDB (10.33) Page 19 of 77 Subject Microsoft SQL Server Supported Recommended Authentication Mode Mixed, Windows Collation Case-insensitive. Universal CMDB does not support binary sort order and case sensitivity. Only case-insensitive order with a combination of accent, kana, or width settings is supported . Use the Collation Settings dialog box to select the collation. Do not select the binary check box. Accent, kana, and width sensitivity should be selected according to the relevant data language requirements. The selected language must be the same as the OS Windows regional settings language. Network Libraries Server: TCPIP and Named Pipes Client: TCPIP and Named Pipes Server: TCPIP Client: TCPIP Server Configuration Options Defaults, unless instructed otherwise Data File Properties Manual file growth, or FILEGROWTH less than or equal to 100 MB FILEGROWTH: ~30-100 MB Collation Database Property Server default Database Options Defaults, unless instructed otherwise Recovery Model Any Full Note: For Turkish, the recommended collation is Turkish100CIAS. Database Guide Chapter 2: Overview of Microsoft SQL Server Deployment Micro Focus Universal CMDB (10.33) Page 20 of 77 Chapter 3: Manually Creating the Microsoft SQL Server Databases This chapter includes: Overview of the Microsoft SQL Server Databases 21 Manually Creating the Universal CMDB Microsoft SQL Server Database 21 Overview of the Microsoft SQL Server Databases Universal CMDB uses the configuration management database (CMDB) for its persistency. During the Universal CMDB setup, the new database can be set up automatically by the setup procedure, or an existing database can be used. An existing database can either be created manually in advance (for example, due to organization security restrictions), or can be created by a previous installation of the same release of Universal CMDB. For details about installing the Universal CMDB server, see the interactive Universal CMDB Deployment Guide. Manually Creating the Universal CMDB Microsoft SQL Server Database Before creating the database, you must install the Microsoft SQL Database Server according to the Microsoft SQL Server documentation. If the Universal CMDB database is manually created prior to running the Universal CMDB setup, during the setup procedure, you select the option to use an existing database and enter the relevant data about the existing database for which you are prompted. The data you enter is written to the configuration files that are used by the JDBC driver to connect to the existing database. Creating the Database The database administrator should create a Microsoft SQL Server database for the CMDB data. No scripts are necessary to create the objects to populate this database. Micro Focus Universal CMDB (10.33) Page 21 of 77 To create a database, you must have CREATE DATABASE permissions. To connect to an existing database, the login account with which you are connecting must be mapped to dbo in the database. Note: Members of the sysadmin server role automatically have CREATE DATABASE permissions, and are also mapped to dbo in all databases. A database owner is automatically mapped to dbo in the database. For details on creating the database manually, see "Creating and Configuring the Microsoft SQL Server Database" on page 23. Note: When the Universal CMDB setup procedure automatically creates the database, it uses two file groups for each database; one to hold the system tables and one for the application data. Database Guide Chapter 3: Manually Creating the Microsoft SQL Server Databases Micro Focus Universal CMDB (10.33) Page 22 of 77 Chapter 4: Creating and Configuring the Microsoft SQL Server Database This chapter includes: Creating the Database 23 Configuring the Database 28 Monitoring the Fragmentation Indexes 32 Creating the Database This section includes the following topics: "Database Permissions" below "Database File Layout" on the next page "System Databases" on page 27 Database Permissions To create a database, you must have CREATE DATABASE permissions. To grant CREATE DATABASE permissions to a user, the user’s login must first be mapped to a database user in the master database. Note: Universal CMDB login accounts should be mapped to dbo in the database. Members of the sysadmin server role automatically have CREATE DATABASE permissions, and are also mapped to dbo in all databases. A database owner is automatically mapped to dbo in the database. To check whether a user has CREATE DATABASE permissions, log in to Management Studio with the login account of the user whose permissions you want to check, and run the following: USE master IF PERMISSIONS() 1 = 1 PRINT ‘User has CREATE DATABASE permissions.’ Micro Focus Universal CMDB (10.33) Page 23 of 77 To check whether a user has enough permissions in the database, log in to Management Studio with the login account of the user whose mapping you want to check. Change the database context to the required database, and run the following command: select case when ISMEMBER (''''dbowner'''')=1 or ISSRVROLEMEMBER (''''sysadmin'''')=1 or (ISMEMBER (''''dbddladmin'''') = 1 and ISMEMBER (''''dbdatareader'''')=1 and ISMEMBER (''''dbdatawriter'''')=1 and ISMEMBER (''''dbdenydatareader'''')=0 and ISMEMBER (''''dbdenydatawriter'''')=0 ) then ''''User has enough permissions'''' else ''''User does not have enough permissions'''' end Database File Layout When you create a database, it must consist of at least one data file (with an .mdf extension) and one transaction log file (with an .ldf extension). You can optionally create additional data files (.ndf), as well as additional log files (.ldf). To enhance performance, you may want to create several data files. Microsoft SQL Server stripes the data among the data files, so that if you do not have RAID controllers that stripe your data, you can spread the data files over several regular physical disks and, in this way, have the data striped. The log, however, is read sequentially, so that there is no performance gain in adding more log files. An additional log file should be created on a different disk when your existing log is out of disk space. Data and Log Placement Caution: l It is recommended not to place data or log files on the same disk that stores the page (swap) file. l It is recommended that you place the data and log files on separate disk subsystems. l Log files. Changes are not flushed to the database until they are written to the log, and the log architecture dictates serial writes, so it is advisable that there be as little interference as possible with the log activity. It is usually sufficient to place the log on a RAID 1 system because of the serial writes to the log. If you have processes reading from the log (for example, triggers accessing the inserted and deleted views which are formed from the log records or transactional replication), or Database Guide Chapter 4: Creating and Configuring the Microsoft SQL Server Database Micro Focus Universal CMDB (10.33) Page 24 of 77 several log files for different databases, consider placing the log file(s) on a RAID 0+1 (striped mirror) system. l Data files. Data files should be placed on a RAID 0+1 system for optimal performance. File and Database Properties When you create a database you can specify the following properties for each file (.mdf, .ndf, .ldf): l NAME. The logical file name which you can use later when you want to alter one of the properties. l FILENAME. The physical file path and name. Make sure the destination directory is not compressed (right-click the directory in Windows Explorer, select Advanced, and verify that the Compression check box is not selected). l SIZE. The initial file size. l MAXSIZE. Determines the maximum size to which the file can grow. If this argument is omitted, or if you specify Unlimited, the file can grow until the disk is full. l FILEGROWTH. The automatic growth increment of the file. This argument can be specified as either a percentage of the existing file size, or as a fixed size. An autogrowth operation invoked by a modification sent by a client that timed out cannot be completed successfully. This means that the next time a client sends a modification, the autogrowth process starts at the beginning and may also time out. To avoid this problem, it is recommended that you either expand the files manually every time the database nearly reaches full capacity (for example, 20 percent free), or set the growth increment to a fixed size that takes less time to be allocated than the client’s timeout setting. Using a small growth increment is not recommended because it increases file system fragmentation. On the other hand, if you use a very large increment, modifications sent by clients might incur connection timeouts while waiting for the automatic expansion to finish. For large databases, a percentage growth increment can lead to exponential growth of the database and should be avoided. For more information on this problem, refer to Microsoft Knowledge Base Article - 305635 (http:support.microsoft.comkb305635). l ALLOWSNAPSHOTISOLATION and READCOMMITTEDSNAPSHOT. Set the database properties ON for ALLOWSNAPSHOTISOLATION and READCOMMITTEDSNAPSHOT with the following script: ALTER DATABASE {dbName} SET ALLOWSNAPSHOTISOLATION ON ALTER DATABASE {dbName} SET SINGLEUSER WITH ROLLBACK IMMEDIATE ALTER DATABASE {dbName} SET READCOMMITTEDSNAPSHOT ON Database Guide Chapter 4: Creating and Configuring the Microsoft SQL Server Database Micro Focus Universal CMDB (10.33) Page 25 of 77 ALTER DATABASE {dbName} SET MULTIUSER Note: o The above database properties MUST be set for UCMDB database even if the database is not on AlwaysOn. o If the database is set on AlwaysOn, the above database properties must be set before you add the database on AlwaysOn. The tempdb Database Settings The frequent expansion of the tempdb system database can affect the database’s performance, especially in large Microsoft SQL Server installations. The size of the tempdb, therefore, should be large enough to avoid the need for early expansion. Its growth increment should be large enough to avoid fragmentation, yet not too large to expand in a reasonable amount of time. Create the tempdb with a minimum, initial size of 1 GB and with a growth increment of 50 MB. The tempdb database should be striped across several disks, ideally on a RAID 0+1 controller. It is recommended to move the tempdb database to its own set of disks. To ensure that there is enough disk space for the tempdb to grow during times of heavy usage (for example, when aggregating or sorting data), it is recommended that you leave at least 20 GB free disk space on the drive where the tempdb is located. File Groups File groups are logical groupings of data files. Each of the following objects can be placed in its own file group unit: l A table’s data l A table’s large objects (text, ntext, image columns) l An index Data is inserted proportionally into all files belonging to the file group in which the object is stored, according to the amount of free space in each file. The .mdf file is placed in a file group called PRIMARY, which is marked as Default when the database is created (the default file group for objects when no file group is specified). If you do not place other data files (.ndf files) in their own file groups, they are also placed in the PRIMARY file group. Note that you can change the Default file group later on. File groups can be used for performance tuning or maintenance. For details, see Microsoft SQL Server Books Online at http:www.microsoft.comdownloads. Following is an example that demonstrates how to use file groups for maintenance: Database Guide Chapter 4: Creating and Configuring the Microsoft SQL Server Database Micro Focus Universal CMDB (10.33) Page 26 of 77 l Partial Restoring. Microsoft SQL Server does not support the restoration of a single table. Even if you place a single table in a file group, you cannot restore a file group to a point in time earlier than the rest of the data. Instead, you must apply all log file backups in order to synchronize the file group with the rest of the data. Microsoft SQL Server supports partial restoration to a database with a different name. A partial restoration allows you to restore a single file group, and supports point-in- time restoration. However, you must restore the PRIMARY file group because it contains the SYSTEM tables. To be able to restore a single table to a point in time if a logical error occurs, you need to design the file groups in your database as follows: o Ensure that the .mdf file is the only file in the PRIMARY file group. o Place each large table in its own file group. o Place all small tables in a separate file group. System Databases The following system databases are especially important for the smooth performance of Microsoft SQL Server: l tempdb. Numerous Microsoft SQL Server activities—such as creating local and global temporary tables, creating work tables behind the scenes to spool intermediate query execution results, and sorting—implicitly or explicitly use the tempdb system database. If your system is not configured properly, the tempdb database can become a performance bottleneck, so it is very important to determine the tempdb database’s original size correctly. For more information on setting database sizes, see "The tempdb Database Settings" on the previous page. To move tempdb’s files, use the ALTER DATABASE tempdb MODIFY FILE command, and restart Microsoft SQL Server. l master, msdb, model. These databases, although crucial for the operation of Microsoft SQL Server, are smaller than tempdb because they store only meta data. It is strongly recommended to use a fault tolerant disk—ideally, RAID 1—for these databases. Note: For Universal CMDB certification, place system databases on fault tolerant disks. It is recommended to use RAID 1 disks. To check the database’s properties, run the following: Database Guide Chapter 4: Creating and Configuring the Microsoft SQL Server Database Micro Focus Universal CMDB (10.33) Page 27 of 77 EXEC sphelpdb Configuring the Database Once you have created the necessary databases, you can add new files to the databases, change some of the existing database file properties, and set the database configuration options appropriately. This section includes the following topics: "Database File Configuration" "Database Configuration Options" "Composite Indexes vs. Non Composite Indexes" Database File Configuration You can change certain database file properties, as well as add or drop files using either of the following methods: l use the Properties dialog box in Management Studio l use the ALTER DATABASE command (for details, see Microsoft SQL Server Books Online at http:www.microsoft.comdownloads) Adding Files Data files can be added to an existing file group in a database, or to a new file group. There are no special restrictions or requirements. Dropping Files To drop a file, you must first empty it using the DBCC SHRINKFILE command’s EMPTYFILE option, which transmits the file data to all the other files in the file group. Once you empty the file, you can use the ALTER DATABASE DROP FILE command to drop it. Changing File Properties You can change the size-related properties for all databases, as well as the filename property for the tempdb database (this takes effect after you restart Microsoft SQL Server). The SIZE, MAXSIZE, and FILEGROWTH properties can be changed using the ALTER DATABASE tempdb MODIFY FILE command. Note that the SIZE property can only be enlarged. Database Guide Chapter 4: Creating and Configuring the Microsoft SQL Server Database Micro Focus Universal CMDB (10.33) Page 28 of 77 To shrink the file, use the DBCC SHRINKFILE command. For details and recommendations concerning file properties, see "Creating the Database" on page 23. Database Configuration Options Each database contains a set of configurable options that determine its behavior. You can view or change the database options using any one of the following utilities: l the Options tab in the Management Studio’s Properties dialog box l the EXEC spdboptions stored procedure l the ALTER DATABASE SET command Note: Not all of the database configuration options are available in this dialog box. The following table lists, in alphabetical order, the default configuration options, as well as the configuration settings required for Universal CMDB certification: Configuration Option Description Default Universal CMDB Certification in Microsoft SQL Server ANSI NULL default (see note below) Specifies whether the database columns are defined as NULL or NOT NULL, by default Not set Not set ANSI PADDING Controls the way the column stores values shorter than the defined size of the column and the way the column stores values that have trailing blanks in char, varchar, binary, and varbinary data. OFF ON Auto close Specifies whether the database shuts down after its resources are freed and all users exit Not set Not set Note: If set, it may take a long time for the database to allocate Database Guide Chapter 4: Creating and Configuring the Microsoft SQL Server Database Micro Focus Universal CMDB (10.33) Page 29 of 77 Configuration Option Description Default Universal CMDB Certification in Microsoft SQL Server resources every time a user connects, after the database is closed. Auto create statistics Specifies whether missing statistics required by a query for optimization are built automatically during optimization Set Set Auto shrink Specifies whether the database is automatically shrunk every hour, leaving 25 of free space Not set Not set Note: If set, constant growth shrinkage may cause file system fragmenta tion. Auto update statistics Specifies whether out-of-date statistics required by a query for optimization are built automatically during optimization Set Set Compatibility level The version of Microsoft SQL Server that the database appears to be (for the application) The same version as the release installed The same version as the release installed Read only Database is read only Not set (READ WRITE) READ WRITE Recovery The database recovery model determines the recovery capabilities by controlling the Full Full (unless you are certain that the lower recovery Database Guide Chapter 4: Creating and Configuring the Microsoft SQL Server Database Micro Focus Universal CMDB (10.33) Page 30 of 77 Configuration Option Description Default Universal CMDB Certification in Microsoft SQL Server amount of bulk operation logging (such as Select into, Bulk, Insert, Create index, LOB manipulation). The higher the recovery model, the higher the recovery capabilities. However, the amount of logging also increases, which may affect performance. capabilities are sufficient for your system) Recursive triggers Specifies whether recursive triggers are supported Not set Not set Restrict access Only single users or members of the dbowner, dbcreator, or sysadmin groups can access the database. Not set (MULTI USER) MULTIUSER Torn page detection Specifies whether incomplete pages can be detected Set Set Truncate log on checkpoint Automatically marks inactive portions of log for reuse on checkpoint Not set NA Use quoted identifiers Specifies whether the Microsoft SQL Server enforces ANSI rules regarding quotation marks. Select this option to specify that double quotation marks be used only for identifiers, such as column and table names. Note that character strings must be enclosed in single quotation marks. Not set Not set Note: Not all ANSI options can be set using Management Studio. The ANSI database configuration options include: ANSINULLS, ANSINULLDEFAULT, ANSIPADDING, ANSIWARNINGS, ARITHABORT, CONCATNULLYIELDSNULL, NUMERICROUNDABORT, and QUOTED IDENTIFIER. The options you set may not take effect, since these options can also be set at a higher level. Database Guide Chapter 4: Creating and Configuring the Microsoft SQL Server Database Micro Focus Universal CMDB (10.33) Page 31 of 77 For example, if the session option QUOTEDIDENTIFIER was turned on , the equivalent database configuration option is irrelevant. Some tools or database interfaces turn certain session options on or off, so that the database configuration options never take effect. The following table summarizes the characteristics of each recovery model: Model Support Allows Log Backup Allows Point- in-TimeLog Mark Restoration Allows Backup Log when Data Crashes (Saves changes until the crash point) Amount of Bulk Operation Logging (can affect the performance of bulk operations) Simple No No No Minimal Bulk Logged Yes No No Minimal Full Yes Yes Yes Full To check your database’s properties, run the command: EXEC sphelpdb For information on SQL databases, see Microsoft SQL Server Books Online at http:www.microsoft.comdownloads. Composite Indexes vs. Non Composite Indexes For environments that execute heavy data-in operations, in order to speed up the INSERT statements, it is recommended to transform the database from composite index to non composite index. You can achieve this by invoking the modifyCompositeIndexes JMX method with composite indexes setting to false. For detailed instructions, see "How to Modify Composite Indexes". Monitoring the Fragmentation Indexes Due to the fact that UCMDB is an OLTP application and performs many insert, update, and delete operations each day, its indexes might become fragmented. The index fragmentation could be even higher if discovery jobs that run also modify the data. To determine the indexes'''' fragmentation, run the following script every day. This script could be scheduled as part of the SQL job. The result of the script contains all the indexes having average fragmentation larger than 15 percent. When you have data from several days, you should compare the results and determine if the fragmentation index continue to increase day by day. Database Guide Chapter 4: Creating and Configuring the Microsoft SQL Server Database Micro Focus Universal CMDB (10.33) Page 32 of 77 If the indexes continue to become more fragmented, you should rebuild these indexes each day. You must rebuild or reorganize the indexes when no discovery, enrichment, or other jobs that modify the data are running. To determinate the fragmentation indexes You must run this script in the context of the UCMDB database. In this example, replace CMDB DATABASE with the actual name of the client''''s UCMDB database. USE CMDBDATABASE select OBJECTNAME(b.objectid) as TblName , CAST(a.objectid as varchar) as objectid , CAST(a.indexid as varchar) as indexid , Coalesce(b.name,'''''''') as IndexName , CAST(Coalesce(a.avgfragmentationinpercent,'''''''') as varchar) as PercentFragment , CAST(CAST(Coalesce(a.fragmentcount,'''''''') as bigint) as varchar) as TotalFrags , CAST(Coalesce(a.avgfragmentsizeinpages,'''''''') as varchar) as PagesPerFrag , CAST(CAST(Coalesce(a.pagecount,'''''''') as bigint) as varchar) as NumPages , Coalesce(a.indextypedesc,'''''''') as IndexType , CAST(Coalesce(a.indexdepth,'''''''') as varchar) as indexdepth , CAST(Coalesce(a.indexlevel,'''''''') as varchar) as indexlevel , CAST(Coalesce(a.avgpagespaceusedinpercent,'''''''') as varchar) as avg pagespaceusedinpercent , CAST(CAST(Coalesce(a.recordcount,'''''''') as bigint) as varchar) as record count FROM sys.dmdbindexphysicalstats(DBID(''''CMDBDATABASE''''),NULL, NULL, NULL , ''''SAMPLED'''') AS a JOIN sys.indexes AS b ON a.objectid = b.objectid AND a.indexid = b.indexid WHERE a.avgfragmentationinpercent > 15 and recordcount > 100000 ORDER BY OBJECTNAME(b.objectid),a.indexid; Database Guide Chapter 4: Creating and Configuring the Microsoft SQL Server Database Micro Focus Universal CMDB (10.33) Page 33 of 77 Chapter 5: Using Windows Authentication to Access the Microsoft SQL Server Database Unless configured otherwise, Universal CMDB uses Microsoft SQL Server authentication to access the Microsoft SQL Server databases. However, Windows authentication can also be used. This chapter describes how to enable Universal CMDB to use Windows authentication to access Microsoft SQL Server databases. Note: The authentication procedure described in this chapter is relevant for Configuration Manager as well as Universal CMDB. This chapter includes: Enabling Universal CMDB to Work with Windows Authentication 34 Enabling Universal CMDB to Work with Windows Authentication You can enable Universal CMDB to use Windows authentication instead of Microsoft SQL Server authentication to access the Universal CMDB database. To enable Universal CMDB to use Windows authentication to access a Microsoft SQL database, you must: l Configure the Microsoft SQL Server to use Windows authentication. l Launch the Universal CMDB Server service on all the Universal CMDB servers with a Windows user that has the necessary permissions to access the Microsoft SQL database. l Run the UCMDB Server Configuration utility to create or connect to a Microsoft SQL database and specify the use of Windows authentication. This section includes the following topics: "Configuring Microsoft SQL Server to Use Windows Authentication" on the next page "Launching the UCMDB Server service with a Windows User " on the next page "Creating or Connecting to a Microsoft SQL Database Using Windows Authentication" on page 36 Micro Focus Universal CMDB (10.33) Page 34 of 77 Configuring Microsoft SQL Server to Use Windows Authentication To configure Microsoft SQL Server to use Windows authentication, perform the following steps: 1. In the SQL Server Enterprise Manager, select Security > Logins, right-click and choose New Login . 2. Enter the desired domain account, including the domain name, in the following pattern: DOMAIN\USER (for example, MYDOMAIN\MYACCOUNT). 3. In the Server Roles tab, select System Administrators and click OK. Launching the UCMDB Server service with a Windows User By default, the UCMDB Server service is run as a system service. If you have configured your Microsoft SQL Server to use Windows authentication, you must change the user running the UCMDB Server service to the same Windows user you defined for the Microsoft SQL Server in order to enable the service user to access the database. To change the UCMDB Server service user: 1. Disable Universal CMDB (Start > All Programs > UCMDB > Stop Universal CMDB Server ). 2. In Microsoft’s Services window, double-click UCMDBServer . The UCMDB Server Properties (Local Computer) dialog box opens. 3. Click the Log On tab. Database Guide Chapter 5: Using Windows Authentication to Access the Microsoft SQL Server Database Micro Focus Universal CMDB (10.33) Page 35 of 77 4. Select This account and browse to choose the user you previously defined for your Microsoft SQL Server. 5. Enter the selected user’s Windows password and confirm this password. 6. Click Apply to save your settings and OK to close the dialog box. 7. Enable Universal CMDB (Start > All Programs > UCMDB > Start Universal CMDB Server). Creating or Connecting to a Microsoft SQL Database Using Windows Authentication You create or connect to a database using the UCMDB Server Configuration utility. To create or connect to a Microsoft SQL database using Windows authentication, you must select this option within the UCMDB Server Configuration utility. For details on using the utility, see the section about accessing the servers in the interactive Universal CMDB Deployment Guide . Database Guide Chapter 5: Using Windows Authentication to Access the Microsoft SQL Server Database Micro Focus Universal CMDB (10.33) Page 36 of 77 Micro Focus Universal CMDB (10.33) Page 37 of 77 Part III: Deploying the Oracle Server Database Chapter 6: Overview of Oracle Server Deployment This chapter includes: About Oracle Server Deployment 38 System Requirements 39 About Oracle Server Deployment To deploy Oracle Server for use with Universal CMDB, perform the following procedures: Note: Oracle 12C must be installed without container database (CDB). UCMDB does not support Oracle 12C with CDB. l Install Oracle Server. For details on Oracle software installation, refer to the installation guide in the documentation for your specific Oracle platform. For software installation options, see "Oracle Server Configuration and Sizing Guidelines" on page 43. l Build a database on Oracle Server to store Universal CMDB data. For instance configuration and sizing guidelines, see "Oracle Server ...
Trang 2Legal Notices
Disclaimer
Certain versions of software and/or documents (“Material”) accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.
Warranty
The only warranties for products and services of Micro Focus and its affiliates and licensors (“Micro Focus”) are set forth in the express warranty statements accompanying such products and services Nothing herein should be construed as constituting an additional warranty Micro Focus shall not be liable for technical or editorial errors or omissions contained herein The information contained herein is subject to change without notice.
Restricted Rights Legend
Confidential computer software Except as specifically indicated otherwise, a valid license from Micro Focus is required for possession, use or copying Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S Government under vendor's standard commercial license.
Adobe™ is a trademark of Adobe Systems Incorporated.
Microsoft® and Windows® are U.S registered trademarks of Microsoft Corporation.
UNIX® is a registered trademark of The Open Group.
Documentation Updates
To check for recent updates or to verify that you are using the most recent edition of a document, go to: https://softwaresupport.softwaregrp.com
This site requires that you register for a Software Passport and to sign in To register for a Software Passport ID, click Register for Software Passport on the Micro Focus
Support website at https://softwaresupport.softwaregrp.com
You will also receive updated or new editions if you subscribe to the appropriate product support service Contact your Micro Focus sales representative for details.Support
Visit the Micro Focus Support site at: https://softwaresupport.softwaregrp.com
This website provides contact information and details about the products, services, and support that Micro Focus offers.
Micro Focus online support provides customer self-solve capabilities It provides a fast and efficient way to access interactive technical support tools needed to manage your business As a valued support customer, you can benefit by using the support website to:
l Search for knowledge documents of interest
l Submit and track support cases and enhancement requests
l Download software patches
l Manage support contracts
l Look up Micro Focus support contacts
l Review information about available services
l Enter into discussions with other software customers
l Research and register for software training
Most of the support areas require that you register as a Software Passport user and to sign in Many also require a support contract To register for a Software Passport ID,
click Register for Software Passport on the Micro Focus Support website athttps://softwaresupport.softwaregrp.com
To find more information about access levels, go to: https://softwaresupport.softwaregrp.com/web/softwaresupport/access-levels
Integration Catalog accesses the Micro Focus Integration Catalog website This site enables you to explore Micro Focus Product Solutions to meet your business needs,
includes a full list of Integrations between Micro Focus Products, as well as a listing of ITIL Processes The URL for this website is
https://softwaresupport.softwaregrp.com/km/KM01702731
Database Guide
Trang 3Part I: Introducing the Database Environment 6
Chapter 1: Introduction to Preparing the Database Environment 7
How to Reconfigure UCMDB to Use Another Schema/Database 11
Configuring the Oracle Database for Large Capacity 14 Configuring the Microsoft SQL Database for Large Capacity 14
Part II: Deploying the Microsoft SQL Server Database 17
Chapter 2: Overview of Microsoft SQL Server Deployment 18
Chapter 3: Manually Creating the Microsoft SQL Server Databases 21
Manually Creating the Universal CMDB Microsoft SQL Server Database 21 Chapter 4: Creating and Configuring the Microsoft SQL Server Database 23
Chapter 5: Using Windows Authentication to Access the Microsoft SQL
Enabling Universal CMDB to Work with Windows Authentication 34
Part III: Deploying the Oracle Server Database 37
Database Guide
Trang 4About Oracle Server Deployment 38
Chapter 7: Manually Creating the Oracle Server Database Schemas 40
Chapter 8: Oracle Server Configuration and Sizing Guidelines 43
Checklist for Universal CMDB Support and Certification 54 How to Enable Support for Oracle Advanced Security (OAS) in Generic
Part IV: Deploying the PostgreSQL Server Database 64
Database Guide
Trang 6Part I: Introducing the Database
Environment
Trang 7Chapter 1: Introduction to Preparing the
Database Environment
This chapter includes:
Databases in Use Overview 7
UCMDB Server Connection Retries to the Database 9How to Modify Composite Indexes 10How to Reconfigure UCMDB to Use Another Schema/Database 11Large Capacity Planning for UCMDB 12
Databases in Use Overview
To work with Universal CMDB, you must set up the CMDB database The CMDB database is used forstorage of configuration information that is gathered from the various Universal CMDB and third-partyapplications and tools This information is used when building Universal CMDB views
You can set up the Universal CMDB databases on a Microsoft SQL Server, on an Oracle Server, or on
a PostgreSQL Server, depending on the type of database server used in your organization
If you are working with a Microsoft SQL Server database, refer to"Deploying the Microsoft SQL ServerDatabase" on page 17
If you are working with an Oracle Server database, refer to"Deploying the Oracle Server Database" onpage 37
If you are working with a PostgreSQL Server database, refer to"Deploying the PostgreSQL ServerDatabase" on page 64
Note:
l It is strongly recommended to host database server (Oracle, Microsoft SQL, or PostgreSQL) on
a physical machine, and it should be an independent server without other applications
(including the UCMDB server) running on it
Trang 8Also, if the database server machine is a virtual machine, the resource MUST be dedicated forthe database server.
l Apart from the embedded PostgreSQL database server, installing UCMDB server and
database server (Oracle, Microsoft SQL, or PostgreSQL) together on the same machine is notsupported
l Database servers must be set to the same time zone, daylight savings settings and time as theUniversal CMDB servers
l For details on working in a non-English language Universal CMDB environment, see the
section on non-English locales in the interactive Universal CMDB Deployment Guide.
l The UCMDB server(s) should be located in the same LAN with the database servers (without aproxy and firewalls between them) Otherwise, your system's performance may be impacted
Universal CMDB Sizing
Universal CMDB database configuration requirements are dependent on the amount of data, as well as
on the runtime load, generated by Universal CMDB A small Universal CMDB deployment requires adatabase that can hold up to 1.5 million CMDB objects and links A large Universal CMDB deploymentrequires a database containing 1.5 million or more CMDB objects and links
For more details, see the Universal CMDB Sizing Guide.
Hardware Requirements
The following table describes the minimum hardware (CPU and memory) requirements recommendedfor the Universal CMDB Oracle, Microsoft SQL, or PostgreSQL database server:
Deployment CIs and Relationships Number of Processors Physical Memory
Small < 2 million Minimum 1 dual core 8 GB RAM
Standard 2 - 10 million Minimum 2 dual core or 1 quad core 8 GB RAM
Large 10 - 40 million Minimum 2 dual core or 1 quad core 16 GB RAM
40 - 60 million 2 x 4 cores 32 GB RAM
60 - 120 million 2 x 8 cores 64 GB RAM
Database Guide
Chapter 1: Introduction to Preparing the Database Environment
Trang 9Note: It is strongly recommended to host database server (Oracle, Microsoft SQL, or
PostgreSQL) on a physical machine, and it should be an independent server without other
applications running on it
Also, if the database server machine is a virtual machine, the resource MUST be dedicated for thedatabase server
UCMDB Server Connection Retries to the Database
Configure UCMDB Server Connection Retries to the Database
By default UCMDB server tries to connect to the database for 10 times when there is a network
problem
If you need to increase the number of the retries, do the following:
1 Open the <UCMDB_Server_Home>\bin\wapper.conf file using a text editor.
2 Locate the following entry in the wapper.conf file and increase the number of startup retries to a
desired value:
# Number of startup retries before stopping the service
wrapper.max_failed_invocations=10
3 Save the file
4 Restart the UCMDB server for the change to take affect
In case of HA, restart the UCMDB server cluster
Configure UCMDB Server Connection Pool Connections Validations
There are several best practices used regarding database connections The most popular approachuses a connection pool to interact with the database as opposed to creating and closing the connectionevery time a request to UCMDB database is needed Making a connection every time is very costly onthe way UCDMB operates Because of this reason UCMDB uses a connection pool, Apache DBCPComponent, which is a third party library used Once the pool is operating, every time a UCMDBcomponent needs a connection to database it takes one from the pool that is already established Afterusing the connection it is returned to the pool
Database Guide
Chapter 1: Introduction to Preparing the Database Environment
Trang 10One role of the connection pool is to ensure that the connections are opened and can be used at anytime There are several ways the Apache DBCP can achieve this One is using validation querieswhich means a select statement is run against the database server For example, “select 1 fromdual" is the Oracle specific validation query.
The latest database drivers provides the feature of testing the database connection without running avalidation query UCMDB uses this mechanism by default
In case the old mechanism is needed to be used, you can configure it as follows:
1 Open the <UCMDB_Server>\conf\connection_pool.conf file using a text editor.
2 Locate the useValidationQuery setting and set its value to 1, as follows:
useValidationQuery=1
Any other value will use the default mechanism
3 Save the connection_pool.conf file.
4 Restart the UCMDB server
How to Modify Composite Indexes
A composite index contains multiple key columns You can invoke the modifyCompositeIndexes JMX method to add or remove the CMDB_ID column as a key column in the indexes for the specified
class The method then modifies the indexes according to the specified parameters
Note:
l This method only works for a Microsoft SQL or Oracle database
l When you perform a fresh install of the UCMDB 10.30 (or later), by default there are no
composite indexes with the CMDB_ID as a key column on Oracle database (ROOT tables), and on Microsoft SQL databases (ROOT and CDM tables) To create the composite indexes with the CMDB_ID as a key column, follow the steps described in this procedure.
It is highly recommended that you follow these best practices for running the
modifyCompositeIndexes method:
Database Guide
Chapter 1: Introduction to Preparing the Database Environment
Trang 11l Run the method when the probes are stopped and the database is not heavily used.
l Create a schema dump before running the method
l For environments that execute heavy data-in operations, in order to speed up the INSERT
statements, it is recommended to transform the database from composite index to non composite
index by invoking the modifyCompositeIndexes method with composite indexes setting to
false.
To modify composite indexes:
1 On the UCMDB server, launch the Web browser and enter the following address:
https://localhost:8443/jmx-console
You may have to log in with a user name and password
2 Locate UCMDB:service=Dal Services and click the link to open the JMX MBean View, and then locate the modifyCompositeIndexes method.
3 Specify the following parameters of the method:
o customerId: Specify the Customer ID (leave empty for the default customer)
o class name: Specify the class name (allowed values arerootandall)
o composite indexes: Specify if the method rebuilds the indexes with CMDB_ID as a key
column
l True: CMDB_ID is a key column
l False: CMDB_ID is not a key column
4 Click Invoke.
Note: If any problem occurs, the operation rolls back and causes no change in the database.
How to Reconfigure UCMDB to Use Another
Schema/Database
To reconfigure UCMDB to use another schema or database,
1 Stop all the Data Flow Probes connected to the UCMDB Server
2 Stop the UCMDB Server
Database Guide
Chapter 1: Introduction to Preparing the Database Environment
Trang 123 Make sure the existing schema/database server is reachable.
4 Run the Configuration Wizard
Windows: Start > All Programs > UCMDB > Start Universal CMDB Server Configuration Wizard
Linux: Run the <UCMDB_Server_InstallDir>/bin/configure.sh script
5 Follow the wizard steps
6 Start the UCMDB Server
7 After the UCMDB Server has started, start all the Data Flow Probes
Large Capacity Planning for UCMDB
This section includes:
l Large Capacity Planning Overview
l Configuring the UCMDB Server for Large Capacity
l Configuring the Oracle Database for Large Capacity
l Configuring the Microsoft SQL Database for Large Capacity
l System Capacity Test
Large Capacity Planning Overview
Using the default configuration, Universal CMDB can work with a deployment of more than 25 millionCIs and relationships To work with a larger deployment, you must implement the following
configuration:
Depending in the number of CIs and relationships, increase the CMDB heap as follows:
# CIs and Relationships Heap Size
Trang 13# CIs and Relationships Heap Size
60 million – 125 million 24 GB
> 125 million 55 GB
l For capacity planning requirements, see theSupport Matrixsection of the UCMDB Help
l For details about the changes you must make to the system configuration to support this capacity,see "Configuring the UCMDB Server for Large Capacity" in the Deployment Guide
l For details on how to improve performance, see "Configuring the Oracle Database for Large
Capacity" and "Configuring the Microsoft SQL Database for Large Capacity" in the DeploymentGuide
l For details about the setup used for capacity testing and performance results, see "System
Capacity Test" in the Deployment Guide
Configuring the UCMDB Server for Large Capacity
For the system to support the desired number of CIs and relationships, update the following parameters
on the UCMDB Server:
Parameter Default
CIs and Relationships (million)
Location
≤ 40 40 – 60 60 – 125 > 125 wrapper.java.
Trang 14Configuring the Oracle Database for Large Capacity
When working on a system containing more than 40 million objects and relationships, you can improveperformance by increasing the Oracle SGA and PGA to the following suggested sizes:
Trang 15The system capacity test is conducted for Microsoft SQL Server (with 125 million CIs and
relationships) and Oracle Database (with 200 million CIs and relationships) separately, by using thefollowing hardware configurations
CMDB 2 x 4-cores @
2.67 GHz
32 GB Microsoft Windows Server 2008 R2 Enterprise
Edition x64 SP1Database 2 x 8-cores @
TQLs were divided into sub groups according to the result size (<100, <1000, and <10000),
according to the data set that the TQL retrieves, and according to the TQL configuration:
o Like Condition
o Like Ignore case
o Different number of hierarchies in the TQL results (2-5)
Trang 17Part II: Deploying the Microsoft SQL Server Database
Trang 18Chapter 2: Overview of Microsoft SQL Server Deployment
This chapter includes:
About Microsoft SQL Server Deployment 18
Installation Prerequisites 19Checklist for Support and Certification 19
About Microsoft SQL Server Deployment
To deploy Microsoft SQL Server for use with Universal CMDB, you must perform the following
procedures:
l Install and configure Microsoft SQL Server.
For details on installing and configuring Microsoft SQL Server, see the Microsoft SQL Serverdocumentation for your version of Microsoft SQL Server
l Create databases on Microsoft SQL Server.
You can create Universal CMDB databases manually or you can use the UCMDB Server
Configuration Wizard to create the databases (Start > All Programs > UCMDB > Start
Universal CMDB Server Configuration Wizard) For details on manually creating databases for
Universal CMDB, see"Manually Creating the Microsoft SQL Server Databases" on page 21.For details on creating a Microsoft SQL database, see"Creating and Configuring the Microsoft SQLServer Database" on page 23
Trang 19"Software Requirements" below
Hardware Requirements
For Universal CMDB hardware sizing guidelines, see"Hardware Requirements" on page 8 For
Microsoft SQL Server hardware requirements, refer to the installation guide for your Microsoft SQLServer release for your operating system
Software Requirements
For details on supported versions of Microsoft SQL Server, see the Server Database Requirements
section of the Universal CMDB Support Matrix.
Installation Prerequisites
The following prerequisite must be met before installing Microsoft SQL Server:
l If you want to install Universal CMDB using the installation wizard, you must provide a user
account that has database creator privileges If you are going to create the database manually,
supply Universal CMDB with a user account that is a part of db_datareader, db_datawriter and
db_ddladmin in the Universal CMDB database.
Note: When working with Microsoft SQL Server, the CMDB collation and the SQL Server collation
must be the same
Checklist for Support and Certification
Information is provided in this section for both supported and certified Microsoft SQL Server options.The certified options are recommended for working with Universal CMDB Certified options are
rigorously tested by Micro Focus quality assurance personnel Supported options are those options forwhich Micro Focus quality assurance personnel have successfully performed basic tests
Trang 20Collation Case-insensitive Universal
CMDB does not support binarysort order and case sensitivity
Only case-insensitive orderwith a combination of accent,kana, or width settings issupported
Use the Collation Settings dialog box to select the
collation Do not select the binary check box.
Accent, kana, and width sensitivity should beselected according to the relevant data languagerequirements The selected language must be thesame as the OS Windows regional settingslanguage
Trang 21Chapter 3: Manually Creating the Microsoft SQL Server Databases
This chapter includes:
Overview of the Microsoft SQL Server Databases 21Manually Creating the Universal CMDB Microsoft SQL Server Database 21
Overview of the Microsoft SQL Server Databases
Universal CMDB uses the configuration management database (CMDB) for its persistency
During the Universal CMDB setup, the new database can be set up automatically by the setup
procedure, or an existing database can be used An existing database can either be created manually inadvance (for example, due to organization security restrictions), or can be created by a previous
installation of the same release of Universal CMDB
For details about installing the Universal CMDB server, see the interactive Universal CMDB
Creating the Database
The database administrator should create a Microsoft SQL Server database for the CMDB data Noscripts are necessary to create the objects to populate this database
Trang 22To create a database, you must have CREATE DATABASE permissions To connect to an existingdatabase, the login account with which you are connecting must be mapped to dbo in the database.
Note: Members of the sysadmin server role automatically have CREATE DATABASE
permissions, and are also mapped to dbo in all databases A database owner is automatically
mapped to dbo in the database
For details on creating the database manually, see"Creating and Configuring the Microsoft SQL ServerDatabase" on page 23
Note: When the Universal CMDB setup procedure automatically creates the database, it uses
two file groups for each database; one to hold the system tables and one for the application data
Database Guide
Chapter 3: Manually Creating the Microsoft SQL Server Databases
Trang 23Chapter 4: Creating and Configuring the
Microsoft SQL Server Database
This chapter includes:
Configuring the Database 28Monitoring the Fragmentation Indexes 32
Creating the Database
This section includes the following topics:
"Database Permissions" below
"Database File Layout" on the next page
"System Databases" on page 27
Database Permissions
To create a database, you must have CREATE DATABASE permissions To grant CREATE
DATABASE permissions to a user, the user’s login must first be mapped to a database user in themaster database
Note: Universal CMDB login accounts should be mapped to dbo in the database Members of the
sysadmin server role automatically have CREATE DATABASE permissions, and are also
mapped to dbo in all databases A database owner is automatically mapped to dbo in the database
To check whether a user has CREATE DATABASE permissions, log in to Management Studio withthe login account of the user whose permissions you want to check, and run the following:
USE master
IF PERMISSIONS() & 1 = 1
PRINT ‘User has CREATE DATABASE permissions.’
Trang 24To check whether a user has enough permissions in the database, log in to Management Studio withthe login account of the user whose mapping you want to check Change the database context to therequired database, and run the following command:
select case when IS_MEMBER ('db_owner')=1
or IS_SRVROLEMEMBER ('sysadmin')=1
or (IS_MEMBER ('db_ddladmin') = 1 and
IS_MEMBER ('db_datareader')=1 and
IS_MEMBER ('db_datawriter')=1 and
IS_MEMBER ('db_denydatareader')=0 and
IS_MEMBER ('db_denydatawriter')=0 )
then 'User has enough permissions'
else 'User does not have enough permissions'
end
Database File Layout
When you create a database, it must consist of at least one data file (with an mdf extension) and onetransaction log file (with an ldf extension) You can optionally create additional data files (.ndf), as well
as additional log files (.ldf)
To enhance performance, you may want to create several data files Microsoft SQL Server stripes thedata among the data files, so that if you do not have RAID controllers that stripe your data, you canspread the data files over several regular physical disks and, in this way, have the data striped The log,however, is read sequentially, so that there is no performance gain in adding more log files An
additional log file should be created on a different disk when your existing log is out of disk space
Data and Log Placement
Caution:
l It is recommended not to place data or log files on the same disk that stores the page (swap)file
l It is recommended that you place the data and log files on separate disk subsystems
l Log files Changes are not flushed to the database until they are written to the log, and the log
architecture dictates serial writes, so it is advisable that there be as little interference as possiblewith the log activity It is usually sufficient to place the log on a RAID 1 system because of theserial writes to the log If you have processes reading from the log (for example, triggers accessingthe inserted and deleted views which are formed from the log records or transactional replication), or
Database Guide
Chapter 4: Creating and Configuring the Microsoft SQL Server Database
Trang 25several log files for different databases, consider placing the log file(s) on a RAID 0+1 (stripedmirror) system.
l Data files Data files should be placed on a RAID 0+1 system for optimal performance.
File and Database Properties
When you create a database you can specify the following properties for each file (.mdf, ndf, ldf):
l NAME The logical file name which you can use later when you want to alter one of the properties.
l FILENAME The physical file path and name Make sure the destination directory is not
compressed (right-click the directory in Windows Explorer, select Advanced, and verify that the
Compression check box is not selected).
l SIZE The initial file size.
l MAXSIZE Determines the maximum size to which the file can grow If this argument is omitted, or
if you specify Unlimited, the file can grow until the disk is full.
l FILEGROWTH The automatic growth increment of the file This argument can be specified as
either a percentage of the existing file size, or as a fixed size
An autogrowth operation invoked by a modification sent by a client that timed out cannot be
completed successfully This means that the next time a client sends a modification, the
autogrowth process starts at the beginning and may also time out
To avoid this problem, it is recommended that you either expand the files manually every time thedatabase nearly reaches full capacity (for example, 20 percent free), or set the growth increment to
a fixed size that takes less time to be allocated than the client’s timeout setting Using a smallgrowth increment is not recommended because it increases file system fragmentation On the otherhand, if you use a very large increment, modifications sent by clients might incur connectiontimeouts while waiting for the automatic expansion to finish For large databases, a percentagegrowth increment can lead to exponential growth of the database and should be avoided
For more information on this problem, refer to Microsoft Knowledge Base Article - 305635
(http://support.microsoft.com/kb/305635)
l ALLOW_SNAPSHOT_ISOLATION and READ_COMMITTED_SNAPSHOT Set the database
properties ON for ALLOW_SNAPSHOT_ISOLATION and READ_COMMITTED_SNAPSHOT
with the following script:
ALTER DATABASE [${dbName}] SET ALLOW_SNAPSHOT_ISOLATION ON
ALTER DATABASE [${dbName}] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE [${dbName}] SET READ_COMMITTED_SNAPSHOT ON
Database Guide
Chapter 4: Creating and Configuring the Microsoft SQL Server Database
Trang 26ALTER DATABASE [${dbName}] SET MULTI_USER
The tempdb Database Settings
The frequent expansion of the tempdb system database can affect the database’s performance,especially in large Microsoft SQL Server installations The size of the tempdb, therefore, should belarge enough to avoid the need for early expansion Its growth increment should be large enough toavoid fragmentation, yet not too large to expand in a reasonable amount of time Create the tempdbwith a minimum, initial size of 1 GB and with a growth increment of 50 MB The tempdb databaseshould be striped across several disks, ideally on a RAID 0+1 controller It is recommended to movethe tempdb database to its own set of disks
To ensure that there is enough disk space for the tempdb to grow during times of heavy usage (forexample, when aggregating or sorting data), it is recommended that you leave at least 20 GB free diskspace on the drive where the tempdb is located
Data is inserted proportionally into all files belonging to the file group in which the object is stored,
according to the amount of free space in each file The mdf file is placed in a file group called
PRIMARY, which is marked as Default when the database is created (the default file group for objects
when no file group is specified) If you do not place other data files (.ndf files) in their own file groups, they are also placed in the PRIMARY file group Note that you can change the Default file group later
Trang 27l Partial Restoring Microsoft SQL Server does not support the restoration of a single table Even if
you place a single table in a file group, you cannot restore a file group to a point in time earlier thanthe rest of the data Instead, you must apply all log file backups in order to synchronize the file groupwith the rest of the data Microsoft SQL Server supports partial restoration to a database with adifferent name A partial restoration allows you to restore a single file group, and supports point-in-time restoration However, you must restore the PRIMARY file group because it contains theSYSTEM tables
To be able to restore a single table to a point in time if a logical error occurs, you need to design thefile groups in your database as follows:
o Ensure that the mdf file is the only file in the PRIMARY file group.
o Place each large table in its own file group
o Place all small tables in a separate file group
System Databases
The following system databases are especially important for the smooth performance of Microsoft SQLServer:
l tempdb Numerous Microsoft SQL Server activities—such as creating local and global temporary
tables, creating work tables behind the scenes to spool intermediate query execution results, andsorting—implicitly or explicitly use the tempdb system database
If your system is not configured properly, the tempdb database can become a performance
bottleneck, so it is very important to determine the tempdb database’s original size correctly.For more information on setting database sizes, see"The tempdb Database Settings" on theprevious page
To move tempdb’s files, use the ALTER DATABASE tempdb MODIFY FILE command, and restartMicrosoft SQL Server
l master, msdb, model These databases, although crucial for the operation of Microsoft SQL
Server, are smaller than tempdb because they store only meta data
It is strongly recommended to use a fault tolerant disk—ideally, RAID 1—for these databases
Note: For Universal CMDB certification, place system databases on fault tolerant disks It is
recommended to use RAID 1 disks
To check the database’s properties, run the following:
Database Guide
Chapter 4: Creating and Configuring the Microsoft SQL Server Database
Trang 28EXEC sp_helpdb <database name>
Configuring the Database
Once you have created the necessary databases, you can add new files to the databases, changesome of the existing database file properties, and set the database configuration options appropriately.This section includes the following topics:
"Database File Configuration"
"Database Configuration Options"
"Composite Indexes vs Non Composite Indexes"
Database File Configuration
You can change certain database file properties, as well as add or drop files using either of the followingmethods:
l use the Properties dialog box in Management Studio
l use the ALTER DATABASE command (for details, see Microsoft SQL Server Books Online athttp://www.microsoft.com/downloads)
Changing File Properties
You can change the size-related properties for all databases, as well as the filename property for thetempdb database (this takes effect after you restart Microsoft SQL Server) The SIZE, MAXSIZE, andFILEGROWTH properties can be changed using the ALTER DATABASE tempdb MODIFY FILEcommand Note that the SIZE property can only be enlarged
Database Guide
Chapter 4: Creating and Configuring the Microsoft SQL Server Database
Trang 29To shrink the file, use the DBCC SHRINKFILE command For details and recommendations
concerning file properties, see"Creating the Database" on page 23
Database Configuration Options
Each database contains a set of configurable options that determine its behavior You can view orchange the database options using any one of the following utilities:
l the Options tab in the Management Studio’s Properties dialog box
l the EXEC sp_dboptions stored procedure
l the ALTER DATABASE <database name> SET command
Note: Not all of the database configuration options are available in this dialog box.
The following table lists, in alphabetical order, the default configuration options, as well as the
configuration settings required for Universal CMDB certification:
Configuration
Universal CMDB Certification
in Microsoft SQL Server
ANSI NULL default
(see note below)
Specifies whether the databasecolumns are defined as NULL orNOT NULL, by default
Not set Not set
ANSI PADDING Controls the way the column
stores values shorter than thedefined size of the column and theway the column stores values thathave trailing blanks in char,varchar, binary, and varbinarydata
Auto close Specifies whether the database
shuts down after its resources arefreed and all users exit
Not set Not set
Note: If
set, it maytake a longtime forthedatabase
to allocate
Database Guide
Chapter 4: Creating and Configuring the Microsoft SQL Server Database
Trang 30Universal CMDB Certification
in Microsoft SQL Server
resourcesevery time
a userconnects,after thedatabase
is closed.Auto create statistics Specifies whether missing
statistics required by a query foroptimization are built automaticallyduring optimization
Auto shrink Specifies whether the database is
automatically shrunk every hour,leaving 25% of free space
Not set Not set
Note: If
set,constantgrowth/shrinkagemaycause filesystemfragmentation
Auto update
statistics
Specifies whether out-of-datestatistics required by a query foroptimization are built automaticallyduring optimization
Compatibility level The version of Microsoft SQL
Server that the database appears
to be (for the application)
The same version asthe release installed
The sameversion as thereleaseinstalledRead only Database is read only Not set (READ_
WRITE)
READ_
WRITERecovery The database recovery model
determines the recoverycapabilities by controlling the
Full Full (unless
you are certainthat the lowerrecovery
Database Guide
Chapter 4: Creating and Configuring the Microsoft SQL Server Database
Trang 31Universal CMDB Certification
in Microsoft SQL Server
amount of bulk operation logging(such as Select into, Bulk, Insert,Create index, LOB manipulation)
The higher the recovery model, thehigher the recovery capabilities
However, the amount of loggingalso increases, which may affectperformance
capabilities aresufficient foryour system)
Recursive triggers Specifies whether recursive
triggers are supported
Not set Not set
Restrict access Only single users or members of
the db_owner, dbcreator, orsysadmin groups can access thedatabase
Not set (MULTI_
USER)
MULTI_USER
Torn page detection Specifies whether incomplete
pages can be detected
Not set N/A
Use quoted
identifiers
Specifies whether the MicrosoftSQL Server enforces ANSI rulesregarding quotation marks Selectthis option to specify that doublequotation marks be used only foridentifiers, such as column andtable names Note that characterstrings must be enclosed in singlequotation marks
Not set Not set
Note:
Not all ANSI options can be set using Management Studio The ANSI database configuration
options include: ANSI_NULLS, ANSI_NULL_DEFAULT, ANSI_PADDING, ANSI_WARNINGS,ARITHABORT, CONCAT_NULL_YIELDS_NULL, NUMERIC_ROUNDABORT, and QUOTED_IDENTIFIER
The options you set may not take effect, since these options can also be set at a higher level
Database Guide
Chapter 4: Creating and Configuring the Microsoft SQL Server Database
Trang 32For example, if the session option QUOTED_IDENTIFIER was turned on, the equivalent
database configuration option is irrelevant Some tools or database interfaces turn certain sessionoptions on or off, so that the database configuration options never take effect
The following table summarizes the characteristics of each recovery model:
Point-Restoration
Allows Backup Log when Data Crashes (Saves changes until the crash point)
Amount of Bulk Operation Logging (can affect the performance of bulk operations)
Simple No No No Minimal
Bulk
Logged
Full Yes Yes Yes Full
To check your database’s properties, run the command:
EXEC sp_helpdb <database name>
For information on SQL databases, see Microsoft SQL Server Books Online at
http://www.microsoft.com/downloads
Composite Indexes vs Non Composite Indexes
For environments that execute heavy data-in operations, in order to speed up the INSERT statements,
it is recommended to transform the database from composite index to non composite index
You can achieve this by invoking the modifyCompositeIndexes JMX method with composite
indexes setting to false For detailed instructions, see"How to Modify Composite Indexes"
Monitoring the Fragmentation Indexes
Due to the fact that UCMDB is an OLTP application and performs many insert, update, and deleteoperations each day, its indexes might become fragmented The index fragmentation could be evenhigher if discovery jobs that run also modify the data
To determine the indexes' fragmentation, run the following script every day This script could bescheduled as part of the SQL job The result of the script contains all the indexes having averagefragmentation larger than 15 percent When you have data from several days, you should compare theresults and determine if the fragmentation index continue to increase day by day
Database Guide
Chapter 4: Creating and Configuring the Microsoft SQL Server Database
Trang 33If the indexes continue to become more fragmented, you should rebuild these indexes each day Youmust rebuild or reorganize the indexes when no discovery, enrichment, or other jobs that modify thedata are running.
To determinate the fragmentation indexes
You must run this script in the context of the UCMDB database In this example, replace CMDB_DATABASE with the actual name of the client's UCMDB database
USE CMDB_DATABASE
select
OBJECT_NAME(b.object_id) as TblName
, CAST(a.object_id as varchar) as object_id
, CAST(a.index_id as varchar) as index_id
, CAST(Coalesce(a.index_depth,'') as varchar) as index_depth
, CAST(Coalesce(a.index_level,'') as varchar) as index_level
, CAST(Coalesce(a.avg_page_space_used_in_percent,'') as varchar) as avg_page_space_used_in_percent
, CAST(CAST(Coalesce(a.record_count,'') as bigint) as varchar) as record_count
FROM sys.dm_db_index_physical_stats(DB_ID('CMDB_DATABASE'),NULL, NULL, NULL ,'SAMPLED') AS a
JOIN sys.indexes AS b
ON a.object_id = b.object_id AND a.index_id = b.index_id
WHERE a.avg_fragmentation_in_percent > 15 and record_count > 100000
ORDER BY OBJECT_NAME(b.object_id),a.index_id;
Database Guide
Chapter 4: Creating and Configuring the Microsoft SQL Server Database
Trang 34Chapter 5: Using Windows Authentication to Access the Microsoft SQL Server Database
Unless configured otherwise, Universal CMDB uses Microsoft SQL Server authentication to accessthe Microsoft SQL Server databases However, Windows authentication can also be used
This chapter describes how to enable Universal CMDB to use Windows authentication to accessMicrosoft SQL Server databases
Note: The authentication procedure described in this chapter is relevant for Configuration Manager
as well as Universal CMDB
This chapter includes:
Enabling Universal CMDB to Work with Windows Authentication 34
Enabling Universal CMDB to Work with Windows
l Configure the Microsoft SQL Server to use Windows authentication
l Launch the Universal CMDB Server service on all the Universal CMDB servers with a Windowsuser that has the necessary permissions to access the Microsoft SQL database
l Run the UCMDB Server Configuration utility to create or connect to a Microsoft SQL database andspecify the use of Windows authentication
This section includes the following topics:
"Configuring Microsoft SQL Server to Use Windows Authentication" on the next page
"Launching the UCMDB Server service with a Windows User " on the next page
"Creating or Connecting to a Microsoft SQL Database Using Windows Authentication" on page 36
Trang 35Configuring Microsoft SQL Server to Use Windows Authentication
To configure Microsoft SQL Server to use Windows authentication, perform the following steps:
1 In the SQL Server Enterprise Manager, select Security > Logins, right-click and choose New
Login.
2 Enter the desired domain account, including the domain name, in the following pattern:
DOMAIN\USER (for example, MY_DOMAIN\MY_ACCOUNT)
3 In the Server Roles tab, select System Administrators and click OK.
Launching the UCMDB Server service with a Windows User
By default, the UCMDB Server service is run as a system service If you have configured your
Microsoft SQL Server to use Windows authentication, you must change the user running the UCMDBServer service to the same Windows user you defined for the Microsoft SQL Server in order to enablethe service user to access the database
To change the UCMDB Server service user:
1 Disable Universal CMDB (Start > All Programs > UCMDB > Stop Universal CMDB Server).
2 In Microsoft’s Services window, double-click UCMDB_Server The UCMDB Server Properties
(Local Computer) dialog box opens
3 Click the Log On tab.
Database Guide
Chapter 5: Using Windows Authentication to Access the Microsoft SQL Server Database
Trang 364 Select This account and browse to choose the user you previously defined for your Microsoft
SQL Server
5 Enter the selected user’s Windows password and confirm this password
6 Click Apply to save your settings and OK to close the dialog box.
7 Enable Universal CMDB (Start > All Programs > UCMDB > Start Universal CMDB Server).
Creating or Connecting to a Microsoft SQL Database Using Windows
Authentication
You create or connect to a database using the UCMDB Server Configuration utility To create orconnect to a Microsoft SQL database using Windows authentication, you must select this option withinthe UCMDB Server Configuration utility For details on using the utility, see the section about
accessing the servers in the interactive Universal CMDB Deployment Guide.
Database Guide
Chapter 5: Using Windows Authentication to Access the Microsoft SQL Server Database
Trang 37Part III: Deploying the Oracle Server
Database
Trang 38Chapter 6: Overview of Oracle Server
Deployment
This chapter includes:
About Oracle Server Deployment 38
About Oracle Server Deployment
To deploy Oracle Server for use with Universal CMDB, perform the following procedures:
Note: Oracle 12C must be installed without container database (CDB) UCMDB does not support
Oracle 12C with CDB
l Install Oracle Server.
For details on Oracle software installation, refer to the installation guide in the documentation foryour specific Oracle platform For software installation options, see"Oracle Server Configurationand Sizing Guidelines" on page 43
l Build a database on Oracle Server to store Universal CMDB data.
For instance configuration and sizing guidelines, see"Oracle Server Configuration and SizingGuidelines" on page 43 For details on database instance installation, refer to the installation guide
in the documentation for your specific Oracle platform
l Create one or more Oracle tablespaces to store Universal CMDB data.
For details, see"Oracle Tablespaces" on page 46
l Create an Oracle user schema for Universal CMDB schemas.
You can create Universal CMDB user schemas manually, or you can use the UCMDB Server
Configuration Wizard to create the schemas for you (Start > All Programs > UCMDB > Start
Universal CMDB Server Configuration Wizard) For details on creating an Oracle user schema
for Universal CMDB, see"Manually Creating the Oracle Server Database Schemas" on page 40