Link to home
Start Free TrialLog in
Avatar of ISC
ISC

asked on

Oracle and Toad

Hi,

I am using Toad 7.6.0.11 Standard Addition for the first time and I want to create 2 new tablespaces but I can't see how to do this; there doesn't appear to be any menu option that I can see that allows you to create a 'tablespace'...

Can you help...?

Thanks Ian  
Avatar of hans_vd
hans_vd

I'm having an earlier version, but I think there's not too much differences.

check if menu View -> show toolbar is checked
if not -> click it

Then in the toolbar you see a button (the second from the left in my version) that has hint 'open a new schema browser window' -> click it

Now select the tab Tablespaces and click the button that has hint 'Create new Tablespace'
Of course, you have to be logged in as a privilieged user, otherwise the button will be greyed.
Avatar of ISC

ASKER

Hi,

I have a menu option called 'View' which has the following options....

Browser Filters..
Constraints
Dependencies
Explain Plan
Session Info
Table Duplicates
Reports
DBMS Output
Output Window
Oracle User List
Options
Formatting Options

I can not see any option 'Show Toolbar' sub option under the 'View' menu.

Thanks Ian



 


Open "Schema Browser" from "Database" menu.
i.e. Database => Schema Browser.

In Schema-Browser, you can select Tablespace from various object types. In object-list, you will see existing tablespaces and an add (Create new tablespace) button in object-list's toolbar.

Avatar of ISC

ASKER

Hi,

In the schema browser in the left hand panel I have a set of tabs (which if I understand correctly are object types), the only types I can see are as follows....

Tables
Views
Synonyms
Procs
Triggers
Indexes
Constraints
Sequences
Java
DB Links
Users
Jobs
Types
Queue Types
Queues
Snapshots
Favorites
Clusters

There is no tab object for a 'tablespace'....

Thanks Ian





Avatar of ISC

ASKER

Hi,

Is it something to do with the version of Toad I am using or the way Toad was installed on my machine...?

Thanks Ian
I think you need the DBA option...
Avatar of ISC

ASKER

ploubier,

Can you give me a more detailed explantion....?

Thanks Ian
ASKER CERTIFIED SOLUTION
Avatar of Mehul Shah
Mehul Shah
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you see the note specified with the Create Tablespace help, It clearly states that its only available in the commercial version of toad which has the optional Quest DBA Module

HTH
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ISC

ASKER

The options installed on my machine are....

Options: Formatter Plus

Thanks Ian
So you can't use TOAD to create a tablespace. Sorry...
Or in SQL Editor of course !
yeah if you have know the create tablespace syntax than you can use the command to create tablespace on the SQL Editor.
Avatar of ISC

ASKER

I do have access to a tablespace that has already been created in a different database. Could I create a script file or clone this tablespace then run this script file in the database where I want to create my new tablespace...?

Thanks Ian
From http://www.tafora.fr/wp/tafora_kb_oracle.doc.html

/*
|| Reverse engineering des tablespaces, a partir de 9i
|| Radu Caulea, TAFORA, 2004
*/
SET serveroutput ON;
CREATE TABLE TAFORA_ordres (id NUMBER, ordre VARCHAR2(1000));
TRUNCATE TABLE TAFORA_ordres;
DECLARE
ordre VARCHAR2(2000);
i NUMBER := 0;
BEGIN
DBMS_OUTPUT.enable(1000000);
FOR x IN (SELECT tablespace_name FROM dba_tablespaces) LOOP
   SELECT dbms_metadata.get_ddl('TABLESPACE',x.tablespace_name) INTO ordre
   FROM dual;
   i:=i+1;
   INSERT INTO TAFORA_ordres VALUES (i, ordre);
END LOOP;
COMMIT;
END;
/
SET heading OFF feedback OFF;
spool TAFORA_ordres.lis
SELECT ordre || ';' FROM TAFORA_ordres ORDER BY id;
DROP TABLE TAFORA_ordres;
spool OFF
ploubier, that was a really very helpful package you have posted.

Just to add to it. You can directly use it in the below manner too

set pagesize 0
set long 90000
set feedback off
set echo off

spool tablespace.sql

SELECT DBMS_METADATA.GET_DDL('TABLESPACE',tablespace_name)
     FROM DBA_TABLESPACES;
spool off;



Glad to help !!