Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Backup questions

3 posts in General Discussion Last posting was on 2004-04-20 22:13:18.0Z
Eric Posted on 2004-04-20 21:23:48.0Z
From: "Eric" <ericr@trans-soft.net>
Newsgroups: ianywhere.public.general
Subject: Backup questions
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 65.248.24.58
X-Original-NNTP-Posting-Host: 65.248.24.58
Message-ID: <408594e4@forums-1-dub>
Date: 20 Apr 2004 14:23:48 -0700
X-Trace: forums-1-dub 1082496228 65.248.24.58 (20 Apr 2004 14:23:48 -0700)
X-Original-Trace: 20 Apr 2004 14:23:48 -0700, 65.248.24.58
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2976
Article PK: 6444

Hi -

I'm working on developing a backup process for my client and I've run into
a couple of questions. I'd like to run dbvalid against my db and then back
it up. I've written an event to run the backup but I'm unsure of how to
check the return from the sa_validate call.

Also, I'd like to do a full backup every night and then a log dump every
couple of hours after that. I'd like to keep a couple of days of full
backups around. Is there a rename for the db files like with the rename
option for transaction logs?

Thanks
Eric


Eric Posted on 2004-04-20 21:25:01.0Z
From: "Eric" <ericr@trans-soft.net>
Newsgroups: ianywhere.public.general
References: <408594e4@forums-1-dub>
Subject: Re: Backup questions
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 65.248.24.58
X-Original-NNTP-Posting-Host: 65.248.24.58
Message-ID: <4085952d$1@forums-1-dub>
Date: 20 Apr 2004 14:25:01 -0700
X-Trace: forums-1-dub 1082496301 65.248.24.58 (20 Apr 2004 14:25:01 -0700)
X-Original-Trace: 20 Apr 2004 14:25:01 -0700, 65.248.24.58
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2977
Article PK: 6445

Sorry,

I'm running ASA 9.0.1.1841 on Windows and ASA 9.0.0.1120 on Redhat 2.1.

Eric

"Eric" <ericr@trans-soft.net> wrote in message news:408594e4@forums-1-dub...
> Hi -
>
> I'm working on developing a backup process for my client and I've run
into
> a couple of questions. I'd like to run dbvalid against my db and then back
> it up. I've written an event to run the backup but I'm unsure of how to
> check the return from the sa_validate call.
>
> Also, I'd like to do a full backup every night and then a log dump every
> couple of hours after that. I'd like to keep a couple of days of full
> backups around. Is there a rename for the db files like with the rename
> option for transaction logs?
>
> Thanks
> Eric
>
>


Greg Fenton Posted on 2004-04-20 22:13:18.0Z
From: Greg Fenton <greg.fenton_NOSPAM_@ianywhere.com>
Organization: iAnywhere Solutions Inc.
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 MultiZilla/1.6.2.0c
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Backup questions
References: <408594e4@forums-1-dub>
In-Reply-To: <408594e4@forums-1-dub>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vpn-concord-016.sybase.com
X-Original-NNTP-Posting-Host: vpn-concord-016.sybase.com
Message-ID: <4085a07e$1@forums-1-dub>
Date: 20 Apr 2004 15:13:18 -0700
X-Trace: forums-1-dub 1082499198 158.159.8.16 (20 Apr 2004 15:13:18 -0700)
X-Original-Trace: 20 Apr 2004 15:13:18 -0700, vpn-concord-016.sybase.com
Lines: 46
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2979
Article PK: 6447


Eric wrote:

> Hi -
>
> I'm working on developing a backup process for my client and I've run into
> a couple of questions. I'd like to run dbvalid against my db and then back
> it up. I've written an event to run the backup but I'm unsure of how to
> check the return from the sa_validate call.

From the ASA 9.0.1 online docs:

ASA SQL Reference
System Procedures and Functions
System and catalog stored procedures
- sa_validate system procedure

"The procedure returns a single column, named Messages. If all tables
are valid, the column contains 'No errors detected'. "


> Also, I'd like to do a full backup every night and then a log dump every
> couple of hours after that. I'd like to keep a couple of days of full
> backups around. Is there a rename for the db files like with the rename
> option for transaction logs?


You could specify a directory name for the backup statement that encodes
the current date:

begin
set @cmd = 'BACKUP DATABASE DIRECTORY c:/my_backups/' ||
DATEFORMAT(NOW(), 'yyyyMMdd') || '/';

EXECUTE IMMEDIATE @cmd;
end;


Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/