Tag Info

New answers tagged

0

Let me know if you have better solution than this one? SELECT TO_NUMBER (TO_CHAR (CurrDate, 'YYYYMMDD')) AS date_key, CurrDate AS alt_full_date_key, TO_NUMBER (TO_CHAR (CurrDate + 1, 'WW')) AS week_num_of_year, TO_NUMBER (TO_CHAR (CurrDate + 1, 'IW')) AS week_num_of_year_iso, CASE WHEN currdate >= NEXT_DAY (TRUNC ...


0

ISO Definition is here, You need to check if Jan-01 is Monday, if it is, then you can use ISO week format model 'IW'. If it isn't you can still use that but subtract 1 from that value. WITH x AS (SELECT to_char(trunc(SYSDATE,'YYYY'),'DY') y_b FROM dual) ,y AS (SELECT to_date('01-05-15','mm-dd-rr') AS d FROM dual UNION ALL SELECT ...


4

No that is not possible, only session accessing the GTT can see it. IF you wish, you can use a physical table and model it as if it s a GTT. It isn't difficult, but isn't very efficient either.


3

Well, I guess the database is expendable since there is no proper backup. So just drop and recreate the database. OK, seriously there are not many options left. Before you do anything shutdown the database and copy all files which belong to the database somewhere else! Because everything you do can make it worse. Once you did that you have 2 options: ...


0

Without having any details on the tables structure I can only point to the obvious "value too large for column", the source value is 3605 and the target can only support up to 1000.


0

a) The command alter database open showed: ORA-01190: control file or data file 1 is from before the last RESETLOGS ORA-01110: data file 1: '+DATA/db-name/datafile/system.333.741265951' This can have several reasons but in your case it means that the database found redologs which do not fit the controlfile/datafiles. This probably happened like this: ...


-1

Commands to restore database without needing to apply redo. If you don;t want the database to roll forward make sure that there are no files in the archive log directory. You can tar and delete them or just move them elsewhere. shutdown abort; startup nomount; restore controlfile from '/u02/backups/dbname/dbname_1cpqqnpv_1_1_20141222_1'; alter database ...


0

http://docs.oracle.com/cd/B19306_01/backup.102/b14191/rcmconc1.htm#BRADV111 If CONFIGURE CONTROLFILE AUTOBACKUP is ON, then RMAN automatically backs up the control file and the current server parameter file (if used to start up the database) in one of two circumstances: when a successful backup must be recorded in the RMAN repository, and when a ...


1

You can't dynamically change the column you're sorting by using static SQL. You'd need to use dynamic SQL. Something like this should work create or replace FUNCTION someFunction(SortCol1 varchar2 default 'column1', SortDir1 varchar2 default 'ASC') RETURN STUFF pipelined AS c1 SYS_REFCURSOR; c1_rec ...


1

There's some information missing that would be useful but my first approach would be to concatenate the files into a smaller number of large input files to cut down the file handling overhead. Look at the load method and check if the data profile supports the use of SQL Loader direct loads. If SQL loader is not appropriate maybe use external tables and add ...


0

any particular reason you are using raid 6? raid 6 has extra overhead in write operations as it has additional parity over raid 5. Also the number of indices on the table can potentially slow down inserts. So to answer your specific question: 'Can I do something to improve speed?' Yes, move away from raid6 (to raid 1+0 or even try ASM with raw ...



Top 50 recent answers are included