Creating primary key for schema FOUT using sys [message #421362] |
Mon, 07 September 2009 20:26  |
*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 #421373 is a reply to message #421362] |
Mon, 07 September 2009 23:27  |
 |
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
|
|
|