Hot answers tagged

12

At a guess I'd say Marian is right and this is caused by a unique index and constraint having the same name, eg: create table t( k1 integer, k2 integer, constraint u1 unique(k1,k2) using index(create unique index u1 on t(k1,k2)), constraint u2 unique(k2,k1) using index u1); select count(*) from user_indexes where ...


8

This part is unusual: ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe/ This needs to be char-by-char identical every time. I see it ends with a slash here, which is non-standard, and I suspect that you've added it by mistake. Adding a slash will result in "ORACLE not available" in so-called bequeath sqlplus, I've just experimented on my system. Try again ...


5

Seems very strange. You can run: SELECT * FROM user_objects WHERE object_name = 'A_DUP_CALLE_UK1' to check if what kind of object that is Oracle complains about. Then you can run the approriate DROP statement for that. The only other thing I can think of is to drop the table entirely using DROP TABLE A_DUP_CALLE CASCADE CONSTRAINTS to get rid of ...


4

NLS_LANG can't be changed from inside a session, however other settings can. You can't change the character set once a database connection has been established (ie: the 2nd part of NLS_LANG), but you can change the language with: alter session set NLS_LANGUAGE=SPANISH ... and the territory with: alter session set NLS_TERRITORY=SPAIN


4

You have a few options, some of which will make your database unsupportable by Oracle (if you care!) as you need to fiddle with SYS owned objects. The first option is to revoke select privs from everyone: revoke select on all_users from public; Then grant it back to certain users, plus all other internal Oracle users. The 2nd option is to look at the ...


3

I've had the same problem just a few minutes ago... and I've found an explanation. By creating a Primary Key, Oracle creates two objects : a constraint, and an index, that controls the "UNIQUE" part. By dropping the constraint, the index remains there, using the same name of the index, so if you execute just alter table t drop constraint u1; You'll be ...


3

Sounds like you just want a basic AFTER INSERT trigger. Then you can access the inserted data via :new. Something like: CREATE OR REPLACE TRIGGER insert_data AFTER INSERT ON OWNER.TABLE FOR EACH ROW BEGIN INSERT INTO OWNER.OTHER_TABLE (COL1, COL2, COL3) VALUES (:NEW.COL1, :NEW,COL2, :NEW,COL3) END;


3

It's not a bug. This behaviour is expected. If you need to increase the connections, just change the processes limit: SQL> show parameter processes processes integer 150 SQL> alter system set processes = <integer> scope=[...]; SQL> shutdown immediate; SQL> startup; -- Either using pfile or spfile, you'll ...


2

In SQL*Plus, you can change the pagesize SQL> set pagesize 100 will repeat the headings every 100 rows rather than every 15. You can set the pagesize value to (just about) whatever you'd like. If you want to ensure that the headers are only written once, you can set it to a number much greater than the number of rows that the query will return.


2

What does it mean "no longer needed"? Archive redologs have "only one" usage, they can be applied onto the last full/incremental database backup to recover the database. So you either backup your development database and then you can delete them via RMAN during database backup. Or you do not backup your database and then you can run in NO ARCHIVELOG mode.


2

I haven't tried this but in theory you should be able to: Install the exact same version of the software on the other PC using the same installation options (same directory structure, etc). Shutdown the instance on the original PC. Copy all the files from the original PC to the same location on the other PC. Start the instance on the other PC. This ...


2

You need to take a dump of the source database using DataPump export. Then on the target PC install Oracle XE, and use DataPump import to import the dump taken from your source PC. For details on the DataPump utility, please see the manual: http://docs.oracle.com/cd/E11882_01/server.112/e22490/part_dp.htm There are also various tutorials for this utility ...


2

Currently Oracle does not support MacOSX. They did for Tiger but dropped support plans for Apple when they bought SUN Microsystems. If you are willing to install an older version of MacOSX you can install Oracle 10.1.0.5 (fully featured) or 10.2.0.4 (incomplete). For now: forget it. What you can do is run 11g on vmware. I have it running on macs using ...


2

This is very simple and there are many tutorials out there. Here is a sample trigger to demonstrate. create table aaaa ( a number ); create table bbbb ( b number ); create trigger aaaa_aitrig after insert on aaaa for each row begin insert into bbbb values ( :new.a ); end; / In case you were wondering, ":new" is a reference to the newly inserted ...


2

There are two tables you can get this info from. APEX_WORKSPACES and APEX_APPLICATIONS. The schema that these tables reside in depends on the APEX version. By way of example, my vanilla Oracle 11.2 install has them in the APEX_030200 schema. To list: select USERNAME from DBA_USERS where USERNAME like 'APEX%'.


2

The export utility will use the NLS_LANG environment variable specified for the client session. If all your data can be represented in the Windows-1252 character set, that shouldn't be an issue. If you want to do the export using the AL32UTF8 character set, you'd need to set the NLS_LANG. In Windows, that would be something like c:\> set nls_lang = ...


2

The information about database data files and online redo log files along with their paths is stored in the control file(s). The information about the control file path is stored in initialization parameter file (pfile) or in server parameter file (spfile). So if you moved your data files, online redo log files and/or control file(s) you should update the ...


2

In APEX 4, the following are defaults: WORKSPACE = INTERNAL USER = ADMIN


2

Yes, you can change NLS_LANG on server and session level. Changing database characterset is almost impossible when the original characterset is not US7ASCII. To change NLS_LANG: Environment variable NLS_LANG System environment variable NLS_LANG Use registry HKLM\software\oracle... and add string value. Remember to use quoting when necessary on Windows ...


2

when you are installing oracle database you can install all oracle example schemas like scott, HR, oe ... you can install these in step "Specify Database Config Details".click the last tab page "Sample Schemas" then check the check box "create database with sample schemas" as displayed bellow in screenshot. if you already installed database you can ...


2

This version of Oracle XE is based on 11g2 edition, which is not compatible with CentOS 7. In fact, it isn't even 100% compatible with CentOS 6, however it will run there without problems, after you install a number of RPM packages not installed/required by Oracle installer (especially libaio both 32/64-bit). These are formal OS requirements for XE 11g2: ...


1

If the problem is only cannot start sqlplus, there are two alternatives: 1) If one has the GUI (GNOME or KDE), do the search: "sql command line", and It will appear Run SQL Command Line. 2) Check again the environment variables. Edit the files /root/.bash_profile and /root/.bashrc (for example: # nano /root/.bash_profile) and put the line (at the end): ...


1

You can edit the dump file and change the included NLS_LENGTH_SEMANTICS from BYTE to CHAR. Near the beginning of the file you find a line ending like this : ^@02:00:^@^@^D^@BYTE^F^@UNUSED^A^@2^K^INTERPRETED^K^@DISABLE:ALL^@^@ Change BYTE to CHAR using your favorite text editor and save the file. When you will imp that new dump file, all columns will be ...


1

AUTOBACKUP, by default, contains automatic backups of the controlfile and the spfile (if the database has one), if the AUTOBACKUP feature is enabled. rman target / show all; There you should see: CONFIGURE CONTROLFILE AUTOBACKUP OFF# default Or ON, if it is configured. With AUTOBACKUP enabled, the controlfile will be automatically backed up on backup ...


1

I see no reason you can't do this. Typically, you would perform the following steps. Move the *.dbf files found in %ORACLE_BASE%\oradata\ to a safe place. Move the files found in %ORACLE_BASE%\fast_recovery_area\ to a safe place. Move the spfile found in %ORACLE_HOME%\database\spfileXE.ora to a safe place. Install a new Oracle instance and Configure it ...


1

In fact I too came here to build a sample DB for scott schema in Oracle_v11g. I couldn't find DBCA as told above, but on further search, I found a file called scott.sql. It had lines to create the needed DB. So I connected to Oracle as system and ran it - all the tables were created. Now I couldn't connect using Scott as Id. Changed the password in System ...


1

I found out what the problem is, in my XE 10 additional tablespaces were created. When the import into 11 discovers those tablespaces do not exist yet, it tries to recreate them with the statement with which they were created in the first place, in XE 10. That explains where the wrong paths are coming from. I just copy & pasted the create statements ...


1

Cannot allocate memory means you have not enough ram. check the memory requirements in the oralce guide


1

For that purpose you can download the pre-built virtual Machines (VMs) provided by Oracle. They only need Oracle Virtual Box in order to check them out (https://www.virtualbox.org/wiki/Downloads). You can download them here: http://www.oracle.com/technetwork/community/developer-vm/index.html This is the best solution for learning Oracle DB, without ...



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