oracle11g

Oracle queries executed by a session

孤街浪徒 提交于 2019-12-30 11:01:05
问题 I am trying to trace the SQL statements executed against a particular database user. I don't have AUDITING enabled and I am using Oracle 11g. I have the following query : SELECT S.MODULE, SQL_TEXT , S.EXECUTIONS FROM SYS.V_$SQL S, SYS.ALL_USERS U WHERE S.PARSING_USER_ID=U.USER_ID AND UPPER(U.USERNAME) IN ('USERNAME') AND (UPPER(s.MODULE)='APP.EXE') ORDER BY S.LAST_LOAD_TIME But if multiple users running the 'APP.EXE' are connected to the same db user, I am not able to understand which OS user

Oracle queries executed by a session

谁说胖子不能爱 提交于 2019-12-30 11:00:03
问题 I am trying to trace the SQL statements executed against a particular database user. I don't have AUDITING enabled and I am using Oracle 11g. I have the following query : SELECT S.MODULE, SQL_TEXT , S.EXECUTIONS FROM SYS.V_$SQL S, SYS.ALL_USERS U WHERE S.PARSING_USER_ID=U.USER_ID AND UPPER(U.USERNAME) IN ('USERNAME') AND (UPPER(s.MODULE)='APP.EXE') ORDER BY S.LAST_LOAD_TIME But if multiple users running the 'APP.EXE' are connected to the same db user, I am not able to understand which OS user

Using Oracle database for the default ASP.NET MVC application

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-30 10:45:08
问题 I am trying to make the default ASP.NET MVC application use a remote Oracle database. I have set up the oracle client and can access the remote database from Server Explorer. I tried changing the connection string from <connectionStrings> <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /> </connectionStrings> to <connectionStrings> <add name

Using Oracle database for the default ASP.NET MVC application

人盡茶涼 提交于 2019-12-30 10:44:21
问题 I am trying to make the default ASP.NET MVC application use a remote Oracle database. I have set up the oracle client and can access the remote database from Server Explorer. I tried changing the connection string from <connectionStrings> <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /> </connectionStrings> to <connectionStrings> <add name

Load text files as clob to database

我与影子孤独终老i 提交于 2019-12-30 10:07:07
问题 Having problem loading text files into database as clob. Oracle version: Oracle Database 11g EE Release 11.2.0.2.0 NLS_LANG: RUSSIAN_RUSSIA.CL8MSWIN1251 NLS_CHARACTERSET: AL32UTF8 code to load text files: DECLARE L_BFILE BFILE; L_CLOB CLOB; file_name VARCHAR2(300); BEGIN file_name := 'test.txt'; L_BFILE := BFILENAME('DIR', file_name); if (dbms_lob.fileexists(l_bfile) = 1) then INSERT INTO TEST T VALUES (SEQ_TEST.NEXTVAL, EMPTY_CLOB(),file_name) return r_data into l_clob; L_BFILE := BFILENAME(

Support for JSON in Oracle 11g

五迷三道 提交于 2019-12-30 09:47:20
问题 Does Oracle 11g support JSON? I mean stuff like manipulating JSON objects in PL/SQL Queries. I know Oralcle 12c has the support for these things but it seems 11g does not. My main concern is whether it is possible to handle JSON objects returned from RESTfull API calls (using UTL_HTTP package) in PL/SQL code. This is how I call RESTfull APIs: req := UTL_HTTP.BEGIN_REQUEST('https://xxxx/api/job/all', 'GET', 'HTTP/1.1'); UTL_HTTP.set_header(req, 'Content-Type', 'application/json'); UTL_HTTP.set

How to override >2499 character error in Oracle DB?

时间秒杀一切 提交于 2019-12-30 06:42:27
问题 I have a Oracle query which I'm executing through shell script and in that my query is getting exceeded the maximum length of 2499. I'm getting error SP2-0027: INPUT IS TOO LONG(> 2499 CHARACTERS) - LINE IGNORED 回答1: Here are some options for working around SQL*Plus line length limitations: Upgrade to 12.2(?) client. On 12.2 the client allows up to 4999 characters. Which is infuriating in a way - if Oracle finally admits that 2499 is not enough, why did they only increase the limit to 4999?

Convert Resultset to String array

孤者浪人 提交于 2019-12-30 06:17:07
问题 I need to Convert My result set to an array of Strings. I am reading Email addresses from the database and I need to be able to send them like: message.addRecipient(Message.RecipientType.CC, "abc@abc.com,abc@def.com,ghi@abc.com"); Here is My code for reading the Email addresses: import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class Test { public static void main(String[] args) { Connection conn = null; String iphost =

Strategy to improve Oracle DELETE performance

匆匆过客 提交于 2019-12-30 03:56:07
问题 We've got an Oracle 11g installation that is starting to get big. This database is the backend to a parallel optimization system running on a cluster. Input to the process is contained in the database along with output from the optimization steps. The input includes rote configuration data and some binary files (using 11g's SecureFiles). The output includes 1D, 2D, 3D, and 4D data currently stored in the DB. DB Structure: /* Metadata tables */ Case(CaseId, DeleteFlag, ...) On Delete Cascade

XMLtable with Oracle 11g

旧时模样 提交于 2019-12-30 03:27:09
问题 Here is a sample table: create table xmltemp (mydoc xmltype) Here is a small xml doc for it: insert into xmltemp values ( xmltype ('<?xml version="1.0"?> <countries> <country> <name>Canada</name> </country> <country> <name>US</name> <states> <state> <name>Washington</name> <name>Oregon</name> </state> </states> </country> </countries> ') ) Notice that Canada does not have a 'states' element but the US does. I'm trying to get these query results (order and formatting is not important): Canada,