Author Archives: Dennis Bourn

Extracting Fault Cuts directly from the database, Kingdom SQL

I have come into a situation where a Geologist names his fault cuts as the throw of the fault cut. This was done as a workaround to enable posting both depth and throw on vertical sections. But the unintended consequence is that there may be multiple fault cuts in a single well with the same name. The spreadsheet function in Kingdom will only display one of the fault cuts when this happens. So I turn to the SQL database to extract the fault cuts manually. Below is the SQL query that will pull API, Author, Fault Cut Name, Fault Cut Depth, Fault Cut Throw, Borehole Name, Well Name, and Well Number from the database.

** this SQL command will only pull fault cuts that have a throw. If throw is not entered for a fault cut, it will be ignored.

SELECT
dbo.T000000_T_Borehole.Uwi as “API”,
dbo.T000000_T_Author.Name as “Author”,
dbo.T000000_T_AuthoredName.name as “Name”,
dbo.T000000_T_SurfacePick.PickDepth,
dbo.T000000_T_SurfacePick.CustomData as “Throw”,
dbo.T000000_T_Borehole.Name as “Borehole Name”,
dbo.T000000_T_Well.Name as “Well Name”,
dbo.T000000_T_Well.WellNumber
FROM dbo.T000000_T_SurfacePick
inner join dbo.T000000_T_Author on dbo.T000000_T_Author.ID = dbo.T000000_T_SurfacePick.OwningAuthorID
inner join dbo.T000000_T_AuthoredName on dbo.T000000_T_AuthoredName.ID = dbo.T000000_T_SurfacePick.AuthoredNameID
inner join dbo.T000000_T_Borehole on dbo.T000000_T_Borehole.ID = dbo.T000000_T_SurfacePick.BoreholeID
inner join dbo.T000000_T_Well on dbo.T000000_T_Borehole.WellID = dbo.T000000_T_Well.ID
WHERE dbo.T000000_T_SurfacePick.CustomData > 0
order by dbo.T000000_T_Borehole.Uwi, dbo.T000000_T_SurfacePick.PickDepth
;

 

Finding scattered seismic files in a Kingdom Project

Every now and then, a Geophysicist will run Automatic Gain Control or some other function on a seismic volume in a Kingdom Project. This results in a new seismic file being created. During the process the geophysicists is asked where he would like to save the file, and the program defaults to the last accessed folder. The last accessed folder usually ends up being the colorbar folder. If the geophysicist just clicks OK, a seismic file is created with a name like seismic0001200.ksd. The file name dosent give much to go on about which project it belongs to. The way I handle this to go directly to the database for each project and query for the seismic volumes in the project. The following SQL statement will output all the volumes in all the surveys in a project.

select dbo.T000000_T_SeismicData.ID, SurveyID, PathLocator, SeismicPathLocator, dbo.T000000_T_SeismicType.Name from dbo.T000000_T_SeismicData
LEFT JOIN dbo.T000000_T_SeismicType on
dbo.T000000_T_SeismicData.ID = dbo.T000000_T_SeismicType.ID

The name returned in PathLocator is the file name minus the extension .1 or .ksd.

The SeismicPathLocator can contain nothing, meaning the root of the project directory. It may contain a path starting with a \, indicating the root of the same drive letter. Or it may contain a relative path starting at the project folder, indicated by no \ at the begining.

Below is an example of the output of this query

query

Once you have located the files, you can move them to the project directory and open the kingdom project. Dont forget to move the KNX file as well as the KND file.  Open a seismic line and choose the volume that you have moved. An error will pop up alerting you to the fact that the seismic file is not where it should be and asks you to select the file. Browse to where you have moved it and select the appropriate file. Your project is now neat and tidy and much easier to manage.

 

 

Using Kingdom licenses over the internet

It is possible to allow users to access a networked kingdom license server over the internet thereby enabling users working from home or while away from the office. The license server listens for requests on UDP port 5093, so you can use NAT on your router to redirect those requests to your license server. Once that is set up, you can enter your public IP address or DNS name that resolves to it into the license section of your 2d3dpak.set file located in your home folder.

C:\Users\<your user name>\KingdomSuite\2d3dpak.set (windows 7)

Below is that section from my 2d3dpak.set file.

[License]
LSServer=KINGDOM.GEOTECHTOOLBOX.COM

** If you can, create a firewall rule allowing only the IP addresses if your remote locations to access the redirected ports. Otherwise, it is possible for someone you don’t know to check out a license. This isn’t always possible if the remote location has a dynamic IP address or if the user will be traveling to unknown locations.