View previous topic :: View next topic
|
Author |
Message |
LearningDb2
New User
Joined: 19 Jun 2009 Posts: 40 Location: India
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
I believe Examples given towards the bottom of this Document may help you to understand the concept little more better. |
|
Back to top |
|
|
LearningDb2
New User
Joined: 19 Jun 2009 Posts: 40 Location: India
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
LearningDb2
New User
Joined: 19 Jun 2009 Posts: 40 Location: India
|
|
|
|
Thanx dbzTHEdinosauer,
it really helped me in analysing the option in a different way.
thanx for the help. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
So, did you make some progress? |
|
Back to top |
|
|
|