Tag Info

Hot answers tagged

2

3<4, I opt for option 2 approach. This is also what Oracle instructs us to do in for example this document: http://docs.oracle.com/cd/E11882_01/server.112/e23633/upgrade.htm#UPGRD12394 After you have installed the software for Oracle Database 11g Release 2 (11.2) and any required patches, Oracle recommends that you analyze your database before ...


2

You seem to mixup the terminology for database and schema in an Oracle database. In Oracle up to 11g, a database is just a collection of files. Those files are logfiles, controlfiles, datafiles and tempfiles. Tablespaces are created using datafiles and you create tables and indexes inside a tablespace. If you want to create tables, or other schema objects, ...


2

Move control.dbf to control.dbf.damaged.20140706 connect / as sysdba show parameter control Verify here you have had only a single control file and not two or three of them. If you have had more than one control file, then this instruction is not for you. STARTUP FORCE NOMOUNT; CREATE CONTROLFILE DATABASE "XE" NORESETLOGS NOARCHIVELOG MAXLOGFILES 16 ...


2

You're issuing a "recover database" command, which will recover the database as far as possible. If that includes the archivelogs/redo logs which contain your "truncate" command, then this will also be re-played and the table truncated again. Try doing the restore on it's own, or recovering to a specific time using RECOVER UNTIL... then opening the DB ...


1

This was a problem with the hostname not getting set consistently on boot, and was not correctly available at that time but was later.


1

I have no idea what I'm doing™, but the following, equivalent query seems to do the trick for me (at least, it was equivalent before you had edited your query to use a LEFT JOIN...): SELECT m.id, sub.cnt FROM m JOIN ( SELECT d.m_id, COUNT(1) AS cnt -- (+ other functions) FROM d WHERE d.m_id IN ( SELECT COLUMN_VALUE FROM TABLE( NEW ...


1

Hmmm.... this is an interesting one. The Oracle optimizer is a bit of a black box as far as mere mortals like myself are concerned... Jonathan Lewis wrote a 536 page book on the topic and that's just the **fundamentals* (and it ain't bedtime reading!). Two questions. a) Did you flush the caches before/after each query - maybe the first affects the second - ...


1

@nitesh.kodle123 make the difference between a database instance and a database schema !!! Identify what you want to do and then look for how to do !


1

BASH: DBCA: command not found DBCA should be lower-case.


1

You're missing a PRIOR for the second condition in the connect by. SQL> select * from TREETEST start with PARENTID = 1 and PARENTTYPE = 'A' connect by prior NODEID = PARENTID and prior NODETYPE = PARENTTYPE; -- note the PRIOR here too NODEID N PARENTID P ---------- - ---------- - 2 A 1 A 3 A ...


1

Are the plans always the same? The Oracle optimizer is a pretty complex beast - just ask Jonathan Lewis who wrote a book about it - 536 pages and that's only the "fundamentals"!!! From here Have you ever been in a situation in which some database queries that used to behave well suddenly started performing poorly? More likely than not, you traced the ...


1

The query is sometimes fast because it is in the database's cache. Make a test: alter system flush shared_pool; (as sysdba - NOT IN PRODUCTION !!) execute the query and display execution plan; execute the query and display execution plan (should be faster because the query is not parsed but only executed ); alter system flush shared_pool; (as sysdba) ...



Only top voted, non community-wiki answers of a minimum length are eligible