View sqlcl_js_returning.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
//create table todo(id NUMBER GENERATED by default on null as IDENTITY, todo_for varchar2(200)); | |
// | |
var DBUtil = Java.type("oracle.dbtools.db.DBUtil"); | |
var binds={}; | |
binds.name="Oliver"; | |
sql = "insert into todo(todo_for) values(:name)"; |
View jetty-custom-access-log-ords.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd"> | |
<!-- | |
Drop this file into | |
../global/standalone/etc/jetty-accesslog.xml | |
--> | |
<!-- =============================================================== --> |
View k6_io_test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import http from "k6/http"; | |
import encoding from 'k6/encoding'; | |
/* | |
* | |
Run with No Auth | |
k6 run -e AUTH=NONE --vus 10 --iterations 100 k6.js | |
Run with OAuth | |
k6 run -e AUTH=OAUTH --vus 10 --iterations 100 k6.js |
View rest_sql_batch_insert.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fetch = require('node-fetch'); | |
// | |
// generate random string | |
// | |
/* | |
Sample output | |
inserting :50000 rows | |
Rows:244,652 | |
http: 7.429s |
View ADB_list_buckets_with_RESOURCE_PRINCIPAL.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE | |
l_comp_ocid varchar2(200); | |
l_tenant_ocid varchar2(200); | |
all_buckets DBMS_CLOUD_OCI_IDENTITY_COMPARTMENT_TBL; | |
function lsComp(p_tenant_ocid varchar2, | |
p_region varchar2, | |
p_cred varchar2 default 'OCI$RESOURCE_PRINCIPAL', | |
p_page varchar2 default null) return DBMS_CLOUD_OCI_IDENTITY_COMPARTMENT_TBL | |
as |
View kill.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SQLCL's Command Registry | |
var CommandRegistry = Java.type("oracle.dbtools.raptor.newscriptrunner.CommandRegistry"); | |
// CommandListener for creating any new command | |
var CommandListener = Java.type("oracle.dbtools.raptor.newscriptrunner.CommandListener") | |
// Broke the .js out from the Java.extend to be easier to read | |
var cmd = {}; | |
// Called to attempt to handle any command |
View sql-replay.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/hack-font/3.3.0/web/hack.min.css" integrity="sha512-XgCw4Srl8lC1ECwcaHwAU0WnxQwHkqmInzg9wJLtGB7DRuMaXPuK2k9WJ2AwRDGdrgK9eJpZl2hUlLi2WQssmw==" crossorigin="anonymous" referrerpolicy="no-referrer" /> | |
<script | |
src="https://code.jquery.com/jquery-2.2.4.min.js" | |
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" | |
crossorigin="anonymous"></script> | |
<script src="https://mattboldt.com/demos/typed-js/js/typed.custom.js"></script> | |
<script>$( document ).ready(function() { | |
var data = [ |
View dbms_cloud_metric_sql_pkg.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace package oci_metrics as | |
-- | |
-- ╔═╗┌─┐┌┬┐┬ ┬┌─┐ ╔═╗┌┬┐┌─┐┌─┐┌─┐ | |
-- ╚═╗├┤ │ │ │├─┘ ╚═╗ │ ├┤ ├─┘└─┐ | |
-- ╚═╝└─┘ ┴ └─┘┴ ╚═╝ ┴ └─┘┴ └─┘ | |
-- | |
-- Current PDB's OCID | |
-- select json_value(cloud_identity , '$.DATABASE_OCID') from v$pdbs | |
-- | |
-- Crate Dynamic Group "klrice-testing" |
View sql_oci_metrics.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set serveroutput on | |
DECLARE | |
credential_name varchar2(200) := 'OCI$RESOURCE_PRINCIPAL'; | |
region varchar2(200) := 'us-phoenix-1'; | |
base_uri varchar2(200) := 'https://telemetry-ingestion.' || region|| '.oraclecloud.com/20180401/metrics'; | |
resp dbms_cloud_types.RESP; | |
BEGIN | |
-- Current PDB's OCID | |
-- select json_value(cloud_identity , '$.DATABASE_OCID') from v$pdbs |
View load_strava.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set load scan_rows 10000 | |
drop table strava_activities; | |
drop table strava_applications; | |
drop table strava_bikes; | |
drop table strava_blocks; | |
drop table strava_clubs; | |
drop table strava_comments; | |
drop table strava_components; | |
drop table strava_connected_apps; | |
drop table strava_contacts; |
NewerOlder