If the insert statement fails, is the sequence still incremented?
Let's try it with a test. The table:
After running this anonymous block, the table contains:
Returning:
netxtval
is "wasted" if the insert statement fails.
If the insert statement fails, is the sequence still incremented?
Let's try it with a test. The table:
After running this anonymous block, the table contains:
netxtval
is "wasted" if the insert statement fails.
CLOB
:
With Perl and DBD::Oracle
, the CLOB
in the table can be filled like so:
A CLOB
can be selected like so:
Here's a simple perl script that demonstrates its use:
The code is on github: OracleTool.pm and UtlFile.pm.
NLS_LANG
on Windows in SQL*Plus.
First, it can be verified if the environment variable NLS_LANG
is set:
SQL*Plus will answer with either something similar to
In the first case, the environment variable is set and its value, as displayed by the echo
command is the value for NLS_LANG
.
If the variable is not set, that is in the second case, the following trick allows to determine its value none the less:
There are again two possibilities how SQL*Plus will react. Either
In the first case, the value for NLS_LANG is set in the Windows registry (to the value between [ and ]). In the second case, NLS_LANG is not even set in the Windows registry.
Incidentally, this seems to be achieved much easier like so
A quick google search brought me to the always helpful superuser.com site, particularly this answer.
In short, multiple PDFs can be joined so
DBMS_DATAPUMP
can create SQL files from a schema so that these files can later be run to re-create the schema.
This is described in Oracle Note 1519981.1: How to Generate A SQL File Using The DBMS_DATAPUMP_API?. Unfortunately, the note does not explicitely state that the creation of such an sql file consists of two steps, first the schema has to be dumped ordinarly, then, the dumped file has to be turned into the desired SQL file.
Here are the steps to create such an SQL file.
My question on dba.stackexchange.com