Hi,
I have a big DB2 database and I need this database without any Data in
it for testing something. I have made a backup of these db and restore
it on a testing system. My Problem is now how can I delete all Data
because there are more than 500 tables in the db, it’s impossible to
delete all by hand.
I thought theres is another way to do this: only copy the structure of
the database into another DB, here is my problem how can I copy the
complete structure without data in it?
Maybe somebody has an idea about that.
Thanks
-- http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/DB2-Deleting...ict162854.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=545377 4 3552
Hi,
Fughal wrote: I thought theres is another way to do this: only copy the structure of the database into another DB, here is my problem how can I copy the complete structure without data in it?
You say it. Try
db2look -d $DBNAME -e -o outfile.ddl
This will create the file outfile.ddl with the database structure of
database $DBNAME.
You might want to try db2look -h to get more options (or go to the
information-center)
regards,
Norbert
If you only want the structure of the database, use db2look to generate it,
and then use the ddl from db2look to create the required tablespaces/tables
etc in your new database.
Cheers,
"Fughal" <Us************ @dbForumz.com> wrote in message
news:41******** **@alt.athenane ws.com... Hi,
I have a big DB2 database and I need this database without any Data in it for testing something. I have made a backup of these db and restore it on a testing system. My Problem is now how can I delete all Data because there are more than 500 tables in the db, it's impossible to delete all by hand. I thought theres is another way to do this: only copy the structure of the database into another DB, here is my problem how can I copy the complete structure without data in it?
Maybe somebody has an idea about that.
Thanks
-- http://www.dbForumz.com/ This article was posted by author's request Articles individually checked for conformance to usenet standards Topic URL: http://www.dbForumz.com/DB2-Deleting...ict162854.html Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=545377
"Fred Nurk" wrote: If you only want the structure of the database, use db2look to generate it, and then use the ddl from db2look to create the required tablespaces/tables etc in your new database.
Cheers,
"Fughal" <Us************ @dbForumz.com> wrote in message news:41******** **@alt.athenane ws.com... Hi,
I have a big DB2 database and I need this database without any Data in it for testing something. I have made a backup of these db and restore it on a testing system. My Problem is now how can I delete all Data because there are more than 500 tables in the db, it's impossible to delete all by hand. I thought theres is another way to do this: only copy the structure of the database into another DB, here is my problem how can I copy the complete structure without data in it?
Maybe somebody has an idea about that.
Thanks
-- http://www.dbForumz.com/ This article was posted by author's request Articles individually checked for conformance to usenet standards Topic URL: http://www.dbForumz.com/DB2-Deleting...ict162854.html Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=545377
Thanks for the quick answer.
I created the structure with db2look, this works very well, and then I
create the ddl for the tables spaces´with option -l.
I create the new empty DB.
Now there is a new problem when I use the ddl for the table spaces I
get an error like these:
SQL0976N The diskette drive door is open. SQLSTATE=57021
for all table spaces.
I look into the manual and searched for an solution but the only
solution I found at the IBMs Website is, I should close my diskette
drive door. This is a big problem because my "diskette drive" is an
80GB hardisk i cant found any doors to close.
-- http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/DB2-Deleting...ict162854.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=546703
In article <41**********@a lt.athenanews.c om>, Fughal
(Us************ @dbForumz.com) says... Thanks for the quick answer. I created the structure with db2look, this works very well, and then I create the ddl for the tables spaces?with option -l. I create the new empty DB. Now there is a new problem when I use the ddl for the table spaces I get an error like these: SQL0976N The diskette drive door is open. SQLSTATE=57021
Do you have the same 'logical' disks on both systems? Maybe the
source system has more disks then your target system.
If your tablespaces are on one of those disks which on your target
system is a CD or DVD disk you might get this kind of error. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Rick |
last post by:
Hi,
Does deleting an object more than one times incur undefined behavior? I
think it doesn't but just making sure... thanks
Rick
|
by: KC |
last post by:
Hello,
I am using Access 2002. WinXP, Template from MS called Orders Mgmt DB.
I have tweaked this DB to work for our small co. It has worked pretty
well up until I made the mistake of deleting about 80 records from the
Orders table. 80 out of a 1000 records.
Now our data entry form shows our customer addresses, but not customer
order history. When looking at all of the tables, customer, payments,
orders, they still have all of the...
|
by: Bob Darlington |
last post by:
I have a repair and backup database routine which runs when a user closes
down my application.
It works fine in my development machine, but breaks on a client's at the
following line:
If Dir(strLDB) <> "" Then Kill (strLDB)
where strLDB is the path to the ldb file.
The client advises that the ldb doesn't lurk after the program closes.
Any ideas?
|
by: Martin Bischoff |
last post by:
Hi,
I'm creating temporary directories in my web app (e.g. ~/data/temp/temp123)
to allow users to upload files. When I later delete these directories (from
the code behind), the application restarts and all active sessions are
terminated.
This error is also described in detail here:...
|
by: SiouxieQ |
last post by:
Hi there,
I'm using the code below to try to delete a name from a list of names in a
file.
Unfortunately it doesn't quite do what I want it to.
Instead of looking for the name in the textbox and deleting that it is just
deleting the first line of data in the file.
| |
by: Pat |
last post by:
Hi all,
I have a really awkward situation that is causing memory leak problems.
I'm passing data to a driver, and unfortunately, the driver code is not
something I can change, and it is written in C, so it deals with the data
as a big BYTE array. Basically, the driver expects a struct, followed
immediately in memory by a big chunk of raw BYTE data.
The size of the array of BYTEs is determined by certain members of the
struct. So...
|
by: NaziaAkter |
last post by:
Hi EveryOne,
I am having problem with deleting data form database after anyone have close the site. or any one have click the cancel button after entering data. I know the code for deleting data from a MS Access database, But I don,t know waht code to write in thease cases.
Nazia
|
by: shriil |
last post by:
Hi
I have this database that calculates and stores the incentive amount
earned by employees of a particular department. Each record is
entered
by entering the Date, Shift (morn, eve, or night) and the 'employee
name'. There is another table which assigns an ID to the Shifts, i.e.
1,2 and 3 for morn, eve & night shifts respectively. From the mother
table, the incentive is calculated datewise for each employee as per
his shift duty. In...
|
by: Kyosuke18 |
last post by:
Hi everyone,
I have a problem in deleting a data that is connected on the database.. I tried this code but it shows me an error: Run-time error '-2147217900(80040e14)': Syntax error in string in query expression 'ID=". Here is the code that i did:
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim ab As String
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Administrator\My...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |