Author |
Message
|
arunkumar1989 |
Posted: Mon Mar 25, 2013 10:23 pm Post subject: How to Import DB2 database |
|
|
 Voyager
Joined: 21 Nov 2012 Posts: 98 Location: Chennai
|
I have uninstalled my db2 database..
i have taken backup my old databases.
now i`m newly installed db2 database.... but do not know how to import that databases. _________________ Being in a crowd when you are alone is ignorance. Enlightenment is being alone in a crowd; a feeling of oneness in a crowd. |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Tue Mar 26, 2013 2:21 am Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
Did you already try RESTORE DATABASE command?
BTW if you add more details about commands you used, version of the database and OS you will perhaps get more detailed answers.
--
Marko |
|
Back to top |
|
 |
arunkumar1989 |
Posted: Tue Mar 26, 2013 2:24 am Post subject: |
|
|
 Voyager
Joined: 21 Nov 2012 Posts: 98 Location: Chennai
|
OS : Windows XP
DB2 version : 9.1
do not know how to write command? _________________ Being in a crowd when you are alone is ignorance. Enlightenment is being alone in a crowd; a feeling of oneness in a crowd. |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Tue Mar 26, 2013 2:38 am Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
Are you using DB2 GUI Control Center to manage and administer systems, DB instances and databases? How did you backup database?
--
Marko |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Mar 26, 2013 3:48 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
arunkumar1989 wrote: |
OS : Windows XP
DB2 version : 9.1
do not know how to write command? |
Did you try googling for.........
DB2 restore database
you know a little thinking about your problem would save you a whole heap of time.
Most of us have forgotten many of the DB2 broker database tips/tricks we had to learn for broker versions prior to V7. If I need this sort of thing now I'll google for it first. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
arunkumar1989 |
Posted: Tue Mar 26, 2013 4:03 am Post subject: |
|
|
 Voyager
Joined: 21 Nov 2012 Posts: 98 Location: Chennai
|
Thanks smdavies99,marko.pitkanen..
My First mistatake : while uninstalling db2 database... i have deleted db2 instance(mine which is root of all database) but i did not delete databases...
now ... i have solved using "db2 catelog db mydatabase"
Steps :
C:\Program Files\IBM\SQLLIB\BIN>db2start
03/26/2013 17:08:40 0 0 SQL1026N The database manager is already active
.
SQL1026N The database manager is already active.
C:\Program Files\IBM\SQLLIB\BIN>db2ilist
DB2
C:\Program Files\IBM\SQLLIB\BIN>db2 "catalog db test"
DB20000I The CATALOG DATABASE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is
refreshed.
C:\Program Files\IBM\SQLLIB\BIN>db2 list db directory
System Database Directory
Number of entries in the directory = 3
Database 1 entry:
Database alias = TDESK
Database name = TDESK
Local database directory = C:
Database release level = b.00
Comment = Travel Desk
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 2 entry:
Database alias = TEST
Database name = TEST
Local database directory = C:
Database release level = b.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 3 entry:
Database alias = MBDB1
Database name = MBDB1
Local database directory = C:
Database release level = b.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
C:\Program Files\IBM\SQLLIB\BIN>db2 "catalog db arun"
DB20000I The CATALOG DATABASE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is
refreshed.
C:\Program Files\IBM\SQLLIB\BIN>db2 "catalog db errordb"
DB20000I The CATALOG DATABASE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is
refreshed.
C:\Program Files\IBM\SQLLIB\BIN>db2 "catalog db bank"
DB20000I The CATALOG DATABASE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is
refreshed.
C:\Program Files\IBM\SQLLIB\BIN>db2 "catalog db defbkd61"
DB20000I The CATALOG DATABASE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is
refreshed.
C:\Program Files\IBM\SQLLIB\BIN>db2 "catalog db is"
DB20000I The CATALOG DATABASE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is
refreshed.
C:\Program Files\IBM\SQLLIB\BIN>db2 "catalog db reservdg"
SQL6028N Catalog database failed because database "reservdg" was not found in
the local database directory.
C:\Program Files\IBM\SQLLIB\BIN>db2 "catalog db reservdb"
DB20000I The CATALOG DATABASE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is
refreshed.
C:\Program Files\IBM\SQLLIB\BIN>db2 "catalog db staffdb"
DB20000I The CATALOG DATABASE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is
refreshed.
C:\Program Files\IBM\SQLLIB\BIN>db2 "catalog db MBdb"
DB20000I The CATALOG DATABASE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is
refreshed.
C:\Program Files\IBM\SQLLIB\BIN>db2stop
03/26/2013 17:12:07 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.
C:\Program Files\IBM\SQLLIB\BIN>db2start
03/26/2013 17:12:14 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
C:\Program Files\IBM\SQLLIB\BIN>db2 list db directory
System Database Directory
Number of entries in the directory = 11
Database 1 entry:
Database alias = ERRORDB
Database name = ERRORDB
Local database directory = C:
Database release level = b.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 2 entry:
Database alias = TDESK
Database name = TDESK
Local database directory = C:
Database release level = b.00
Comment = Travel Desk
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 3 entry:
Database alias = RESERVDB
Database name = RESERVDB
Local database directory = C:
Database release level = b.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 4 entry:
Database alias = DEFBKD61
Database name = DEFBKD61
Local database directory = C:
Database release level = b.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 5 entry:
Database alias = IS
Database name = IS
Local database directory = C:
Database release level = b.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 6 entry:
Database alias = ARUN
Database name = ARUN
Local database directory = C:
Database release level = b.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 7 entry:
Database alias = MBDB
Database name = MBDB
Local database directory = C:
Database release level = b.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 8 entry:
Database alias = TEST
Database name = TEST
Local database directory = C:
Database release level = b.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 9 entry:
Database alias = STAFFDB
Database name = STAFFDB
Local database directory = C:
Database release level = b.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 10 entry:
Database alias = BANK
Database name = BANK
Local database directory = C:
Database release level = b.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 11 entry:
Database alias = MBDB1
Database name = MBDB1
Local database directory = C:
Database release level = b.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
C:\Program Files\IBM\SQLLIB\BIN>db2 "uncatalog db MBdb"
DB20000I The UNCATALOG DATABASE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is
refreshed.
C:\Program Files\IBM\SQLLIB\BIN>db2 "catalog db MBdb"
DB20000I The CATALOG DATABASE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is
refreshed.
C:\Program Files\IBM\SQLLIB\BIN>db2stop
03/26/2013 17:14:06 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.
C:\Program Files\IBM\SQLLIB\BIN>db2start
03/26/2013 17:14:17 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
C:\Program Files\IBM\SQLLIB\BIN>db2cc
C:\Program Files\IBM\SQLLIB\BIN>
Thanks to all ....  _________________ Being in a crowd when you are alone is ignorance. Enlightenment is being alone in a crowd; a feeling of oneness in a crowd. |
|
Back to top |
|
 |
arunkumar1989 |
Posted: Tue Mar 26, 2013 4:05 am Post subject: |
|
|
 Voyager
Joined: 21 Nov 2012 Posts: 98 Location: Chennai
|
Quote: |
Did you try googling for.........
DB2 restore database
you know a little thinking about your problem would save you a whole heap of time.
Most of us have forgotten many of the DB2 broker database tips/tricks we had to learn for broker versions prior to V7. If I need this sort of thing now I'll google for it first.
|
Yes i need to improve my search knowledge.... _________________ Being in a crowd when you are alone is ignorance. Enlightenment is being alone in a crowd; a feeling of oneness in a crowd. |
|
Back to top |
|
 |
|