Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sybase: Can't CREATE DATABASE: Why not?

Tags:

sybase

sap-ase

This should be simple.

The Sybase docs ("Example 1") say you don't have to specify the size parameter but even if I do:

create database pubs5 on default = '10M'

I still get an error :

Could not execute statement.
CREATE DATABASE failed because of incorrectly specified or unavailable
space. Total number of megabytes specified and available must be at
least 6 megabytes so Model Database can be copied to the new database.
SQLCODE=1810

I've tried different sizes (all over 6MB), removing the size and trying double quotes, single quotes, and no quotes.

Why is this so difficult?

Thanks.

like image 308
Badgerspot Avatar asked Jan 19 '15 10:01

Badgerspot


People also ask

How do I create a database in Sybase?

Create a new Sybase database entity, with sufficient storage devices for data and transaction log. Use either the Sybase Central, the Sybase Control Center GUI tool or use isql with SQL commands. Connect to the server with the sa user. First create database devices for data and transaction log.

What happened Sybase database?

Sybase, Inc. was an enterprise software and services company that produced software to manage and analyze information in relational databases, with facilities located in California and Massachusetts. Sybase was acquired by SAP in 2010; SAP ceased using the Sybase name in 2014.

Is Sybase database still supported?

According to SAP, paid support for Sybase will remain available years beyond the 2025 EoMM deadline; but will cease to release new patches or enhancements for their platform.

Is Sybase going away?

For those of you who may not know, Sybase also known as SAP Adaptive Server Enterprise (ASE), announced the end of mainstream maintenance (EoMM) by 2025.


1 Answers

The syntax is correct, but there is just not sufficient space on your Sybase database device that is marked as default.

The simplest way of solving it is as follows:

disk resize name='master', size='20m'

create database pubs5 on master = '10M'

This extends the master device by 20MB, giving you space to create the database on it. Depending on your setup, your original command may also success after the 'disk resize' command.

like image 169
RobV Avatar answered Oct 12 '22 15:10

RobV