Home » SQL & PL/SQL » SQL & PL/SQL » Creating primary key for schema FOUT using sys (SUSE-LINUX)
Creating primary key for schema FOUT using sys [message #421362] Mon, 07 September 2009 20:26 Go to next message
*Jess*
Messages: 48
Registered: December 2005
Location: Penang, Malaysia
Member

Hi all,

I have a table creation statement below. We dun have the password for schema FOUT, so we shall create this table using sys.

ALTER TABLE ORDER ADD (
CONSTRAINT ORDER_PK
PRIMARY KEY
(ORDER_NUM)
USING INDEX
TABLESPACE FOUT_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
));

Understand that I need to add schema FOUT - FOUT.ORDER for the tables. How bout the primary key, shall I add FOUT.ORDER_PK as well?

Thanks for your time.
Re: Creating primary key for schema FOUT using sys [message #421364 is a reply to message #421362] Mon, 07 September 2009 20:31 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Understand that I need to add schema FOUT - FOUT.ORDER for the tables. How bout the primary key, shall I add FOUT.ORDER_PK as well?

Why post question here rather than just issue DDL & see what happens?

What happens when you get wrong answer here?

You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Go to the URL above click the link "Posting Guidelines"
Go to the section labeled "Practice" & do as directed.
Re: Creating primary key for schema FOUT using sys [message #421373 is a reply to message #421362] Mon, 07 September 2009 23:27 Go to previous message
Michel Cadot
Messages: 68733
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
we shall create this table using sys.

Very bad idea, why not using a DBA account?

- Never ever use SYS (or SYSDBA) but for maintenance purpose (startup, shutdown, backup, recover)
- SYS/SYSDBA is special
- SYS/SYSDBA is Oracle proprietary (try to open a SR/TAR starting with "i did that with SYS/SYSDBA" and you'll see the immediate answer)
- SYS/SYSDBA does not act like any other user
- When you use SYS/SYSDBA Oracle deactivates some code path and activates others
- Whatever you do with SYS/SYSDBA will neither validate nor invalidate the same thing with any other user.

NEVER EVER use SYS/SYSDBA for anything that can be done by another user.
Use SYS/SYSDBA ONLY for something that can't be done by someone else.


Regards
Michel
Previous Topic: decode or if else
Next Topic: ORA-24334- no descriptor for this position
Goto Forum:
  


Current Time: Sat Feb 08 16:25:57 CST 2025