473,394 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Rename a database?

Can a database be renamed?
DB2 V8.1
AIX V5.2

Apr 13 '06 #1
3 15522
1.) Create a configuration file:

DB_NAME=OLDDB,NEWDB
DB_PATH=provide the path
INSTANCE=provide the instance
NODENUM=0

2.) Save the configuration file as relocate.cfg
3.) use the following command to make the changes to the database
files:
db2relocatedb -f relocate.cfg

Apr 13 '06 #2
shsandeep wrote:
Can a database be renamed?
DB2 V8.1
AIX V5.2


If this is an option, you can uncatalog the db and then catalog it with a
new alias:

$ db2 create db test
$ db2 uncatalog db test
$ db2 catalog db test as new_name

This will not change the actual name of the database but it changes the name
that has to be used in a CONNECT statement. And that is usually all that
matters to an application.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Apr 13 '06 #3
It should be noted that in order to use db2relocate the instance must
be down. That way you avoid future problems in the catalag tables.

Best Regards.

Max

Apr 13 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: news | last post by:
How would I create a database alias name for the following database testingdatabase.com This database exisist on a remote server. I have tried using the database name as server..dbo.table ...
8
by: Matt | last post by:
Hi everyone I was wondering if there was a way to disable a single database with having to shutdown mysql or rename tables? Thanks, Matt
2
by: gdabbara | last post by:
Hi, We have a situation where we want to move our current database server to a different hardware and rename the server. If we change the Physical server name, do we have to go thru the whole...
1
by: John Howard | last post by:
I am attempting to rename a file in VB.net using the MSDN rename function example at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctrename.asp My code looks...
5
by: VB Programmer | last post by:
My web hoster says that I have to rename my ASPNETDB.MDF SqlExpress db for my 2.0 site to work. Is this accurate? If so, how can I rename it without breaking anything on my site? FYI: This is...
12
by: John Baker | last post by:
Hi: I have read a number of threads on the issue of compressing (compacting) Access data bases programmatically, and have been left confused. We are using Access 2000, and I need code that will...
1
by: Magnus | last post by:
I have a set of typed datasets that are tied to a database on a mssql2005 server. They are naturally displayed and available in the DataSources window. Now I want to rename the database, but when I...
12
by: mantrid | last post by:
Im trying to move a file but am having luck my code is below. The temp and target paths are valid as they echo correctly. but I cant get the copy() function to work, or the rename() function ...
1
by: Carl Pearson | last post by:
Howdy, All, Was trying to modify all tables in a particular database starting with the same prefix, i.e., "tbl_". Decided I'd rather have them all start with "_tbl_" instead. Being lazy,...
1
by: AAaron123 | last post by:
I've found the VB/C# statements to rename a database, but isn't there a gui method that will allow me to rename a database? How about moving the files to a new location. Is that possible? ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.