SQL & PL/SQL :: Sequences Not Create NextValue

Apr 6, 2012

I have created a Sequence called testseq. Its working fine since last 1 week. Suddenly no one sequences will not create nextvalue. after executing nextval its return null row.

View 2 Replies


ADVERTISEMENT

PL/SQL :: How Does Oracle Prioritize Which User Should Get First Value Of Nextvalue

Aug 15, 2012

Oracle version 11g r2...I found an interesting sentance in the manual about concurrent access of sequence. URL....

If two users are accessing the same sequence concurrently, then the sequence numbers each user receives might have gaps because sequence numbers are also being generated by the other user my question is how does oracle prioritise which user should get the first value of the nextval?

View 21 Replies View Related

SQL & PL/SQL :: Merger Of Sequences

Feb 10, 2012

I have something upcoming task which include a merger of two database instances. The schema structure is exactly same and there is no duplicity problem. I want to dump the both schema data in one instance. The only challenge i have here is "How to manage the sequences?".

Explanation: Instance A.
Sequence : 1,2,3,4,....20
Instance B
Sequence: 1,2,3,4....20

Requirement : when i merge it should be

Instance C: 1,2,3,4...20 [from Instance A ] cont.. 21,22,23,24.....40 [From Instance B]

View 1 Replies View Related

New Application To Go On RAC Database Uses Sequences

Feb 14, 2011

We have a requirement to install a new application into a 2 node RAC database.

Going over the installation scripts, I noticed that there is a requirement to use sequences, which immediately set the alarms ringing - I know that using sequences with RAC may cause issues (esp as the script is set to cache 500 values at a time).

The way we are planning to implement this application is by channeling the application through a service that is preferred on one node. The second node will be set to available for the service. The database will ONLY be used for this application.

Will this be enough to get round this situation? Or will the second node still try and cache sequence numbers?

View 2 Replies View Related

SQL & PL/SQL :: How To Update Column Value Without Using Sequences

Apr 17, 2013

I am having a table with out a primary key .It also contains data.

My requirement is to add a new column to the table and update the column value with unique and sequential number , starting from 1 to end of rows.

This has to be done without using a sequence.

View 2 Replies View Related

SQL & PL/SQL :: Generate Unique Numbers Without Sequences

Dec 20, 2010

i had a requirement to generate unique numbers without sequences.

For Example: i had a table called "Test".Test has two columns.

ID and Name are 2 column names.Primary key constraint exists on column(ID).

How to generate the ID values without using sequence and Stored procedures.

View 9 Replies View Related

Multiple Table Insert Involving Sequences

Feb 4, 2013

I have a temp table and want to insert that data into 2 tables. In both of my tables i have a sequence column but in my second table its a foreign key to the main table

up_query="INSERT INTO AFFILIATE (FNAME,LNAME,EMAIL,PHONE,ORG,ADDRESS1,ADDRESS2,COUNTY_ID,AFF_ID)
                Select a.FNAME, a.LNAME,a.EMAIL,a.PHONE, a.ORG, a.ADDRESS1, a.ADDRESS2,C.COUNTY_ID,'AF'||aff_seq.nextval 
                FROM temp_aff A LEFT OUTER JOIN COUNTY C
                ON UPPER(A.COUNTY)=C.CNAME";
$up_query2=    "INSERT INTO TEST4 (DEPT_ID,CAMP_ID,AFF_ID, PASSWD) 
                SELECT D.DEPT_ID,C.CAMP_ID,aff_seq.currval,'Zq'||dbms_random.string('A',4)||'$8' from dual,TEMP_AFF A 
                left outer join DEPT D ON (UPPER(A.DEPT)=UPPER(D.DNAME))
                left outer join CAMPUS C ON (UPPER(A.CAMPUS)=UPPER(C.CPNAME))";

However in my test4 table its inserting the aff_seq.currval for all records. Its not incrementing as in the affiliate table.

View 1 Replies View Related

SQL & PL/SQL :: Updating Column With Unique Values Without Using Sequences

Apr 17, 2013

i am having a table with out pk along with data.

Now , i need to add one column to that table , and update this column with the sequence no

like 1,2,3...... upto the max no of records. but i have to do this with out using a sequence.

how can i do.

View 1 Replies View Related

Create Procedure To Create User In Oracle

Jan 19, 2012

I need to create PROCEDURE to create user in oracle

CREATE OR REPLACE PROCEDURE "CREATE_USER_ORACLE8"
(
USER_ID in VARCHAR2,
PASSWORD in VARCHAR2,
ROLES in VARCHAR2,
nReturnCode OUT NUMBER
)
BEGIN
[code].......

Compilation errors for PROCEDURE NOG.CREATE_USER_ORACLE8

Error: PLS-00103: Encountered the symbol "BEGIN" when expecting one of the following:

; is with authid deterministic parallel_enable as
Line: 9
Text: BEGIN

i want that the customer execute PROCEDURE (user_id,password,PROCEDURE )

View 5 Replies View Related

Ora-06502 - Create Generate Procedure That Create Dynamic Procedure Through DBMS_SQL

Mar 31, 2004

ORA-06502...I have database on oracle 9i on Solaris 9. I create a generate procedure that create dynamic procedure through DBMS_SQL. On this database I got the ORA-06502 error. When I tried to run the same procedure on the same database on oracle 8i on NT this work fine.

View 3 Replies View Related

Enterprise Manager :: What Is The Difference Between Create External Table Vs Create Table

Apr 29, 2011

What is the difference between CREATE EXTERNAL TABLE Vs CREATE TABLE .?

Is CREATE EXTERNAL TABLE included in CREATE TABLE?

View 3 Replies View Related

How To Create A Job

Mar 12, 2013

I've got a problem to create a job :

ORA-06550: line 1, column 93:
PLS-00201: identifier 'PKG_MAINTENANCE.MAINTENANCE_PURGE' must be declared
ORA-06550: line 1, column 93:
PL/SQL: Statement ignored
ORA-06512: at "SYS.DBMS_JOB", line 82
ORA-06512: at "SYS.DBMS_JOB", line 139
ORA-06512: at line 4

View 1 Replies View Related

SQL & PL/SQL :: Is GTT Will Create HWM

Aug 16, 2011

IS GTT will create HWM?

View 4 Replies View Related

Create New DB From Hob Backup?

Feb 1, 2013

I have oracle 11.2.0.2 on Linux. I have question regarding that i have last week (1/26/2013) hot backup of database and cold backup from (dec 9 2012). and user needs data from the database but needs to create new db.

how can i do that to create new db with Hot backup of last week?

View 1 Replies View Related

SQL & PL/SQL :: How To Create A Sequence

Sep 11, 2010

Create a sequence E_SQ which start with the (current max empno + 1) and increment by 1.

View 5 Replies View Related

SQL & PL/SQL :: Create TSV File?

Dec 4, 2012

As per project requirement, we need to create tab seeprated file for a table. This table contain around 1000000 records.I have written below sql

set pagesize 10000
set feedback OFF
set serveroutput on
set heading OFF
spool D:OfficeworkDatabase_maintainceMATRIX.txt

[code]...

This query is taking more than 6 hours.if there any other way how can we create tab separated file. Or we can export the entire table in tab separated file format.

View 3 Replies View Related

SQL & PL/SQL :: Create New Table (b) From (a)

Feb 17, 2011

I want to create a new table 'b' from table 'a'.I know the query will be " create table b as select * from a;" But there is some twist in my question. I do not know how many table are there in table 'a' all I know is that there is one column named "timestamp" in table 'a'.

Now I want to create table 'b' with the difference that the column "timestamp" should contain the value "sysdate" instead of the earlier values which were there in table 'a';

Note: I have to do this in single query. I can not first create table 'b' from 'a' and then update the values of column "timestamp" to sysdate.

View 8 Replies View Related

SQL & PL/SQL :: How To Create The Trigger

Jan 28, 2013

how to create the trigger that count the last 7 day about from sale table if the last 7 day amount is greater then 10000 then update the commission 2% other wise do nothing

View 19 Replies View Related

SQL & PL/SQL :: Create Job Using Dbms_jobs

May 30, 2011

I want to create one dummy job using dbms_jobs and execute it under BALA user.This is just for testing purpose.My goal is to test Whether the job executes successfully under the new user i created BALA. All these should happen under BALA user.

View 5 Replies View Related

SQL & PL/SQL :: How To Create View

Feb 25, 2011

I want to create view as follows.

Example:

Create or replace v_name
select job,sal, <funcation>
from emp;

Note:- Funcation returning 4 values.

Requirement:- I want to create view 6 columns.

how to create view.

View 3 Replies View Related

How To Create SQL File

Sep 18, 2008

I have connected to the database and am logged in with SQLPLus and have the SQL prompt.

I need to run a query and would like to create a file 'x.sql' and type the query into that file, save it then run it.

View 3 Replies View Related

Create Standby DB With Different Name

Apr 15, 2013

I want to create a standby db "PROD" to another server. But the problem is that there is also and existing "PROD" instance in that server :(

Can I create it using different name like "PROD2"?

View 4 Replies View Related

PL/SQL :: How To Create Primary Key Like W1

Jul 10, 2012

primary key should be

W1
W2
W3 like this.

1,2,3 are sequence numbers.

View 2 Replies View Related

Cannot Create Controlfile

Jun 27, 2012

When I try create controlfile reuse resetlogs database 'cms';

ORA-01503: CREATE CONTROLFILE failed
ORA-01565: error in identifying file
'%ORACLE_HOME%DATABASEDBS1%ORACLE_SID%.ORA'
ORA-27048: skgfifi: file header information is invalid
OSD-04001: invalid logical block size (OS 1919900730)

What could be the problem? And why is it looking for DBS1%ORACLE_SID%.ORA' should there be such file?

ora11, Win2003 server

View 10 Replies View Related

PL/SQL :: Can't Create A Trigger

May 9, 2013

I cant create a trigger for the following problem "write a trigger to change the "hiredate"(in emp tale) in the default format even if the user enters it in some other format, say year/mon/date..."

View 7 Replies View Related

DBCA To Create Database In 11g?

Oct 28, 2011

I was using DBCA to create database in 11g. It goes to the last step ,but was not able to show up database creation screen. I am running it on AIX.

View 1 Replies View Related

Create ASM Disk Using OracleASM

Jun 2, 2012

I'm trying to create a ASM disk using oracleasm.I created list the disk (using oracleasm), but the view V$ASM_DISK and ASMCMD (lsdsk command) can't see it..Look:

CODE$ oracleasm createdisk DISK3 /dev/sdc1
Writing disk header: done
Instantiating disk: done
CODE$ oracleasm listdisks
DISK1
DISK2
DISK3

Looks fine, but the ASMCMD doesn't listing it...

CODEASMCMD> lsdsk
Path
/dev/oracleasm/disks/DISK1
/dev/oracleasm/disks/DISK2

And the V$ASM_DISK can not...

CODESQL> select name from v$asm_disk;

NAME
------------------------------
DATA_0001
DATA_0000

View 4 Replies View Related

Create Table As With Partitions?

Jan 8, 2011

If I try create table from the following syntax

create table a as select * from table b;

Then I could get only base table structure alone, I would like to get partition syntax as well.

View 1 Replies View Related

Create Table To Increment ID?

Sep 1, 2012

I am trying to create a table that will increment my ID by one using the following commands:

/*Creates the log needed to increment ID*/
create sequence seq_log;
CREATE TABLE MESSAGE_LOG_TABLE
(
IDNUMBER(10)NOT NULLPRIMARY KEY,

[code]...

When I run the above my create sequence completes successfully but I get a ORA-00955: name is already used by an existing object error message on the create table. I have dropped all tables and sequences before running my command but I still get the same error message.

After it bombs out it appears that SQL+ want's more information for it begins to give me line numbers as if it is looking for a ";" to end the above command. I have to exit SQL+ and log back in to continue working.

View 1 Replies View Related

SQL & PL/SQL :: Create FileName With Date

Sep 19, 2012

How do I create a filename with a date using SQL?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved