oracle11g

Generate upgrade script to ALTER TABLE based on CREATE TABLE statement in Oracle [duplicate]

落爺英雄遲暮 提交于 2019-12-11 04:40:53
问题 This question already has answers here : Automated Oracle Schema Migration Tool [closed] (5 answers) Closed 4 years ago . Is it possible in Oracle to generate a bunch of ALTER TABLE statements based on existing table in schema plus CREATE TABLE statement with newer definition of that table? Let's say I have a schema with some previous version of an application. I have an installation script for newest version of the application. The script creates all tables and sequences from scratch

How to return Oracle Cursor from stored proc as Client Dataset using Delphi and DBExpress

天涯浪子 提交于 2019-12-11 04:35:17
问题 1st off I am Still a little green to Delphi so this might be a "mundane detail" that's being over looked. [sorry in advance] I have a need to create a TSQLDataset or TClientDataSet from an Oracle 11g cursor contained in a package. I am using Delphi XE2 and DBExpress to connect to the DB and DataSnap to send the data back to the client. I'm having problems executing the stored procedure from the Delphi code. Package Head : create or replace PACKAGE KP_DATASNAPTEST AS procedure GetFaxData(abbr

How to determine an existing oracle database connection in C#?

此生再无相见时 提交于 2019-12-11 04:28:45
问题 Assuming that I call the method below with the right credentials: private bool Connect(string username, string password) { string CONNSTRING = "Provider = MSDAORA; Data Source = ISDQA; User ID = {0}; Password = {1};"; OleDbConnection conn = new OleDbConnection(); string strCon = string.Format(CONNSTRING, username, password); conn.ConnectionString = strCon; bool isConnected = false; try { conn.Open(); if (conn.State.ToString() == "Open") isConnected = true; }//try catch (Exception ex) { lblErr

How to use Oracle DBMS_ALERT within Oracle APEX?

烈酒焚心 提交于 2019-12-11 04:28:41
问题 Using Oracle APEX 4.2, I have a page process that uses DBMS_ALERT for a running process that may take up to a minute to complete or fail. While this is running, through the use of a trigger, there is a DBMS_ALERT.signal posting notifications of progress. My question is, within Oracle APEX 4.2, how can I display to the user, a running progress of these notifications from DBMS_ALERT, within a region or modal on the page? I need to provide the user all these alerts as the job is running until it

SQL How to compare data in two tables and get the results that are different between two tables

冷暖自知 提交于 2019-12-11 04:23:15
问题 There are 2 tables. Table a and b. A contains msisdn, firstname, secondname, lastname, regdate(registration data). Table b also has the same fields. I want to compare these two tables, the msisdn's, firstname and lastname fields. If msisdn X in table A has firstname as jim and lastname as halpert, and the same msisdn X has firstname as michael and secondname as scott in table B, i need to get these kinds of msisdn's as my query result. the one's with same msisdn in both tables and different

How to unlock a row if i use FOR UPDATE clause

99封情书 提交于 2019-12-11 04:23:05
问题 In procedure if we use FOR UPDATE clause, it will lock particular row and allow only one client to update whereas other client can only fetch data in the same row at that time. My question is when will it unlock the row, what should we do to unlock the row while writing procedure? Take this example here I'm using FOR UPDATE clause for client_count, when ll it unlock that particular row in this procedure. create or replace PROCEDURE newprocedur(inMerid IN VARCHAR2,outCount OUT NUMBER) AS

Oracle 11g - how to return record from function with table join

[亡魂溺海] 提交于 2019-12-11 04:14:00
问题 In Oracle 11g , I am trying to return multiple columns from a function call which is joined with a tables. This function takes employee_id as input and should return first_name and last_name as two separate columns from employees table. I created a type create or replace type mytype as object ( val_1 varchar2(100), val_2 number ); / And function create or replace function myfunc(p_in number) return mytype is v_deptname varchar2(100); v_mgrid number; begin select department_name,manager_id

retrieving a byte array from a LONG RAW from oracle db

安稳与你 提交于 2019-12-11 04:08:24
问题 I am trying to pull data from a long raw field in an oracle 11g database. However I keep getting "specified cast is not valid" when I try: cmd.InitialLONGFetchSize = 1000000; cmd.AddRowid = true; byte[] PicTempArray = new Byte[1024]; Oracle.DataAccess.Client.OracleDataReader Reader = cmd.ExecuteReader(); int i = 0; while (Reader.Read()) { try { PicTempArray[i] = Reader.GetByte(0); } catch { } i++; } I wouldnt be surprised if I was doing a few things wrong. If you didnt guess the LONG RAW is

Convert Pivot xml output to tabular output without xml

空扰寡人 提交于 2019-12-11 04:08:17
问题 I have following kind of table: ID | Key | Value -- --- ----- 1 A aa 2 B bb 3 A ay 4 C cc 5 B bx 6 C ct I need the output : A B C --- --- --- aa bb cc ay bx ct When I use PIVOT with subquery it does not work: Select * from (Select Key, Value, Id from tableName pivot (max(Value) for Key IN (SELECT distinct Key from tableName))); If I use PIVOT xml, the subquery works: Select * from (Select Key, Value, Id from tableName) pivot xml (max(Value) for Key IN (SELECT distinct Key from tableName));

ORA-00942: table or view does not exist (ColdFusion application)

若如初见. 提交于 2019-12-11 03:59:22
问题 I have a ColdFusion 10 application with an Oracle 11g backend. The Production version works fine. Recently, I had the Oracle DBAs refresh the Test database from Production. Now, I receive the ORA-00942: table or view does not exist error. All the tables are there when I use SQL Plus and the queries run fine. I am at a loss as to what to check now. The trace sends me to the query that is running fine in SQL Plus. What have I missed? Update - 17 October 2014 I don't know if it makes any