oracle-xe

Change NLS Character set parameters on Oracle 11g XE

倾然丶 夕夏残阳落幕 提交于 2019-12-06 04:09:28
问题 I am using Oracle 11g Express Edition. Currently when I check NLS character set parameter using SELECT * FROM nls_database_parameters; it gives the default values: NLS_CHARACTERSET: AL32UTF8 NLS_NCHAR_CHARACTERSET: AL16UTF16 I want to set both these parameters to UTF8. How can I do so? I have just installed Oracle 11g XE, so there is not data except those required by Oracle itself. 回答1: This worked for me where an application was checking for UTF8 rather than AL32UTF8 . SQL> shutdown

MD5 in Oracle (DBMS_OBFUSCATION_TOOLKIT.MD5)

99封情书 提交于 2019-12-05 15:12:41
I'm trying to compose a function to obtain MD5 hashes from bits I've gathered here and there. I want to obtain the lower-case hexadecimal representation of the hash. I have this so far: CREATE OR REPLACE FUNCTION MD5 ( CADENA IN VARCHAR2 ) RETURN DBMS_OBFUSCATION_TOOLKIT.VARCHAR2_CHECKSUM AS BEGIN RETURN LOWER( RAWTOHEX( UTL_RAW.CAST_TO_RAW( DBMS_OBFUSCATION_TOOLKIT.MD5(INPUT_STRING => CADENA) ) ) ); END; I'm not sure about the return type of the function. DBMS_OBFUSCATION_TOOLKIT.VARCHAR2_CHECKSUM looks like the appropriate choice and as far as I can tell it works as expected but the package

Deferred Segment Creation feature not enabled (ORA-00439)

≡放荡痞女 提交于 2019-12-05 14:25:28
I have .sql script file with DDL for more than 60 tables. I am trying to copy-paste the script into SQL Developer, connected to a database which is "Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production". Sample DDL Script: CREATE TABLE UserName."Table_Name" ( "Col1" NUMBER(*,0), "Col2" VARCHAR2(50 BYTE), "Col3" VARCHAR2(50 BYTE) ) SEGMENT CREATION DEFERRED PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING TABLESPACE "USERS" ; Error report - SQL Error: ORA-00439: feature not enabled: Deferred Segment Creation 00439. 00000 - "feature not enabled: %s" *Cause:

Create Schema in oracle 10g express edition

落爺英雄遲暮 提交于 2019-12-04 19:09:31
问题 I have installed oracle 10g express edition and I did not find the option to create schema.. Is there a option to create schema in oracle 10g express edition or else I have to install other oracle 10g..? To create schema which oracle 10g I have to install... what? 回答1: You don't need to explicitly create schema, Oracle automatically creates a schema when you create a user (see CREATE USER documentation). If you really want, you can use CREATE SCHEMA statement and issue it through Oracle

Change NLS Character set parameters on Oracle 11g XE

点点圈 提交于 2019-12-04 09:21:36
I am using Oracle 11g Express Edition. Currently when I check NLS character set parameter using SELECT * FROM nls_database_parameters; it gives the default values: NLS_CHARACTERSET: AL32UTF8 NLS_NCHAR_CHARACTERSET: AL16UTF16 I want to set both these parameters to UTF8. How can I do so? I have just installed Oracle 11g XE, so there is not data except those required by Oracle itself. Gary This worked for me where an application was checking for UTF8 rather than AL32UTF8 . SQL> shutdown immediate; SQL> startup restrict SQL> select name from v$database; SQL> ALTER DATABASE CHARACTER SET INTERNAL

How to build big and complex database in sql - IN EASY WAY?

隐身守侯 提交于 2019-12-04 06:20:11
问题 I have installed Oracle XE. I build small database every day to practice from command prompt, but now I want to have more. I want to have a bigger database with a lot of different data to practice and make exercises. So, is possible to get a big data file from somewhere and upload to XE database? 回答1: You can't get 'big' data for Oracle Express edition as it is limited to 4GB (10g) or 10GB (11g ). That said, there are public datasets available. Personally I like the FAA data on registered

Create Schema in oracle 10g express edition

纵然是瞬间 提交于 2019-12-03 12:18:40
I have installed oracle 10g express edition and I did not find the option to create schema.. Is there a option to create schema in oracle 10g express edition or else I have to install other oracle 10g..? To create schema which oracle 10g I have to install... what? You don't need to explicitly create schema, Oracle automatically creates a schema when you create a user (see CREATE USER documentation). If you really want, you can use CREATE SCHEMA statement and issue it through Oracle Express web interface or from SQL prompt. onkar The CREATE SCHEMA statement can include CREATE TABLE , CREATE

Why do C-style comments make insert statement run twice?

南楼画角 提交于 2019-12-02 12:43:46
问题 To make a long story short, I started getting ORA-00001 primary key violations and I tracked down the issue to the fact that some of my INSERT INTO statements were running twice. I then discovered that the offending commands had a C-style comment afterwards: WHENEVER SQLERROR EXIT FAILURE SET ECHO OFF SET HEADING OFF SET PAGESIZE 0 SET FEEDBACK OFF SET TIMING OFF SET TIME OFF SET TRIMSPOOL ON SET TRIMOUT ON SET LINESIZE 120 SET SQLBLANKLINES ON SET SERVEROUTPUT ON [...] INSERT INTO INF_FIELD

Creating Multiple table in Oracle

大城市里の小女人 提交于 2019-12-02 09:14:26
问题 I am using Oracle Express 10g and I'm enter the following text to create 2 tables in the sql command line, but it is not working. CREATE TABLE student ( matric_no VARCHAR2(8), first_name VARCHAR2(20), last_name VARCHAR2(20), date_of_birth DATE ); CREATE TABLE student1 ( matric_no VARCHAR2(8), first_name VARCHAR2(20), last_name VARCHAR2(20), date_of_birth DATE ); Can anyone see what I am doing wrong. Thanks 回答1: By "command line" you probably mean the web application that comes with Oracle

Why do C-style comments make insert statement run twice?

余生长醉 提交于 2019-12-02 05:10:59
To make a long story short, I started getting ORA-00001 primary key violations and I tracked down the issue to the fact that some of my INSERT INTO statements were running twice. I then discovered that the offending commands had a C-style comment afterwards: WHENEVER SQLERROR EXIT FAILURE SET ECHO OFF SET HEADING OFF SET PAGESIZE 0 SET FEEDBACK OFF SET TIMING OFF SET TIME OFF SET TRIMSPOOL ON SET TRIMOUT ON SET LINESIZE 120 SET SQLBLANKLINES ON SET SERVEROUTPUT ON [...] INSERT INTO INF_FIELD (FIELD_ID, CATEGORY_ID, COLUMN_EXPRESSION, DISPLAY_NAME, SORT_ORDER) VALUES (17, 1, 'FOO.NAME', 'Name