Skip to content

Instantly share code, notes, and snippets.

View mathiasmag's full-sized avatar

Mathias Magnusson mathiasmag

View GitHub Profile
@mathiasmag
mathiasmag / _Oracle Wallet
Last active May 14, 2020 21:06
Oracle Wallet
Used to set up scripts to build/add root certificates to an Oracle Wallet
@mathiasmag
mathiasmag / _VC Setup
Last active May 13, 2020 19:55
VC Setup
This sets up VC
@mathiasmag
mathiasmag / login.sql
Created February 23, 2018 20:16
Script to be exectuted on start by sqlplus/sqlcl
// Origin: https://ora-00001.blogspot.se/2017/03/using-vs-code-for-plsql-development.html
// https://gist.github.com/mortenbra/6a10aa6b09fb470e6b91bc3b5adb19af#file-sqlplus_login-sql
-- enable compiler warnings
alter session set plsql_warnings = 'enable:all';
@mathiasmag
mathiasmag / _show_errors.sql
Created February 23, 2018 20:14
Used in a VisualCode task building PL/SQL to show all errors in the schema code has been "compiled"
-- Origin: https://ora-00001.blogspot.se/2017/03/using-vs-code-for-plsql-development.html
-- https://gist.github.com/mortenbra/3204a125e3da1008e19b36bf94586950#file-vscode_show_errors-sql
set pagesize 9999
set linesize 9999
set heading off
set trim on
select lower(attribute) -- error or warning
|| ' '
@mathiasmag
mathiasmag / _run_sqlcl.sh
Created February 23, 2018 20:09
sqlcl script to be used in VisualCode for PL/SQL build tasks
#!/bin/sh
# Modified to use sqlcl instead of sqlplus
# Origin: https://ora-00001.blogspot.se/2017/03/using-vs-code-for-plsql-development.html
# https://gist.github.com/mortenbra/9af4b0211782161619c0bab01ed7031a#file-vscode_run_sqlplus-sh
# make sure script uses correct environment settings for sqlplus
source ~/.profile
SQLPATH=$SQLPATH:.;export SQLPATH
# run sqlplus, execute the script, then get the error list and exit
@mathiasmag
mathiasmag / tasks.json
Created February 23, 2018 20:06
VisualCode defined default build task for PL/SQL.
//Modified to fit the more recent version of VisualCode versions structure for the tasks.json
// Origin: https://ora-00001.blogspot.se/2017/03/using-vs-code-for-plsql-development.html
// https://gist.github.com/mortenbra/9d7bd2147b02ae8fa2e14dbc38935e5e#file-vscode_tasks-json
{
"version": "2.0.0",
// The command is a shell script
"type": "shell",
"group": {
"kind": "build",