To get Sybase Database Usage details

Database is combination of data segment and log segment. It is DBA responsibility to monitor database on daily basis. We can database total space, used space and free space available in a database by running sp_helpsegment stored procedure.

Examples:

1. To get data segment usage and free details.

sp_helpsegment 'default' go

2. To get log segment usage and free details.

sp_helpsegment 'logsegment' go

3. Query to get Sybase Database Usage details:
Continue reading To get Sybase Database Usage details

The ‘select into’ database option is not enabled for database

By default select into option disabled at database level. Which prevents to alter table, and reorg rebuild are run in minimally logged mode.

The ‘select into’ database option is not enabled for database ‘r2schools’. ALTER
TABLE with data copy cannot be done. Set the ‘select into’ database option and re-run.

Resolution: Before executing these commands, first set the select into/bulk copy database option to true to allow Adaptive Server to break the dump sequence—that is, to perform operations that prevent the ability to use dump transaction.
Continue reading The ‘select into’ database option is not enabled for database

Column is part of a primary key constraint and cannot be null

When we tried to apply primary constraint on a column with a null constraint (nullable), we receive the error message.

Column column_name is part of a primary key constraint and cannot be null

Reason: When a table is created, by default every column is nullable. So first off all we have to remove the null constraint and apply a NOT NULL constraint on the column

Workaround:
Continue reading Column is part of a primary key constraint and cannot be null

Add space to database in Sybase

We can add space to database by using alter database command.

Syntax for alter database command.

alter database database_name [on {default | database_device} [= size] [, database_device [= size]]...] [log on {default | database_device} [= size] [, database_device [= size]]...] set { [durability = { no_recovery | at_shutdown | full}] [[,] dml_logging = {full | minimal} ] [[,] template = { database_name | NULL}]} [with override] [for load] [for proxy_update]

Continue reading Add space to database in Sybase

Sybase ASE 16 installation on Linux

In this tutorial, we are going to download the Sybase ASE 16 and install it on Linux(Redhat). ASE installation can be either GUI or CLI. In this tutorial, we are going to install with CLI.

Prerequisites:

Login with either root user or grant /opt/ permissions to user.
Virtual Machine or Physical Machine with Linux OS installation.

1. Download the software from this link.

2. Untar the tar file with following command tar -xvf ASE_Suite.linuxamd64.tgz
Continue reading Sybase ASE 16 installation on Linux