Professional Documents
Culture Documents
December, 2007
COPYRIGHT
Copyright 2007 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 v2007.1 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
Working with Vistas User Account Control when opening the ODBC Administrator from DBTools ........3
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 9.i/10g
www.sis.slb.com
Note:
Use of software versions outside of those identified for the Merak Suite of
software will likely cause application failure and are not supported. This includes
versions of Oracle, SQL Server, ODBC, and MDAC other than those specified in
this guide. Please ensure that the version you are attempting to run complies with
the supported versions in the install guide. If unsure, or looking for the latest
update please contact our support desk.
1.
2.
From the DBTools directory run the program DBTools.exe. The Merak Database Toolkit
dialog box opens.
www.sis.slb.com
3.
Select the Upgrade an existing Merak database option and click Next. The Select Data Source
dialog box opens.
4.
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).
5.
If required (Oracle and SQL Server), enter the User ID and Password for access to the
database. In Oracle this should be the schema owner. In SQL Server this can either be sa or
a login that has been given DBO access to the database that will host the data.
6.
Click Next.
7.
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.
8.
Be sure to confirm the version of the database you wish to upgrade to. Normally, this should
be the latest version available.
Notes:
9.
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.
Click Next. DBTools creates a transaction log that records the progress of the database
creation.
10. Type the path where you want to store the log file.
11. 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.
12. 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.
13. 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.
14. If an item requires modification, click Back to return to the appropriate dialog box.
15. 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
2.
From the DBTools directory, run the program DBTools.exe. The Merak Database
Toolkit dialog box opens and the Welcome dialog box opens. You can now choose to
install a new database or upgrade an existing one.
3.
Select the Install a new Merak database option and click Next. The Select Data
Source dialog box opens.
4.
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).
5.
If required (for Oracle and SQL Server), enter the User ID and Password for access to the
database. . In Oracle this should be the schema owner. In SQL Server this can either be
sa or a login that has been given DBO access to the database that will host the data.
6.
Click Next.
7.
From the Application Select dialog box, identify which applications you want to create
the database for. Note: the available applications will differ depending on the type of
database selected. Consult the System Requirements section in the Introduction for
information about which databases are supported by a particular application.
8.
9.
Click Next. DBTools creates a transaction log that records the progress of the database
creation.
10. Type the path where you want the log file installed and click Next.
11. 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.
12. Select the appropriate tablespace from the Data Tablespace and Index Tablespace
drop-down lists. DBTools will verify that there is enough free space available in the
tablespace(s) selected before allowing you to continue.
13. Click Next. You are prompted to confirm all of the settings entered into DBTools.
14. If an item requires modification, click the Back button to return to the appropriate dialog
box.
15. When you are sure that all the information is correct, click Finish to create the database.
www.sis.slb.com
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.
In addition to creating all of the database objects (tables, views, procedures
etc.), DBTools will also create the following logins and roles:
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.
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.
www.sis.slb.com
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
CREATE ANY SYNONYM
(Note: this permission must be granted directly to the Schema Owner and not via a ROLE)
CREATE PUBLIC SYNONYM
DROP PUBLIC SYNONYM
DROP ANY SYNONYM
(Note: this permission must be granted directly to the Schema Owner and not via a ROLE)
DROP USER
CREATE SEQUENCE
CREATE PROCEDURE
(Note: this permission must be granted directly to the Schema Owner and not via a ROLE)
CREATE TABLE
(Note: this permission must be granted directly to the Schema Owner and not via a ROLE)
CREATE VIEW
CREATE TRIGGER
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.
Open Peep Preferences > Database tab, and click Update all Document Dependencies.
A confirmation dialog box is displayed.
2.
Ensure you leave sufficient time to perform this operation; an interrupted update will
cause database errors for Peep and other applications using Peep data if not completed.
3.
Click OK. When the update is complete, a confirmation message is displayed. If you do
not see this message, contact your SIS Support Group.
www.sis.slb.com
Note: if you do not see the Update all Document Dependencies button in Preferences, the
operation has been performed already, and nothing else is required.
See also
If you are performing an upgrade that includes custom changes made to the
RS_summary_result_set table, ensure you complete the post-upgrade instructions after you have
finished updating document dependencies.
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.
www.sis.slb.com
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
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 always resolve the security issues
regardless of the demo database you are using.
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 v2007.1 release,
the database name is "Merak_Database_ed20071_Secured" and "
Merak_Database_ed20071_Unsecured". Note: if there is a blank in the database name
www.sis.slb.com
10
then place double quotes around the whole database name. However blanks in the
database are not recommended.
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.
6.
Note, you also have the option to run the steps in the login adjust manually using Enterprise
Manager or SQL Server Management Studio.
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
11
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
12
You have now adjusted the "sa" password stored in the MERAK_USER_MAP table to
coincide with the "sa" password that has been set for the SQL Server/MSDE Server. The next
step requires that you adjust the users in the MAC and map them to the MERAK_APP_USER
and MERAK_ADMIN_ROLES. This final step will completely enable your security on the
Merak demo database.
10. Launch the MAC and log in as the Administrator.
11. Open the User Administration document. For each application username that has the
Database User set to "sa" you must re-map the application user to the MERAK_APP_USER
and MERAK_ADMIN_ROLE accounts.
12. Select the user and click Edit. The User Details dialog box opens.
www.sis.slb.com
13
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
14