Solved

Database Loading Question

Posted on 2000-05-08
7
436 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
group by and where clauses 3 545
Clean up a mailbox 5 153
Temporary tables in Oracle 9 136
sybase 3 35
If your vDisk VHD file gets deleted from the image store accidentally or on purpose, you won't be able to remove the vDisk from the PVS console. There is a known workaround that is solid.
Fine Tune your automatic Updates for Ubuntu / Debian
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

947 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now