Skip to main content

Cronjob setup in Sybase ASE

Here were have create one new cronjob for the database backup
===============================================
crontab -e

#Daily Backup-system tables and master,sysprocs
00,15,30,45 * * * * /opt/sybase/test.sql
==============================================
$ cat test.sql
cd
. ./.profile
cd /opt/sybase/impbackup
echo "Backup Started"
isql -Ucronjob -Pcronjob123 -S << eof
dump database model to "/opt/sybase/impbackup/model.dmp"
go
eof
echo "Backup Completed"


--------------------------------------------------------

1> sp_addlogin cronjob,cronjob123,master
2> go
Password correctly set.
Account unlocked.
New login created.
(return status = 0)
1> use master
2> go
1> sp_adduser cronjob,cronjob
2> go
New user added.
(return status = 0)

1> grant role sso_role to cronjob
2> go
1> grant role oper_role to cronjob
2> go

Comments

Popular posts from this blog

Undocumented DBCC commands in ASE

Introduction Undocumented DBCC commands: • DBCC BUFFER • DBCC BYTES • DBCC DBINFO • DBCC DBTABLE • DBCC DES • DBCC HELP • DBCC IND • DBCC LOG • DBCC PAGE • DBCC PROCBUF • DBCC PRTIPAGE • DBCC PSS • DBCC RESOURCE • DBCC TAB Literature Introduction In this article I want to tell you about some useful undocumented DBCC commands, and how you can use these commands in SQL Server 7.0 for administering and monitoring. DBCC is an abbreviation of a DataBase Consistency Checker. This is the description of DBCC from SQL Server Books Online: A statement used to check the logical and physical consistency of a database, check memory usage, decrease the size of a database, check performance statistics, and so on. Database consistency checker (DBCC) ensures the physical and logical consistency of a database, but is not corrective. Undocumented DBCC commands 1. DBCC BUFFER This command can be used to print buffer headers and pages from the buffer cache. Syntax: dbcc buffer ([dbid|dbname] ...

Replication Server Quick Ref Guide

Replication Server Guide : • Replication Server Commands • ASE commands and system stored procedures • ASE RSSD stored procedures • RSSD tables • Replication Server System Functions • Troubleshooting Tips Abbreviations Some abbreviations which are used in this Quick Reference Guide: ASE Adaptive Server Enterprise DSI DataServer Interface - RS thread for a connection to a replicate database DIST Distributor - RS thread per primary database LTM Log Transfer Manager; synonym for RepAgent RS, RepServer Replication Server RepAgent Replication Agent (in primary dataserver) RepDef Replication Definition RSI Replication Server Interface - RS thread related to a route to another RepServer RSM Replication Server Manager (a DBA tool normally used in combination with Sybase Central) RSSD Replication Server System Database SQM Stable Queue Manager - RS thread managing a queue SQT Stable Queue Manager - RS thread assembling transactions Replication Server Commands The following commands can only be ...

Interesting Notes on ASE

Some hidden things about ASE Different States of SLEEP When all processes are shown as SLEEPING by sp_who except the one, which issued the sp_who command, how can a user tell the difference between hangings versus running processes? Definitions In pre-4.9.2 SQL Servers, the output of sp_who could be difficult to interpret. Processes showed only one type of SLEEP status, "sleeping". In System 10, and 4.9.2 Rollup 2115 and above, sp_who shows four types of sleep along with the other possible statuses: Value Meaning Infected The server erred with a stack trace, and the process got an error that would normally kill it. The process is infected instead of killed. Background This process is in the background recv sleep The process is waiting for input from the client Send sleep The process is waiting for a write to the client to complete alarm sleep The process is waiting for an alarm (usually means the process is waiting for a wait for command to complete). Lock sleep The process i...