Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
ERASE YES/NO option in create tablespace

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
LearningDb2

New User


Joined: 19 Jun 2009
Posts: 40
Location: India

PostPosted: Fri Jun 19, 2009 5:08 pm    Post subject: ERASE YES/NO option in create tablespace
Reply with quote

hi,

We are using db2 as our database with z/os.

I am planning to use the ERASE NO/YES option in our CREATE TABLESPACE statement in DB2.
I believed that the datasets that are created during the CREATE TABLESPACE(with ERASE YES OPTION) statement gets deleted if a utility or a sql command drops the corresponding tablespace.
During testing of the same I found the problem that even if we are giving the ERASE NO option then also the datasets are getting deleted after dropping the tablespace from with DROP TABLESPACE tablespacename.

We want the datasets to be deleted according to the ERASE YES/NO option whichever we specify.
Kindly help me in knowing the exact usage of ERASE NO/YES option.

please guide me and correct me if i am wrong..
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Jun 19, 2009 6:25 pm    Post subject:
Reply with quote

I believe Examples given towards the bottom of this Document may help you to understand the concept little more better.
Back to top
View user's profile Send private message
LearningDb2

New User


Joined: 19 Jun 2009
Posts: 40
Location: India

PostPosted: Fri Jun 19, 2009 6:39 pm    Post subject: Reply to: ERASE YES/NO option in create tablespace
Reply with quote

hi Anuj,
Thanx for the reply.

I read the document again but still i am facing the same problem.
I still can't understand the use of Erase YES/NO option because in both the cases my datasets are getting deleted from the specified VCAT name whenever a utility or an sql operation drops that particular tablespace..

Correct me if i am wrong.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Fri Jun 19, 2009 7:05 pm    Post subject:
Reply with quote

It appears you are confusing ERASE and DELETE.
quoted from the reference than Anuj provided:
Quote:
ERASE
Indicates whether the DB2-managed data sets for the table space or partition are to be erased when they are deleted during the execution of a utility or an SQL statement that drops the table space.

NO
Does not erase the data sets. Operations involving data set deletion will perform better than ERASE YES. However, the data is still accessible, though not through DB2. This is the default.
YES
Erases the data sets. As a security measure, DB2 overwrites all data in the data sets with zeros before they are deleted


ERASE NO/YES tells DB2 either not erase the data sets
or overwrites all data in the data sets with zeros

maybe you are hinging on your hopes on However, the data is still accessible, though not through DB2.

data still being accessible only means that the bits and bytes are on disc,
but that is about it.

as you noticed, ERASE YES/NO has no impact on DELETion.
Back to top
View user's profile Send private message
LearningDb2

New User


Joined: 19 Jun 2009
Posts: 40
Location: India

PostPosted: Fri Jun 19, 2009 7:51 pm    Post subject:
Reply with quote

Thanx dbzTHEdinosauer,

it really helped me in analysing the option in a different way.

thanx for the help.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Jun 22, 2009 3:33 pm    Post subject:
Reply with quote

So, did you make some progress?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
No new posts How do I create a mainframe monitorin... anjali.bisht All Other Mainframe Topics 4 Fri Sep 01, 2017 2:20 pm
This topic is locked: you cannot edit posts or make replies. rexx to create a tso command Bharath Vikraman CLIST & REXX 1 Tue Aug 08, 2017 3:32 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts How do you create Eclipse based dialogs jasorn IBM Tools 0 Thu Aug 03, 2017 5:05 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us