Professional Documents
Culture Documents
December, 2006
COPYRIGHT
Copyright 2006 Schlumberger. All rights reserved.
The information in this document is subject to change without notice. The software described in this document is furnished
under a license agreement. This software may be used or copied only in accordance with the terms of such agreement. It is
against the law to copy the software on any medium except as specifically allowed in the license agreement. No part of this
document may be reproduced or transmitted in any form, or by any means, electronic or mechanical, including
photocopying and recording, for any purpose without the express written permission of Schlumberger.
Merak is a trademark of Schlumberger.
Merak Peep, Merak PetroDesk, Merak Portfolio, Merak Decision Tool Kit, Merak VOLTS, Merak Capital Planning,
Merak Petroleum Financials, Merak DBTools, Avocet Data Manager, Avocet Capture, Avocet Allocation, Avocet
Nomination, Avocet Mobile, Avocet Exchange, Avocet Import/Export, Avocet Integrated Asset Modeler, OFM, FieldBA,
and FieldViz are marks of Schlumberger.
Microsoft is a registered trademark of Microsoft Corporation.
BackOffice, Internet Explorer, Windows, Windows 98, Windows NT, Windows 2000, Windows XP, MSDOS, Word, Excel, ActiveX, ODBC, OLE, COM, Terminal Server, Microsoft Access, Visual C++, and
Microsoft SQL Server are registered trademarks of Microsoft Corporation.
Oracle is a registered trademark of Oracle Corporation.
Crystal Reports is a trademark of Business Objects.
All other names and trademarks are the property of their respective owners.
Contents
Merak Database Toolkit (DBTools).................................................................................. 1
Before you upgrade ........................................................................................................................1
DBTools v4.4 Upgrade and the RS_SUMMARY_RESULT_SET table..........................................1
Pre-upgrade instructions - RS_summary_result_set table .............................................................2
Setting up DBTools .........................................................................................................................2
About installing and updating databases ........................................................................................3
Updating an existing database........................................................................................................3
Installing a new database ...............................................................................................................4
Securing a database (VOLTS and Peep) .......................................................................................5
Oracle ........................................................................................................................................................6
SQL Server ................................................................................................................................................7
www.sis.slb.com
If columns have been added to the default table, the upgrade will delete these columns,
potentially resulting in a loss of data and also resulting in a disconnect between the
MERAK_RESULT_VAR table and the default result set table.
As the schema owner in SQLPLUS, run the script RS_SUMMARY_TEST.sql which will
indicate if any columns have been added and/or deleted from the standard
RS_SUMMARY_RESULT_SET table. If changes were made, proceed with the pre-upgrade
instructions.
2.
Setting up DBTools
You are required to set up the following items before using DBTools:
For this type of
database
Set this up
Microsoft SQL
Server
Oracle
8.i/9.i/10g
www.sis.slb.com
the supported versions in the install guide. If unsure, or looking for the latest
update please contact our support desk.
3.
4.
From the DBTools directory run the program DBTools.exe. The Merak Database Toolkit
dialog box opens.
5.
Select the Upgrade an existing Merak database option and click Next. The Select Data Source
dialog box opens.
6.
You are required to provide the ODBC Data Source into which you want to install a Merak
database. If you have not yet created an ODBC source, click ODBC Admin and set up the
necessary data source(s).
7.
If required (Oracle and SQL Server), enter the User ID and Password for administrative
access to the database.
8.
Click Next.
9.
Type the Global Parameter data source into the field, or click the arrow button to choose
from the drop-down list. Type the Userid and Password into their respective fields if
necessary. (If you are uncertain of the location of this data source, open Peep and choose Edit
Preferences. The Global Parms data source is shown in the Database tab.)
10. In the Application Upgrade Selection dialog box, confirm the applications for which you are
updating the database. If your database contains data for multiple applications all the
applicable applications are highlighted. If your database contains data for only one application
(as in this example), only that application is highlighted.
11. Be sure to confirm the version of the database you wish to upgrade to. Normally, this should
be the latest version available.
www.sis.slb.com
Notes:
if you are upgrading a VOLTS database you will also need to upgrade
your Peep database to the same version. DBTools will check for this
and display a message if all of the appropriate databases are not
upgraded to the correct version.
starting with the v4.0 release in 2003 the user is allowed to select the
version number for the MERAK database objects (shared tables).
Ensure that you receive the proper version numbers for the release.
12. Click Next. DBTools creates a transaction log that records the progress of the database
creation.
13. Type the path where you want to store the log file.
14. Click Next. If you are installing an Oracle database, you are prompted for the Data and
Index tablespace you want to populate using the Oracle Parameters dialog box. The fields for
each Tablespace are detected from the Oracle database.
15. Select the appropriate tablespace from the Data Tablespace and Index Tablespace dropdown lists. DBTools will verify that there is enough free space available in the tablespace(s)
selected before allowing you to continue.
16. Click Next. You are prompted to confirm all of the settings entered into DBTools.
Note:
Please take a moment at this time to confirm that all of the information is
correct before proceeding.
17. If an item requires modification, click Back to return to the appropriate dialog box.
18. When you are sure that all the information is correct, click Finish to update the database.
Note:
If an error occurs during the upgrade process the upgrade must be stopped,
the schema restored from backup, and the upgrade restarted. It is advisable
to retain the upgrade log and consult with SLB resources if you encounter this
problem.
www.sis.slb.com
selected. Consult the System Requirements section in the Introduction for information about
which databases are supported by a particular application.
25. Click Next. The Database Type Select dialog box opens.
26. Click Next. DBTools creates a transaction log that records the progress of the database
creation.
27. Type the path where you want the log file installed and click Next.
28. If you are installing an Oracle database, you are prompted for the Data and Index tablespace
you want to populate in the Oracle Parameters dialog box. The list of available tablespaces
is read directly from the Oracle database along with the amount of free space available within
each tablespace. Fields for each tablespace are detected from the Oracle database.
29. Select the appropriate tablespace from the Data Tablespace and Index Tablespace dropdown lists. DBTools will verify that there is enough free space available in the tablespace(s)
selected before allowing you to continue.
30. Click Next. You are prompted to confirm all of the settings entered into DBTools.
31. If an item requires modification, click the Back button to return to the appropriate dialog box.
32. When you are sure that all the information is correct, click Finish to create the database.
Database privileges
To properly install or upgrade a database to include the new security components, DBTools must
now perform additional security tasks including creating database roles and users. Before
DBTools attempts to install or upgrade a VOLTS or Peep database, it will check to see if the
database login name has the appropriate privileges. If the appropriate privileges have not been
granted then you will see a message similar to this:
When DBTools performs these security checks, it writes the results to a file called CHECK.LOG,
created in the same directory as the DBTools executable. You can check this log file to see what
permissions are missing. are The minimum set of permissions required for Oracle and SQL Server
database users are listed at the end of this chapter.
Notes:
www.sis.slb.com
DBTools should no longer be executed directly from the Merak Suite CD. All
of the files must first be copied to your local hard drive before attempting to
install or upgrade your database.
For Oracle databases, the xxx prefix is replaced by the name of the schema
owner. For example, if you connect to the database using the Oracle user
name SCOTT then the roles and users created would be named:
SCOTT_ADMIN_ROLE, SCOTT_BOOT_USER and SCOTT_APP_USER. For
SQL Server databases, these objects are automatically named
MERAK_ADMIN_ROLE, MERAK_BOOT_USER and MERAK_APP_USER.
It should also be noted that although user and role passwords are stored
within the security tables, they are always stored in an encrypted format and
in most cases are never decrypted but used for comparison to other
encrypted passwords to ensure that they match.
Security options
A new option has been added to DBTools to allow administrators to add new database
users/logins, to reset the password of one of the database users, or to reset the password for the
database roles. As the following indicates, this option is only for those applications that have
implemented the new security components (VOLTS and Peep).
When you select this option, you are presented with the same login screen that you would
normally see when installing or upgrading a database. You must connect to the database as the
owner of the database objects in order to perform any of the security functions. Once connected,
select the option you want to perform from the Operation drop-down list and type in the
necessary fields for that operation.
To complete the operation, click Save to commit your changes to the database. Only once you
have completed all of the security operations you want to perform should you click Finish.
Permissions
Oracle
The following is a list of permissions required in order to install or upgrade an Oracle database:
CREATE USER
ALTER USER
CREATE SESSION WITH ADMIN OPTION;
CREATE ROLE
www.sis.slb.com
SQL Server
To install or upgrade a SQL Server database the SQL Server login must have the db_owner
database role for the database you are installing or upgrading, and the Security Administrators
server role to enable the creation of the database logins and roles.
www.sis.slb.com
For the columns that have been added to the RS_SUMMARY_RESULT_SET table, alter the
table in SQLPLUS adding the columns to the current table with the same names that appear in
the SAVE_RS_SUMMARY table. For example, if a custom column named
AB_Gas_Production was identified, the following SQL would add this column to the current
table:
alter table RS_SUMMARY_RESULT_SET add AB_Gas_Production FLOAT;
2.
Once this is completed, remove any columns from the current table that have been removed
from the custom table. For example: if a column named COND_WI_VOL was removed from
the table, the current table needs to be adjusted to drop the column using the following SQL:
Alter table RS_SUMMARY_RESULT_SET drop column COND_WI_VOL;
3.
The final step is to repopulate the columns from the table you saved when following the preupgrade instructions. Using the example of AB_Gas_Production as the new column, use the
following SQL:
Update RS_SUMMARY_RESULT_SET set AB_Gas_Production = (select
AB_Gas_Production from SAVE_RS_SUMMARY where
RS_SUMMARY_RESULT_SET.case_id = SAVE_RS_SUMMARY.case_id and
RS_SUMMARY_RESULT_SET.rs_qualifier = SAVE_RS_SUMMARY.rs_qualifier);
Commit;
4.
Once all columns have been repopulated you can delete the SAVE_RS_SUMMARY table
created during the pre-upgrade instructions.
This message is a result of a disconnect between the database username and password stored in the
MERAK_USER_MAP table in the database and the actual "sa" login for the database. During the
DBTools installation, the database is setup as non-secure and the "sa" user and password are
www.sis.slb.com
typically mapped to the Administrator and Merak users. If you are not using the Peep security
features you do not need to proceed any further.
Note: VOLTS must always access security, so you must resolve any issues you have in security
the demo database.
Open the login file using Notepad and you will see a set of lines near the top of the script as
follows:
REM
################################################################
#########
REM
REM You need to adjust these entries for your database and PC
REM
set SQL_PASSWORD=merak
set SERVER=clean3-cal\merakmsde
set DATABASE=volts_3_demo
set TEMP_FILES_DIR=d:\home\v2003.1\volts
REM
REM
################################################################
#########
REM
2.
Alter the file so that the four parameters listed reflect the setup of where your SQL
Server/MSDE are installed:
SQL_PASSWORD is the password for the sa account. The installation typically sets
this to "Merak".
SERVER this is the full name of your SQL Server/MSDE server, typically "[machine
name]\merakmsde".
DATABASE is the database name to be adjusted. For the Merak Suite v4.4 release, the
database name is "Value and Risk 4.4 - Secured" and "Value and Risk 4.4 - Unsecured".
Note: if there is a blank in the database name then place double quotes around the whole
database name.
TEMP_FILES_DIR is a location on your hard disk that you can write temporary files
to, d:\temp is a good name.
3.
4.
Run the file by double-clicking on it in Windows Explorer or launch it manually from a DOS
command prompt by typing "login_adjust.cmd".
5.
The script will adjust the login IDs and database users so that they are in-synch with each
other.
www.sis.slb.com
Check the MERAK_LOGIN_VW view and see if the users are mapped to the "sa" or to the
"APP_USER" database users. If the users are mapped to "sa" then continue with step 2.
2.
Launch DBTools.
3.
Select the Add and reset database security accounts option. The Select Data Source dialog
box opens.
4.
Log in to the data source with the "sa" password and click Next. The Security Manager
dialog box opens.
www.sis.slb.com
10
5.
From the Operation drop-down list, select the Reset Merak database user password
option.
6.
From the Username drop-down list, a list of database IDs that are currently stored in the
MERAK_USER_MAP table is displayed. Select the "sa" Username.
7.
Reset the password by entering the current SQL Server/MSDE password in the Password and
Confirm Password boxes.
Note: a blank "sa" password will not be accepted. You must set your SQL Server password to
some value other than blank.
8.
9.
www.sis.slb.com
11
www.sis.slb.com
12
How to reach us
United States
E-mail: merak-us-support@slb.com
Houston Tel.: +1 713-621-1165
Canada
E-mail: merakcscanada@slb.com
Calgary Tel.: +1-888-986-4357 (toll-free)
South America
International
Offices
E-mail: merakcsmexicocity@slb.com
Mexico Tel.: 001 866 326 0174
Argentina Tel.: 0 800 444 0919
Brazil Tel.: 000811 005 9068
Colombia Tel.: 980912 3029
Venezuela Tel.: 0800 1 00 3588
Middle East
E-mail: merakcsMiddleEast@slb.com
www.sis.slb.com
13