In WellSim, a database is a file or a set of files where your geothermal data is stored on a computer's hard disk. The database can be on your computer, or, if you are on a network, the database can be on a server.
When you start WellSim, it asks you to select a database to use. As you work with WellSim, creating, changing and deleting geothermal data, WellSim automatically changes the data in that database accordingly. This means that you never need to tell WellSim to save data to the database, and you will not lose data if it stops unexpectedly.
You can close the current database and open another one. You only ever work with data in the one open database; you can not see data in any closed database.
WellSim comes with a database of typical geophysical data, called sample, for you to experiment with. You could, in principle, continue to use this database for ever, and store all your geothermal data in it. However, you should not do this, but instead you should create and use a separate database for each geothermal field you have. For example, if you have data from Atlantis and data from Valhalla, then create two databases, called Atlantis and Valhalla and store your data for each in each.
This section covers:
Maintaining your databases:
Creating, adding, deleting, removing databases:
You can also:
Note
If you are unsure about databases, ask your IT manager.
A WellSim database can be either Microsoft Access or Microsoft SQL Server:
Access databases | SQL Server databases |
---|---|
Easier to set up and manage | More secure, better behaved and can be bigger |
Grow bigger with use, needs compacting occassionally | Does not need compacting |
Is one file ending in .mdb | Is a server and more than one file |
Usually managed by a user | Usually managed by an IT department |
Ideal for a small user, or for quickly setting up a small, ad hoc database | Ideal for a large, long-term user |
Note
The Sample database is Microsoft Access.
WellSim stores some internal data in database files, ending with .mdb, for example graphstyles.mdb. These are completely separate from your geothermal databases.
You can use the appropriate stand-alone database manager (Microsoft Access or Microsoft SQL Server) to look at, query or even change the data stored in a database.
WellSim has built-in drivers to access the database, and does not need a stand-alone database manager to run.
Warning Never use a stand-alone database manager to change the structure of a database or its tables in any way, or WellSim might not run properly.
When you start WellSim it first opens the Database Manager window for you to select a database to use.
Or, while WellSim is running, click File
, then click Database Manager
to open the window.
Note:
Version
.Click the database to use, then click . Or double-click the database to use.
This section covers:
Click Version
:
You see the versions down the right. For more on version numbers see here.
Click the database name and then click Edit DB
.
Click the field Use Connection String
and press Left arrow
or Right arrow
to scroll along the connection string until you find the path name that follows Data source=
. You can select this path name and press Ctrl + C
to copy it:
For an Access database, the path name is the database, for example Data Source=C:\Users\stan\AppData\Local\Gradient\GDMan\example\atlantis.mdb
For an SQL Server database, the path name is the name of the database server.
Click Cancel
.
Access database
SQL Server database
Use SQL Server Management Studio to backup.
Renaming a database only changes WellSim's name for the database, it does not change the database file name.
Open the database window and click the database to rename.
Click Rename DB
. Enter a new name for the database and click OK
.
An Access database will slowly grow bigger as you use it, filling up with empty gaps. Occasionally make it smaller again:
Run Microsoft Access, the stand-alone database manager program. This is readily available, and you might find you have it on your PC already.
Open the WellSim database in Microsoft Access.
In the File tab, click Compact
and repair database.
SQL server databases You don't haver to compact these.
To apply the same permissions to more than one SQL Server database, set up the permissions on one database and use this command to copy the permissions to other SQL Server databases. Use this to:
You need to have GDM Admin or Power User permission to do this.
Start GDM and select a SQL Server database with to copy the permissions from.
In the Database
menu, select Database permissions
If required, edit existing permissions in this database or add new permissions - use New
, Edit
, Rename
or Delete
.
Then, click Copy
to copy these permissions to other SQL Server
databases:
Select the databases to copy these permissions to:
Click OK
to copy the permissions of the current database to all selected
databases. WellSim notifies you when it has finished.
Overview
You can get a database by creating an empty one, or if a colleague sends you one. To use it in WellSim, you first need to add the database to WellSim.
If you don't want to use a database in WellSim any more, remove it from WellSim. Then, if you don't want it any more, delete it.
This section covers:
This creates a new, empty Access database, then installs it in WellSim.
In WellSim's home window, click File
and then click Create New DB
:
Navigate to a folder to store the new database; enter a file name for the new database Click Save
.
WellSim then:
Creates a new WellSim Access database, containing all the appropriate tables but with no data
Adds the new database to the Database Manager
Opens the new, empty, database in WellSim.
WellSim's name for the new database is the same as the database file name. To change WellSim's name see here.
When you first select the new database in WellSim's Database Manager:
WellSim asks for the mapping parameters for the new database's geothermal field see here
If you have chosen that the database will have user permissions then set these up see here.
There are two ways to create a new, empty SQL Server database and install it in WellSim:
From within WellSim see here. This is usually the easiest way.
Using SQL Server Management Studio see here.
Requirements: Access to the SQL Server data server.
In Database Manager, Click New DB
and select Create and build database
(SQL Server)
Wait while WellSim finds your SQL data server, then displays the SQL Server connection:
Enter a server name Select your SQL data server from the dropdown list.
Log on Usually use Windows NT integrated security
.
Database name Enter a name using letters or numbers only. No spaces. Ususlly enter the geothermal field name.
Click OK
.
WellSim asks if you have the right to create an SQL Server database:
Click OK
if you have the right.
WellSim checks the database name you entered above:
If the name has characters other than letters or numbers, WellSim strips them from the name. For example, if you entered Hulu Lais%
, WellSim will change this to HuluLais
and tell you:
If there is already a database with that name, WellSim shows an error and returns for you to enter a new name.
WellSim now asks for a description for the new database. You can enter any characters here. You might type the database name with a space Hulu Lais
:
Click OK
.
WellSim creates the new database with empty WellSim tables:
Then
When you first select the new database in WellSim's Database Manager:
WellSim asks for the mapping parameters for the new database's geothermal field see here
If you have chosen that the database will have user permissions then set these up see here.
Requirements: SQL Server, SQL Server Management Studio
Start SQL Server Management Studio. We recommend you use Windows Authentication:
Click Connect
. Right-click Databases
and select New Database
:
Enter a database name; this should be the name of your geothermal prospect, Akiira in this example.
SQL Server creates an empty SQL Server database. Click OK
and exit SQL Server Management Studio. Ensure WellSim can access the new database.
Now start WellSim and at the database manager window, click New DB
:
The Create new database
window appears. Follow the procedure to install an SQL server database.
Then
When you first select the new database in WellSim's Database Manager:
WellSim asks for the mapping parameters for the new database's geothermal field see here
If you have chosen that the database will have user permissions then set these up see here.
The database must be a WellSim database, created by the current version or an earlier version of WellSim. You might add an existing database to the Database Manager if a colleague gives you a WellSim database or if you earlier removed the database from the Database Manager and now want to use it again.
Ensure the database is on your computer system where WellSim can access it.
Now start WellSim and at the database manager window, click Add DB
:
The Add database
window appears.
To add an access database, follow this procedure.
To add an SQL server database, follow this procedure.
Update the connection to a database in WellSim if you move the database to a different place on your computer, or if you rename a database file.
Click Edit DB
:
To update to an access database, follow this procedure.
To update to an SQL server database, follow this procedure.
When you remove a database it only removes the database name from the Database Manager. It does not delete the database or any of your data in the database. You can add the database back to the Database Manager later.
Click Remove DB
.
Click Yes
.
Note:
To delete an Access database
The database is one file, ending in .mdb. Use Windows Explorer to delete the file.
To delete an SQL Server database
Use SQL Server Management Studio to delete the database.
This procedure is common to several database procedures above.
In the Create new database
or Add database
or Edit database
window:
Click Build
.
If you are creating or adding a database, the Provider
tab opens:
Click Microsoft Jet 4.0 OLE DB Provider
, and click Next >>
.
The Connection
tab opens:
Enter the database name: the full database file path (.mdb file):
either type or paste the path if you know it,
or click , navigate to the folder with the .mdb file, click the file and click OK
.
Click Test Connection
to ensure WellSim can find the database:
Click OK
to return to the Create new database
or Add database
or Edit database
window again:
Click OK
:
Enter a WellSim name for the database; this does not change the underlying name. Click OK
:
WellSim will now create all the tables in the database, populate some tables with system values, add the database to the Database Manager and return to the Database Manager. This might take a while.
This procedure is common to several database procedures above.
In the Create new database
or Add database
or Edit database
window:
Click Build
.
If you are creating or adding a database, the Provider
tab opens:
Click Microsoft OLE DB Provider for SQL Server
, and click Next >>
.
The Connection
tab opens:
Click Use Windows NT Integrated security
. Select the database (Akiira in this example) from the drop-down list.
Click Test Connection
to ensure WellSim can find the database:
Click OK
to return to the Create new database
or Add database
or Edit database
window again:
Click OK
:
Enter a WellSim name for the database; this does not change the underlying name. Click OK
:
WellSim will now ask if you have dbo rights, necessary to create a new database:
Warning. You must have Admin
permission plus either be a dbo user or you and other GeoData Manager users must all be members of a db_owner role for this database read more. If you have these rights and permissions, click OK
.
WellSim will now create all the tables in the database, populate some tables with system values, add the database to the Database Manager and return to the Database Manager. This might take a while.