Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restored database shows odd sysusages entries

Status
Not open for further replies.

Tison

Programmer
May 12, 1999
216
0
0
CH
I have loaded a database from one server onto another but with different device allocations.
When I LOAD the database, the sysusages entries get changed.
How can I correct them ?
 
You have to create the loaded database with the same device allocation as the original. Please do the following:

source server

select * from sysusages where dbid = <source_database_ID>
go
--this will give all the info with segmap = 3 being data,
-- = 4 log and = 7 (data + log). The size is the size of
--segment and you need to devide it by 512 to get it in MB

--In the target data server create database for load with the same segment order as the source database. The first line can be create database. For example.

create database <target_database> on device01 = 100 log on device02 = 50 for load

alter database <target_database> on device 01 = 200 for load
alter database <target_database> log on device02 = 50 for load

and so on.

Once the target database is created OK, load it from the dump. The segments should match OK. Then set the database options.

good luck
 
Many times what I have seen in the field is a database is created starting to use small increments(100MB, 200MB), and then all of the sudden, the application starts to be used extensively and DBA starts to use 2GB increments.

Well, you can start to run out of device fragments within a DB, and may want to clean it up and reduce the fragmentation of you sysusages.

So, if you created you DB as follows:

DATA1 200
LOG 500
DATA1 200
DATA1 200
DATA1 200
DATA1 200
DATA2 1000
DATA2 1000

YOu can create your new database as:

DATA1 200
LOG 500
DATA1 800
DATA2 2000

Load you dump, and you are off and running.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top