Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how to backup sybase by script on AIX ?

Posted on 2004-09-28
9
Medium Priority
?
553 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
[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
  • 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 1300 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 13

Assisted Solution

by:alpmoon
alpmoon earned 700 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
 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

With the evolution of technology, we have finally reached a point where it is possible to have home automation features like having your thermostat turn up and door lock itself when you leave, as well as a complete home security system. This is a st…
Let's take a look into the basics of ransomware—how it spreads, how it can hurt us, and why a disaster recovery plan is important.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

604 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