The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

Hi I have attempted to follow the post on changing the database page size from February 2013.

I am using Sybase ASA

Step 1 was to create a fresh database using dbinit - p 8k c:\sqlData\NewData\MyData12.db

Step 2 was to use the dbunload command to copy the existing database to the new one with:

dbunload -c "UID=DBA;PWD=sql;DBN=MyData12;DBF=c:\sqlData\MyData12.db" -ar "UID=DBA;PWD=sql;DBN=MyDataNew;DBF=c:\sqlData\NewData\MyData12.db"

This results in SQL Error: Specified database file already exists.

I have tried using the -ac and -an switch both giving the same error.

What have I missed?

I wish to change the existing database 4k page size to 8k page size keeping the same database name and file. Just as in the orignal post with the -ar option, but I can't seem to get it to work.

asked 17 Feb '15, 22:22

Datagaard's gravatar image

accept rate: 0%

Comment Text Removed

When you want to reload into an existing database, you cannot use option "-ar" as that creates a new database by design and replaces the old one. Instead you want to use option "-ac" instead.

If you only want to change the pagesize, you could omit the step to create a new database and could then use something like (untested):

dbunload -c "UID=DBA;PWD=sql;DBN=MyData12;DBF=c:\sqlData\MyData12.db" -ap 8k -ar

in one step.

permanent link

answered 18 Feb '15, 03:56

Volker%20Barth's gravatar image

Volker Barth
accept rate: 32%

edited 18 Feb '15, 04:08

Hi Volker,

Didn't work, I get the same error "Specified database file already in use". Do I have to stop the database service first?

The answer is yes. I have to stop the database service first. Doh!!

(18 Feb '15, 18:01) Datagaard
Replies hidden

Ah, I see - yes, this is documented behaviour - from the DBUNLOD doc page:

To unload a database, first ensure that the database is not already running. Then, run dbunload, specifying a DBA user and password, and referencing the database with the DBF= connection parameter.

(19 Feb '15, 03:18) Volker Barth


Is each DB as follows?
c:\sqlData\MyData12.db = 4k
c:\sqlData\NewData\MyData12.db = 8k

Please try the following command.

dbunload -c "UID=DBA;PWD=sql;SERVER=MyData12;DBF=c:\sqlData\MyData12.db" -ac "UID=DBA;PWD=sql;SERVER=MyDataNew;DBF=c:\sqlData\NewData\MyData12.db" -xx


permanent link

answered 18 Feb '15, 02:53

asa's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 17 Feb '15, 22:22

question was seen: 779 times

last updated: 19 Feb '15, 03:18