oracle10g

how to export dump file for oracle10g I tried in the following way SQL> expdp dump dumfile=filename.dmp

半城伤御伤魂 提交于 2019-12-11 22:01:56
问题 I tried to dump but I am getting a error in SQL command prompt. How to export dump file for oracle10g I tried in the follwing way: SQL> expdp dump dumfile=filename.dmp 回答1: expdp is an operating system command, not an SQL command. You need to run it from an operating system command prompt. There is more information in the documentation, including descriptions of the command parameters (and as noted it is dumpfile rather than dumfile ), and they provide examples. If you haven't used it before,

Declare array of TABLE%TYPE

旧城冷巷雨未停 提交于 2019-12-11 21:32:11
问题 I am using the to receive collection from Java to PL/SQL procedure to insert records into table. CREATE OR REPLACE TYPE PROJECT_TYPE IS OBJECT ( project_id NUMBER, project_desc VARCHAR2 (10), project_title VARCHAR2 (25) ); PROCEDURE project_values (parray IN project_type) IS BEGIN INSERT INTO projects (project_id, project_desc, project_title) SELECT * FROM TABLE (parray); END; Instead of the above I would like to use TYPE array IS TABLE OF projects%ROWTYPE INDEX BY VARCHAR2 (25); and I have

find month days

假装没事ソ 提交于 2019-12-11 20:43:16
问题 I need to find how many days have in this month which we can find with today's date select to_number(to_date('01.02.2011')-to_date('01.01.2011')) from dual; not this query Have any other queries? 回答1: You can do it with a trunc(<date>, 'mm') (which returns the first day of the month) and an add_months(<date>,1) which add one month to a particular day. So, in order to find out how many days the month has in which we currently are (i.e. sysdate ), you could go with something like: select add

Oracle 10g: Error when creating database manually by scripts

依然范特西╮ 提交于 2019-12-11 20:14:13
问题 My situation is that I have to create a new Oracle database using only scripts (so please do not advice me using DBCA) My script is as below: CreateDB.bat set ORACLE_SID=testdb oradim -new -sid %ORACLE_SID% -intpwd test -startmode M copy init.ora D:\oracle\product\10.2.0\db_1\database\inittestdb.ora sqlplus sys/test as sysdba @D:\Script\CreateDB.sql ==> "init.ora" is the file I copy from the DB created using DBCA CreateDB.sql CREATE SPFILE='D:\oracle\product\10.2.0\db_1\dbs\spfiletestdb.ora'

Issue in creating oracle function

*爱你&永不变心* 提交于 2019-12-11 19:32:31
问题 I have created a function which need input as month(11) and year(2018) and it will return the first Sunday of the next month. Create or replace function get_effectivedate (par_Month in int,Par_Year in int); Return date Is startDate varchar; edate date; begin startDate := par_Month+Par_Year; edate := select next_day(add_months(trunc(startDate, 'MM'), 1), 'Sunday') as EffectiveDate from dual; return edate; end; This function is prompting me while running and it is throwing some errors on

Oracle SQL - Alternative to the UNION ALL statement

随声附和 提交于 2019-12-11 19:32:25
问题 Given the follownig query that uses a union, Select col1,col2,col3,col4,col5,cast(multiset(temp.col1 from table(cast(xslt.children as clob_nt)) temp, col6 from tableA union all Select a,b,c,d,e,cast(multiset(temp.col1 from table(cast(tableB.children as clob_nt)) temp, col7 from tableB i would expect to get the following output (i.e. rows from both tables) tableA.x tableA.x tableA.x tableA.x tableA.x tableA.clob(x) tableA.x tableA.x tableA.x tableA.x tableA.x tableA.x tableA.clob(x) tableA.x

Left outer join not working

一笑奈何 提交于 2019-12-11 19:19:10
问题 Hello all I have below tables - tr_resource as res - Resourceid name 135021 ABC tr_charac as chlev - characid name 1 CH1 2 CH2 tr_characvalue as cvlev - characvalueid characid stringvalue cv1 1 XX cv2 2 YY cv3 2 zz tr_resourcecharac as rchlev - resourceid characvalueid 135021 cv2 When i run below query - select res.name, cvlev.stringvalue from tr_resource res left outer join tr_resourcecharac rchlev on res.RESOURCEID = rchlev.RESOURCEID inner join tr_characvalue cvlev on rchlev.CHARACVALUEID

Inserting data in table using UTL

为君一笑 提交于 2019-12-11 18:19:47
问题 friends i had written a code to upload a data in newemp table using UTL code i given below but i get the error 1 declare 2 EMPNO NUMBER(4); 3 ENAME VARCHAR2(10); 4 JOB VARCHAR2(10); 5 MGR NUMBER(4); 6 HIREDATE DATE; 7 SAL NUMBER(7,2); 8 COMM NUMBER(7,2); 9 DEPTNO NUMBER(2); 10 line varchar2(100); 11 namesfile UTL_FILE.FILE_TYPE; 12 begin 13 namesfile :=UTL_FILE.FOPEN('DIPRJDIR','empdata.txt','R'); 14 loop 15 UTL_FILE.GET_LINE(namesfile,EMPNO,4); 16 dbms_output.put_line('EMPNO :' || EMPNO); 17

Importing from Oracle to SQL Server

99封情书 提交于 2019-12-11 18:17:21
问题 I am using SQL import/export wizard to import a table from oracle, SQL wizard is generating the following error. TITLE: SQL Server Import and Export Wizard ------------------------------ Could not connect source component. Error 0xc0202009: Source - PORTRAIT [1]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. Error 0xc02020e8: Source - PORTRAIT [1]: Opening a rowset for ""FLDADMIN_TEST"."PORTRAIT"" failed. Check that the object exists in the database.

Does Oracle jdbc driver support SOCKS5 proxy?

一个人想着一个人 提交于 2019-12-11 17:53:29
问题 I am trying to figure out if Oracle JDBC driver supports SOCKS proxy or not. I am not finding any documentation related to this. Please let know if you are aware. 回答1: No the Oracle JDBC driver doesn't support SOCKS5 proxy. In the soon to be release 18.1 version of the thin driver there will be support for HTTPS proxy and websocket. 来源: https://stackoverflow.com/questions/49357985/does-oracle-jdbc-driver-support-socks5-proxy