Solved

Database Loading Question

Posted on 2000-05-08
7
427 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SQL Substring Extraction 4 539
Installing Sybase IQ 16.x x64 on Windows 8.1 update1 5 1,531
SSIS Database Insert Issue 17 193
sql anywhere query 5 134
Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

746 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

12 Experts available now in Live!

Get 1:1 Help Now