- Notifications
You must be signed in to change notification settings - Fork 849
/
Copy pathServersideConnect.sql
executable file
·37 lines (31 loc) · 978 Bytes
/
ServersideConnect.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Rem ServersideConnect.sql
Rem
Rem Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
Rem
Rem NAME
Rem ServersideConnect.sql
Rem
Rem DESCRIPTION
Rem SQL for invoking the method which gets a server side connection to
Rem internal T2 Driver
Rem
Rem MODIFIED (MM/DD/YY)
Rem nbsundar 03/23/15- Created
Rem kmensah 03/23/15- Contributor
rem Reads the content of the Java source fromServersideConnect.java
rem then compiles it
connect hr/hr
CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED ServersideConnect_src AS
@ ServersideConnect.java
/
show error
rem A wrapper (a.k.a. Call Spec), to invoke Java
rem function in the database from SQL, PL/SQL, and client applications
CREATE OR REPLACE PROCEDURE ServersideConnect_proc AS
LANGUAGE JAVA NAME 'ServersideConnect.jrun ()';
/
rem Running the sample
connect hr/hr
SET SERVEROUTPUT ON SIZE 10000
CALL dbms_java.set_output (10000);
execute ServersideConnect_proc;