Skip to content

Instantly share code, notes, and snippets.

View PhilippSalvisberg's full-sized avatar

Philipp Salvisberg PhilippSalvisberg

View GitHub Profile
@PhilippSalvisberg
PhilippSalvisberg / procedure_accessors.sql
Last active May 4, 2018 08:15
White Listed PL/SQL Programs in Oracle Database 18c
/*
* Copyright 2018 Philipp Salvisberg <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@PhilippSalvisberg
PhilippSalvisberg / Install_demo_apps.sql
Last active August 7, 2020 03:10
Check if an Oracle user is ready to be used by the connection pool of the middle tier for applications guarding data behind a hard shell PL/SQL API as defined by Bryn Llewellyn. See also https://www.salvis.com/blog/2017/12/17/how-to-prove-that-your-smartdb-app-is-secured-against-sql-injection-attacks/
/*
* Copyright 2017 Philipp Salvisberg <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@PhilippSalvisberg
PhilippSalvisberg / 01_insert_sql.sql
Last active June 30, 2016 10:14
Parse simple insert statement via PL/SQL Analyzer, preserve order of insert and select columns (to answer question via LinkedIn Messaging)
INSERT
INTO tvd_captured_sql_t (
cap_id,
cap_source
)
VALUES (
tvd_captured_sql_seq.nextval,
q'[
insert into tab1 (x,y,z) select a,b,c from tab2 where tab2.n = 'N';
]'
@PhilippSalvisberg
PhilippSalvisberg / issue_26a.sql
Last active June 25, 2016 15:59
Issue oddgen/oddgen#26 - workaround for missing object_name children in navigator tree
/*
* Copyright 2016 Philipp Salvisberg <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@PhilippSalvisberg
PhilippSalvisberg / wrap_schema.sql
Last active July 16, 2020 22:08
Wrap PL/SQL code in the current user of an Oracle database 10g or higher
/*
* Copyright 2016 Philipp Salvisberg <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software