Create table and table space using Toad for Oracle

Dear all,

We are using Toad 9.7.2.5 for Oracle, how can we:

1) Create table
2) Create tablespace and assign that table to that tablespace.
3) set growth limit for the expansion of that table?

anyway to make sure Toad send alert by email/prompt it when the storage reach the alert and critical level so that we can start adding more disk?
LVL 1
marrowyungSenior Technical architecture (Data)Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ajexpertCommented:
For #2 and #3 you will need DB Module of TOAD

See attached
0
marrowyungSenior Technical architecture (Data)Author Commented:
I dont see anything attached, please attach again !

I never hear about that as all Toad I use can connect to the DB and run query, just like I right click a table and select "generate script", and I get this:

DROP TABLE ADMDBCA.AFR_BILLFLWUP CASCADE CONSTRAINTS;

CREATE TABLE ADMDBCA.AFR_BILLFLWUP
(
  BILL_YEAR       NUMBER(4)                     NOT NULL,
  BILL_MONTH      NUMBER(2)                     NOT NULL,
  SECUSER_ID      VARCHAR2(25 BYTE)             NOT NULL,
  BFLWUP_DATE     DATE                          NOT NULL,
  BFLWUP_COMMENT  VARCHAR2(2048 BYTE)           NOT NULL
)
TABLESPACE DENVER
PCTUSED    0
PCTFREE    10
INITRANS   1
MAXTRANS   255
STORAGE    (
            INITIAL          128K
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
LOGGING 
NOCOMPRESS 
NOCACHE
NOPARALLEL
MONITORING;


CREATE INDEX ADMDBCA.AI_BILLFLWUP ON ADMDBCA.AFR_BILLFLWUP
(BILL_YEAR, BILL_MONTH)
LOGGING
TABLESPACE DENVER_IDX
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          128K
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;


DROP SYNONYM USRDBCA.AFR_BILLFLWUP;

CREATE SYNONYM USRDBCA.AFR_BILLFLWUP FOR ADMDBCA.AFR_BILLFLWUP;

Open in new window

0
ajexpertCommented:
Ok Here is attachment
TOAD-TBLSPACE.doc
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

marrowyungSenior Technical architecture (Data)Author Commented:
it seems that script out something from Toad is easy..

Will Toad tell you how many space left for that tablespace? how can we control the expand of the tablespace so that if the table is expanding more toward 100MB, it will stop expands and alert prompt out ?

For example, how to change the following to make use of disk space limit?

CREATE TABLESPACE DEN_DATAMART_SAN2B DATAFILE 
  'G:\ORACLE\ORADATA\xxx\xxx_DATAMART_SAN2B_02.DBF' SIZE 6144M AUTOEXTEND ON NEXT 1024M MAXSIZE 6144M,
  'G:\ORACLE\ORADATA\xxx\xxx_DATAMART_SAN2B_01.DBF' SIZE 6144M AUTOEXTEND ON NEXT 1024M MAXSIZE 6144M
LOGGING
ONLINE
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK ON;

Open in new window


what is block size means? it means that for each data page of Oracle, it writes data in a 8K page? what is the theory ?
0
marrowyungSenior Technical architecture (Data)Author Commented:
0
Mark GeerlingsDatabase AdministratorCommented:
"using Toad ... how can we..."

1) Create table
2) Create tablespace and assign that table to that tablespace.
3) set growth limit for the expansion of that table?
4)  make sure Toad send alert by email/prompt it when the storage reach the alert and critical level so that we can start adding more disk

Actually,
1) should be: create tablespace [name_you_like] as '[disk location you like]'
2) should be: create a table and assign it to a tablespace.
3) you can control the "next" extent size for a table and you can control the maximum number of extents, so that gives you the ability to set a maximum size for a table.
4) No, TOAD does not send alerts.  You can use Oracle's OEM (Oracle Enterprise Manager) to send alerts, but not TOAD.  TOAD can run queries or reports, and these could indicate a problem.

"what is block size?"
Oracle stores all data (tables and indexes) in blocks that are the same size, at least within a tablespace. Usually, all tablespaces in an Oracle database use the same block size.  Normally, transaction-processing systems work best with small blocks sizes (2k, 4k or 8k).  Normally data warehouses work best with large block sizes (16k or 32k).  Oracle allows us to create tablespaces with different block sizes.  This adds some complexity, and requires that you set some non-default values in your parameter file,  But, this can add improve your system performance.  Start with Oracle's default block size of 8k, until you get more experience with Oracle.  Or, if you know that your system will be primarily a data warehouse, you could start with a larger block size.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
marrowyungSenior Technical architecture (Data)Author Commented:
markgeer,

"1) should be: create tablespace [name_you_like] as '[disk location you like]'
2) should be: create a table and assign it to a tablespace."

"3) you can control the "next" extent size for a table and you can control the maximum number of extents, so that gives you the ability to set a maximum size for a table."

Please show me some URL to understand the basic information about extent.

"4) No, TOAD does not send alerts.  You can use Oracle's OEM (Oracle Enterprise Manager) to send alerts, but not TOAD.  TOAD can run queries or reports, and these could indicate a problem"

Thanks and good answer ! I reserver all mark to you. I keep learning from you.

but someone told me that, as I am doing the 10g right now, using OEM is dangerous for 10g and can kill the 10g DB server from time to time. So I use Toad.

"Start with Oracle's default block size of 8k, until you get more experience with Oracle.  "

The MS SQL one use 8K and a chuch of 8K, which make up of 8x 8K page, one 64 K each time it write data to the disk. So I think it is a good match between Oracle and MS SQL.

I see from Toad that Oracle has block size and extent, what is extent about ?

some kind of script has "EXTENT MANAGEMENT LOCAL AUTOALLOCATE", is that mean Oracle automatically manage the extent ??
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.