This file contains hidden or 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
| /* | |
| * To change this license header, choose License Headers in Project Properties. | |
| * To change this template file, choose Tools | Templates | |
| * and open the template in the editor. | |
| */ | |
| package com.github.adriens.open.data.fromages; | |
| import java.sql.Connection; | |
| import java.sql.DriverManager; | |
| import java.sql.ResultSet; |
This file contains hidden or 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 | |
| call slack(); |
This file contains hidden or 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 | |
| procedure slack | |
| is | |
| req utl_http.req; | |
| res utl_http.resp; | |
| -- !!! here PUT YOUR WEBHOOK's url !!! | |
| url varchar2(4000) := 'https://hooks.slack.com/services/THE_REST_OF_YOUR_SECRET_URL'; | |
| buffer varchar2(4000); | |
| content varchar2(4000) := '{"channel":"#general", "username": "sqlplus*", "text":"Hi my tablespace if full :bangbang:"}'; |
This file contains hidden or 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
| begin | |
| dbms_network_acl_admin.create_acl ( | |
| acl => 'utl_https_slack.xml', | |
| description => 'Slack HTTPS Access', | |
| principal => 'SLACK', | |
| is_grant => TRUE, | |
| privilege => 'connect', | |
| start_date => null, | |
| end_date => null | |
| ); |
This file contains hidden or 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
| # in case you are in a container database, set some option for user creation | |
| alter session set "_ORACLE_SCRIPT"=true; | |
| create user slack identified by slack; | |
| grant connect to slack; | |
| grant create session to slack; | |
| grant resource to slack; |
This file contains hidden or 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
| cd C:\app\salad74\virtual\admin\DIDI3\wallet | |
| orapki wallet create -wallet C:\app\salad74\virtual\admin\DIDI3\wallet -pwd WalletPasswd123 -auto_login | |
| orapki wallet display -wallet C:\app\salad74\virtual\admin\DIDI3\wallet | |
| orapki wallet add -wallet C:\app\salad74\virtual\admin\DIDI3\wallet -trusted_cert -cert SLACK.cer -pwd WalletPasswd123 | |
| orapki wallet display -wallet C:\app\salad74\virtual\admin\DIDI3\wallet |
NewerOlder