Solved

Database Loading Question

Posted on 2000-05-08
7
463 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 100 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
Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

 

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Today’s effective marketing is about coming down to the customers’ level and engaging in a whole new way. A text message is one of the most effective and influential ways that you can engage your customers. Here are eight ways that you can utilize t…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

690 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