SQL & PL/SQL :: Creating A Flight Booking System

Dec 1, 2010

i am trying to create a flight booking system,i am at the stage of creating the tables but am having trouble with creating one of the tables

CREATE TABLE Seat
(Seat_no NUMBER(3) CONSTRAINT PK_Seat PRIMARY KEY,
Class_Code CHAR(2) CONSTRAINT FK_Class_Code FOREIGN KEY (Class_Code) REFERENCES Class(Class_Code)
CONSTRAINTS CHK_Class_Code CHECK(Class_Code='EN' OR Class_Code='FS')
(Class_Code is a primary key in the table Class)

It comes up with an error saying ORA-02253: Constraint specification not allowed here and if i put a coma after the first constraint it says the name already used for an existing constraint.

View 18 Replies


ADVERTISEMENT

Security :: Creating Wallet - System Does Not Prompt For Password

Apr 14, 2011

I'm trying to hide the password for the batch programs that connect to the DB Server

as Cadot pointed out in

[URL].........

Quote:
use secure external password store

with reference to

[URL].........

when I create wallet, the system does not prompt me for password

C:>mkstore -wrl "C:ora102NETWORKADMIN" -create

when creating login credentials, again the system never prompts me for password

C:>mkstore -wrl "C:ora102NETWORKADMIN" -createCredential db10g scott tiger

here's my sqlnet.ora configurations

WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY =C:ora102NETWORKADMIN)
)
)
SQLNET.WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSESSL_VERSION = 0

here's my tnsname.ora settings

DB10G =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = mike)
)
)

here's the outcome

C:Documents and SettingsAdministrator>sqlplus /@db10g
SQL*Plus: Release 10.2.0.4.0 - Production on Wed Apr 13 22:53:06 2011
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

ERROR:
ORA-12534: TNS:operation not supported

Enter user-name:

so I Google around for the solution to the ORA-12534 error, one of the site,

[URL].......

here's my lsnrctl services

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "MIKEXDB" has 1 instance(s).
Instance "mike", status READY, has 1 handler(s) for this service...
Handler(s):
[code].....

The command completed successfully

right now I think I will be a fool to think that the solution is to resolve the ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor. so what is wrong with my setup, or is it some patch that I need to apply?

View 9 Replies View Related

Oracle 10g - Creating Library Management System Using Struts 2

May 18, 2011

i am creating a library management system using struts 2.i have a form that display a table having column(bookname, author, publisher,..etc) and it contains an operation "edit book" with each row. now i m stuck with an update query(or any other query) by which i can edit an entire row (or any column) onclicking the edit button.i'm using oracle 10g database.

View 2 Replies View Related

SQL & PL/SQL :: Trigger - Send Booking ID To Audit Table

Jun 3, 2010

I'm trying to create a trigger that will come into play after the user has inserted a 0 for the booking evaluation, i need the booking id sent to the audit table. This is what I have tried so far:

CREATE OR REPLACE TRIGGER zero_evaluation
AFTER INSERT OR UPDATE ON booking
FOR EACH ROW
WHEN (NEW.Evaluation=0)
BEGIN
INSERT INTO audit (audit_id, booking_id, Reason)
VALUES (audit_id_seq.NEXTVAL,:NEW.booking_id, 'Contact customer for 0 evaluation');
END;

I get the following:
Line 2 PL/SQL: SQL Statement ignored
Line 3 PL/SQL: ORA-02289: sequence does not exist

This is my SQL statement:
CREATE TABLE audit
(audit_id numeric(5) not null,
booking_id numeric(5) not null,

[code]...

View 5 Replies View Related

Server Administration :: Minimum Datafile Size Required For Creating Non-system Tablespace?

May 21, 2007

what is the Minimum datafile size required for creating a non-system tablespace?

I am trying to create a tablespace by giving the syntax like,

SQL> create tablespace t1
2 datafile '/home/data/t1.dbf' size 72k;
create tablespace t1
*
ERROR at line 1:
ORA-03214: File Size specified is smaller than minimum required

SQL> create tablespace t1
2 datafile '/home/data/t1.dbf' size 73k;

Tablespace created.

The blocksize for my database is 4096, as i have heard that the minimum size of the datafile is decided by blocksize, but i want to know that how it is calculated as by giving the above syntax the other values will be default. I am trying the syntax in oracle 9.2.0.1.0 version.

View 13 Replies View Related

Forms :: Difference Between System.current_item And System.cursor_item?

Apr 1, 2012

We have system.current_item and system.cursor_item.....

both represent the same....

like this we have few other system variables also .....

what is the main difference between current_item and cursor_item?

View 2 Replies View Related

CPU System Time (percentage) For Multi Core System?

Aug 21, 2012

couple of questions about below parameters, do they measure single processor or avg usage across all processorss and cpus for example will i recieve alert if CPU system time goes above 95% for single processors? or not

CPU Idle Time (%)
CPU System Time (%)
CPU User Time (%)

View 1 Replies View Related

Migrating To Newer System

Dec 21, 2011

My manager has a couple of 2-proc dual-core Opteron servers with 8GB of RAM and RAID controllers. These servers currently run Solaris 8, but he wants to migrate them to a newer Linux systems.

View 4 Replies View Related

System Generated Constraints

Jul 5, 2012

I was wondering with dba_constraints and i found unexpected result shown as below

select constraints_name, constraint_type from dba_constraints

constraint_name constraint_type
SYS_C00141 c
SYS_C00142 c
SYS_C00143 c
SYS_C00144 c
SYS_C00145 c
SYS_C00146 c
SYS_C00147 c
SYS_C00148 c
SYS_C00149 c

i jst want to know that what is this system generated constraints ?

View 3 Replies View Related

Importing Dmp File From One To Another System

Jul 23, 2013

I have a dmp files of one table . the dmp files are from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

I want to export into my oracle db. i have not create any db or tables . i just installed oracle 11g.

View 1 Replies View Related

System Tablespace Is Growing Up

Aug 19, 2010

On one of our systems, the system tablespace ist growing up fast. The largest objects are:

SYS.C_OBJ# 3 GB (CLuster)
SYS.I_COL1 2,8 GB (INDEX)
SYS.I_COL2 1 GB (INDEX)
SYS.I_COL3 980 MB (INDEX)

why theses objects are going so big? Is it possible to shrink these objects? Table of the three index ist sys.col$ and part of CLuster sys.c_obj#

View 3 Replies View Related

Forms :: What Is Exactly System.cursor_record

Sep 1, 2010

what is exactly system.cursor_record?? actually i read documentation on that...but i still not getting..

View 2 Replies View Related

Windows :: Oracle 8i On XP System

May 12, 2002

i have installed oracle 8i on my windows xp system. it has not given me any problems during installation. i could log on to oracle and work on it without any problems. but when i restarted my system, my system has failed to start the oracle service, and i could no longer logon to sql * plus.

I've got messages 'oracle not available'. i've even tried to start the service from administrative tools-services, but of no use. then i created a new database and log on to sql* plus. but when i rebooted my system, the problem continued.

View 33 Replies View Related

SQL & PL/SQL :: Field Keep On Getting Updated By Other System

May 20, 2011

I have a promotion table which is having 3 columns.

PROMOTION_ID

display_name

ASSET_VERSION
This ASSET_VERSION

field keep on getting updated by other system where they may update the display name of the promotion_id.The main concept of this table is there will be a unique combitination of asset_id and promotion id.

Promotion_idDISPLAY_NAME ASSET_VERSION
123 1ST VERSION 1
123 2ND VERSION 2
123 3RD VERSION 3
456 1ST VERSION 1
456 2ND VERSION 2
456 3RD VERSION 3
789 1ST VERSION 1
789 2ND VERSION 2
789 3RD VERSION 3

So,my requirement is that i have the fetch promotion_id ,display_name that is having highset asset_version.

The OUTPUT SHOULD BE:
Promotion_idDISPLAY_NAME

123 3RD VERSION
456 3RD VERSION
789 3RD VERSION

I need a single sql for this .

Driver used: oracle.jdbc.xa.client.OracleXADataSource
Orcale version: 11G

View 24 Replies View Related

Connecting Using SYS Or SYSTEM Sqldeveloper

Jan 4, 2011

When I attempt to connect to the DB as SYS, SYSTEM using sqldeveloper I get:

ORA-01017:invalid username/password; logon denied

Now I am certain the username and password are correct, I think it has something to do with remote login of SYS account. Are DBA accounts not allowed to connect via network? I get the same error when I try to sqlpython wrapper which I believe uses TCP

[oracle@oracle ~]$ sqlpython sys as sysdba
which: no gedit in (/u01/app/oracle/product/11.2.0/db_1/bin:/usr/sbin:/sbin:/bin:/usr/sbin:/usr/bin)
which: no kate in (/u01/app/oracle/product/11.2.0/db_1/bin:/usr/sbin:/sbin:/bin:/usr/sbin:/usr/bin)
Password:
Connection failure.
Opens the DB connection. Some sample valid connection strings:
[code]....

View 2 Replies View Related

SQL & PL/SQL :: Filter The System Grants?

Jun 3, 2010

As per my req, i need to get the system grants of one user (GRANTEE) using DBMS_OUTPUT API. The requirement get completed using 'SYSTEM_GRANT' as parameter for OPEN function in the metadata api. Please look into part of code which works.

v_meta_handle := DBMS_METADATA.OPEN('SYSTEM_GRANT');
DBMS_METADATA.SET_FILTER(v_meta_handle, 'GRANTEE','SCOTT');

When using above piece, i get sys grants granted to SCOTT user. But i need to use 'DATABASE_EXPORT' as a parameter to my 'OPEN' function.

v_meta_handle := DBMS_METADATA.OPEN('DATABASE_EXPORT');
DBMS_METADATA.SET_FILTER(v_meta_handle, 'INCLUDE_PATH_EXPR','IN''SYSTEM_GRANT''');
DBMS_METADATA.SET_FILTER(v_meta_handle, 'NAME_EXPR','IN''SCOTT''','GRANTEE_EXPR');

The second set filter doesn't work to get SYS GRANTS of one user. It does not throw any error. Simply the filter doesn't work. 'GRANTEE_EXPR' is not a correct value in the 2nd set filter. What parameter need to pass in object_path_expr ('GRANTEE_EXPR')?

View 4 Replies View Related

Database Versus System Statistics

Aug 26, 2011

In the article regarding gathering CBO Statistics, it states: QUOTE When an Oracle database is created, a job will be scheduled that will generate the database statistics for you. You will still need to collect system statistics however, as these are not collected by the automatic statistics gathering mechanism.

what is the difference between "database statistics" and "system statistics"? In other words, do I need to run this script for each schema owner in my 10g/11g instance?

variable whoami varchar2(20);
begin
select user into :whoami from dual;
end;
exec dbms_stats.gather_schema_stats( -
ownname => :whoami, -
options => 'GATHER AUTO', -
estimate_percent => 15, -
cascade => true).

View 2 Replies View Related

Create System Generated Values?

May 14, 2007

Lets say you're making upa school database and you awnted to give the students each a unique student number generated by thesystem.

View 2 Replies View Related

System Error Code 14001

Jun 3, 2011

We need to connect to an Oracle database from an ASP web page and I downloaded and installed ODAC112021.zip to a Window 2003 server; can connect OK I sent the zip to co-worker in another state and he installed it on slightly older build of 2003 server and we get the following error

"The setup routines for the Oracle in OraClient11g_home1 ODBC driver could not be loaded due to system error code 14001"

Only saw one post on OTN discussion and msot mention another error (998) [URL]

View 1 Replies View Related

Server Administration :: System TableSpace Is So Big?

Sep 26, 2011

Today I see my system tablespace is 98%, 480 MB used. Why the system tablespace is so big?

View 5 Replies View Related

Forms :: Meaning Of System Message_level

Jul 3, 2010

what is mean by system.message_level..

View 2 Replies View Related

Windows :: System Admin Log In Error

Feb 6, 2013

i want to log-in my local machine database as a system administrator , but it is giving an error:

C:Windowssystem32>sqlplus /@myprodb as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 6 19:18:15 2013

Copyright (c) 1982, 2010, Oracle. All rights reserved.

ERROR: ORA-01031: insufficient privileges

Enter user-name:

C:Windowssystem32>sqlplus /@myprodb as sysoper

SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 6 19:19:28 2013

Copyright (c) 1982, 2010, Oracle. All rights reserved.

ERROR: ORA-01031: insufficient privileges

Enter user-name:

but

C:Windowssystem32>sqlplus sys@myprodb as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 6 19:20:45 2013

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

and i have run cmd as administrator

View 20 Replies View Related

SQL & PL/SQL :: Possible To Get Exact Name Of Constraint From Any System Table

Sep 1, 2010

There was one constraint define on the column of table that the value of column should be in range of 100 to 200. Some one has deleted the constraint. Is it possible to get the exact name of constraint from any system table.

View 7 Replies View Related

SQL & PL/SQL :: What Does It Mean Persistent Package Variable For System

Jun 7, 2011

Identify a useful persistent package variable for the system.

If i am not wrong a package is like a box where you can add functions procedures inside of it!

variables are something like (x number :=2;) which those are part of functions and all.

2nd question is identify suitable package for the system that implements constraints.create the program package program.

View 3 Replies View Related

Windows :: System Integration CONSULTANT?

Jul 27, 2011

I need information to recommend something to the Client:Existing Application Environment is:

OS: Windows XP Server as well as Client
Database: Oracle 9i Server on XP
Oracle Client : Oracle 9i

They want to move to Windows 7 in ClientWhat all they need to upgrade if required...?Does Oracle 9i Client can be installed on windows 7 clientDoes Oracle 10g Client is required in the above mentioned case.

View 1 Replies View Related

SQL & PL/SQL :: Fetch System Date Using Function?

Oct 18, 2010

create or replace function get_date(nn date)
return date as age date;

BEGIN
age := sysdate;
END;

i want to return that value in front end using callable statament..

View 2 Replies View Related

Forms :: How To Stop System Message

Nov 3, 2010

I have a form with multiple data block. When i want to query and go to next record then this displayed a message "Do you want save changes". But i would like to stop this message(i.e would not see the message) is it possible.

View 3 Replies View Related

SQL & PL/SQL :: Online Shopping Catalog System

Jan 24, 2013

Including order number, name and contact details (email, address, telephones) of customer and date the order was placed, order including product code, quantity ordered and cost charged; and Data on each product in the catalog including product code, name, description, unit price and category.

user to input information n number of order items (where 1 ≤ n ≤ 20) as parameters

a cursor to handle the multiple orders retrieved.

View 2 Replies View Related

Server Administration :: System Tablespace Had Been Used More?

May 4, 2012

In my database ,the size of the system tablespace is 1024M.now i found its free space is 477.875M.

SQL> SELECT TABLESPACE_NAME,SUM(BYTES)/1024/1024 M FROM DBA_FREE_SPACE where tablespace_name = 'SYSTEM' GROUP BY TABLESPACE_NAME ;
TABLESPACE_NAME M
--------------- -------
SYSTEM 477.875

In system tablespace ,the max size segment is IDL_UB1$,it is 167M

SQL> SELECT SEGMENT_NAME, SX || 'M' "Size" FROM (SELECT SEGMENT_NAME,SUM(BYTES)/1024/1024 SX FROM DBA_SEGMENTS WHERE TABLESPACE_NAME = 'SYSTEM' GROUP BY SEGMENT_NAME) WHERE SX > 100 ORDER BY SX DESC;
SEGMENT_NAME Size
------------- -----
IDL_UB1$ 167M

QUESTION: what's the table IDL_UB1$ used for ?

View 4 Replies View Related

Forms :: System Date Change

May 18, 2013

after change the system date form not working. (after enter value in a text field ,cursor not moving)

View 4 Replies View Related







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