Create Sybase Database

Database collection is objects like table, view, stored procedure, functions, triggers, users information. ASE(Sybase) installs following default default databases when we install ASE server. Default databases which comes with ASE installation not recommended to use for user data. So, we have to create user defined databases.

master model pubs2(optional sample database) pubs3(optional sample database) sybsystemdb sybsystemprocs tempdb

1. To create Sybase database,first we have to create devices.

2. Now, we are creating database with the name ‘r2schools’, data segment size=200MB and log size =50MB.

create database r2schools on data01='200M' log on log01='50M' go

CREATE DATABASE: allocating 51200 logical pages (200.0 megabytes) on disk
‘data01’ (51200 logical pages requested).
CREATE DATABASE: allocating 12800 logical pages (50.0 megabytes) on disk ‘log01’
(12800 logical pages requested).
Database ‘r2schools’ is now online.

3. To get database information.

use master go sp_helpdb r2schools go

Output: