?
Solved

Database Loading Question

Posted on 2000-05-08
7
Medium Priority
?
467 Views
Last Modified: 2012-06-27
I have a sybase database in which data and logs are mixed up within data and log devices. If I take its dump file and load into another database it make the target database similar to the source db in terms log and data device combination. I want the target database to hold data and log in their respective devices and no mixup at all. I know we can do this by trasnferring data using bcp files.The target DB is in a different SUN Box.

Can anyone give me some useful tip ?

Thanks in advance..
Himansu
0
Comment
Question by:himansusb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 3

Expert Comment

by:knel1234
ID: 2789458
himansub,

There are two different answers here:
first, the proper, documented, supported one and second, an alternative one that just happens to work.  If you want to do this the right way, reverse engineer the production database.  You should now have the devices (in order) and their respective device names.  Augment that script and change the device names to match the device names for your development/ standby environment.  I would recommend dropping and recreating these devices ( in the same order as the existing database).
Answer #2... If this is a test environment and you want to play around a little.... When the total size of the databases (source and destination environments) match and the total size of data and log each match (source and destination environments), I have been able to do a dump and restore in version 11.0.2.2 through versions  11.9.2.1

Note: rarely...if ever...will the company continue to supply disk space to match a development environment...
you may want to start thinking of the bcp approach.... Note If needed, code exists to perform diskless (uses memory)
bcp...which depending on your hardware can be efficent (ie no more sybase to flatfile and the flatfile to sybase)

knel
0
 
LVL 1

Accepted Solution

by:
albertsp earned 400 total points
ID: 2803903
I did the following:

Load your database in the new environment. Now you have mixed data and log devices.

1. Dump your transaction with the nolog option: dump tran db with no_log

2. use sp_logdevice to mark one of your devices as the log device. As you wil see this device is now log_only.

3. Edit your sysusages table and update the segmap column. Your segmap should be 4 for the logdevice and should be 3 for the other devices when there are no named segments (only default and system).

Warning!!!! This is not supported by Sybase but it works.

Succes, Albert
0
 

Author Comment

by:himansusb
ID: 2805813
Thanks Albert, please let me know your e-mailid..

Thanks
Himansu
New York
0
Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

 

Author Comment

by:himansusb
ID: 2805901
Mr Albert, sysusages table contains dbid but does not contain information about the logdevices for which I have to update segmap to 4 and 3 for other devices. Using the approach you told I could only separate data from the logdevice but could not separate logs from the datadevices. Any more help please ?

Thanks
Himansu
0
 
LVL 1

Expert Comment

by:albertsp
ID: 2806294
Sysusages has a link to9 the sysdevices table (vstart between low and high)
Your vstart is in the sysusages and low and high in the sysdevices. This makes it possible to distinguish your devices in the sysusages table.

Succes, Albert

albert.spijkerman@dlm.nl.com
0
 

Author Comment

by:himansusb
ID: 2811890
Thanks Albert, I could find that too but could not update the sysusages table although I logged in as an sa which has a role of SSO. Any idea on this ?

I am using Adaptive Server Enterprise / 11.5.1 under Solaris platform.

Thanks for yout help
Himansu
0
 
LVL 1

Expert Comment

by:albertsp
ID: 2813664
Log in as SA.

then: sp_configure "allow updates",1

This allows you to update systemtables.

Succes, Albert
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Summer 2017 Scholarship Winners have been announced!
In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question