IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ERASE YES/NO option in create tablespace


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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

Superior Member


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

PostPosted: Fri Jun 19, 2009 6:25 pm
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
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: 6966
Location: porcelain throne

PostPosted: Fri Jun 19, 2009 7:05 pm
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
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

Superior Member


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

PostPosted: Mon Jun 22, 2009 3:33 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts SCOPE PENDING option -check data DB2 2
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts force tablespace using LISTDEF input DB2 1
No new posts CICS vs LE: STORAGE option CICS 0
Search our Forums:

Back to Top