Solved

how to backup sybase by script on AIX ?

Posted on 2004-09-28
9
528 Views
Last Modified: 2010-08-05
Hi,

I need a script that backup sybase database (full backup). is it possible ? if yes how ?

Thank you
0
Comment
Question by:saito1
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 3

Author Comment

by:saito1
ID: 12167520

this script should backup the database to tape device (/dev/rmt1)

0
 
LVL 14

Accepted Solution

by:
Jan_Franek earned 325 total points
ID: 12167833
Well, I don't know nothing about AIX, but I assume it's just kind of UNIX so it should be possible. You just need to invoke isql with right parameters.

1. create SQL script containing SQL commands to do the backup:

DUMP DATABASE yourdatabasename TO /dev/rmt1
GO

2. invoke isql:

$SYBASE/$SYBASE_OCS/bin/isql -S yourservername -U yourusername -P yourpassword -i yoursqlscriptname

0
 
LVL 14

Expert Comment

by:Jan_Franek
ID: 12167861
0
 
LVL 13

Assisted Solution

by:alpmoon
alpmoon earned 175 total points
ID: 12186588
An alternative to invoke isql:

username=....
password=....
server=.....

isql -U$username -P$password -S$server -w300 << EOF > output_file

DUMP DATABASE yourdatabasename TO /dev/rmt1
GO

EOF

In this way you can keep everything in shell script.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 3

Author Comment

by:saito1
ID: 12187354
Thank you very much I will try this...

alpmoon

why do you use "-w300" option what happened if I don't use it ?
and also what is output_file for ? is it something like "/dev/null" ?


I don't have time to try now but I will try the scripts as soon as I have time .

Thank you very much...
0
 
LVL 13

Expert Comment

by:alpmoon
ID: 12196230
"-w 300" is useful if output is longer than 80 character, to get a better output just in case.

output_file is file name to save the messages. You can use any name. Ideally you should check that file whether an error occured or not. In Kourne shell:

if ( egrep -q "Msg|error" output_file ) then
                echo "`date` $server ERRORS found, please check log"

0
 
LVL 3

Author Comment

by:saito1
ID: 12216140
when I try backup database it gives the error below ?? Thank you.

WARNING: In order to LOAD the master database, the SQL Server must run in single
-user mode.  If the master database dump uses multiple volumes, you must execute
 sp_volchanged on another SQL Server at LOAD time in order to signal volume changes.

Backup Server session id is:  95.  Use this value when executing the 'sp_volchan
ged' system stored procedure after fulfilling any volume change request from the Backup Server.
Backup Server: 8.5.1.1: Warning, unable to open device configuration file /usr/opt/sybase/backup_tape.cfg for reading. Operating system error No such file or directory.
Backup Server: 8.15.1.1: Device /dev/rmt1: not found in tape configuration file.
  Tape configuration will be attempted.
Backup Server: 8.10.2.1: Device /dev/rmt1: Not found in configuration file /usr/opt/sybase/backup_tape.cfg.  INIT needs to be specified to configure the device.
Msg 8009, Level 16, State 1:
Line 1:
Error encountered by Backup Server.  Please refer to Backup Server messages for details.
0
 
LVL 3

Author Comment

by:saito1
ID: 12216386


OK I have found the solution. thanks...
0
 

Expert Comment

by:vsaiviwat
ID: 15020396
what is ur solution, please i have the same problem.. thanks
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
A procedure for exporting installed hotfix details of remote computers using powershell
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 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

13 Experts available now in Live!

Get 1:1 Help Now