Skip to content

Instantly share code, notes, and snippets.

View modul8com's full-sized avatar

Michael Bruyninckx modul8com

View GitHub Profile
@modul8com
modul8com / modul8com.omp.json
Last active November 5, 2021 06:04
Oh My Posh settings
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
oh-my-posh --init --shell pwsh --config C:\projects\prompt\modul8com.omp.json | Invoke-Expression
Import-Module -Name Terminal-Icons
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineOption -EditMode Windows
@modul8com
modul8com / new_gist_file_0
Created December 10, 2013 14:24
GetDate() equivalent in Oracle
select systimestamp at time zone 'UTC' from dual;
@modul8com
modul8com / new_gist_file_0
Created December 10, 2013 14:23
get the SID (= session ID)
select userenv('SID') from dual;
@modul8com
modul8com / new_gist_file_0
Created December 4, 2013 08:38
How to read your MSDTC log files ?
First open a Administrator Command Promnpt.
In there do a cd \windows\system32\msdtc
then:
msdtcvtr.bat -tracelog dtctrace.log.2013-11-21-18-01-40-0576-00 -o mylog
PS: don't try to browse with the file explorer, you can't get in c:\windows\system32\msdtc
@modul8com
modul8com / UnindexedForeignKeys.sql
Created December 2, 2013 14:19
Check if there are tables that contain foreign keys that don't have an index yet
select /*+ first_rows */
c.owner
, c.table_name
, c.constraint_name
from
user_constraints c
where not exists
( select 1
from
user_cons_columns cc