# Dbspaces and Sybase

**URL:** https://forum.servoy.com/t/dbspaces-and-sybase/6932
**Category:** Classic Servoy
**Created:** [January 8, 2007, 8:29am UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932 "2007-01-08T08:29:18Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![tweetie](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tweetie](https://forum.servoy.com/u/tweetie)
#### Post date: [January 8, 2007, 8:29am UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/1 "2007-01-08T08:29:18Z")

</div>

What are those and what do they do.  
When I was checking out Sybase Central I stumbled on Dbspaces. It mentioned sometimes a pathname like c:\dev\j2db\build\database\empty\_crosspplatform\example.db  
and in databases I use it mention e:\notariaat\assyst.db

What are those dbspaces doing and what is their purpose?  
It seems I cant remove them. Is it harmfull?

---

<div class="post-metadata">

### Author: ![david\_jonker](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@david\_jonker](https://forum.servoy.com/u/david_jonker)
#### Post date: [January 9, 2007, 2:28pm UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/2 "2007-01-09T14:28:13Z")

</div>

A SQL Anywhere database can consist of multiple database files. A  
DBspace is an extra database file. Extra database files are typically  
used to separate data from different tables onto different hard drives,  
giving queries a performance boost through better disk I/O.

Deleting the DBspace files may cause whatever program is using the  
database to fail.

---

<div class="post-metadata">

### Author: ![tweetie](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tweetie](https://forum.servoy.com/u/tweetie)
#### Post date: [January 9, 2007, 2:42pm UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/3 "2007-01-09T14:42:40Z")

</div>

> david\_jonker:  
> Deleting the DBspace files may cause whatever program is using the database to fail.

What if the filenames mentioned don’t excist, like in my case

---

<div class="post-metadata">

### Author: ![david\_jonker](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@david\_jonker](https://forum.servoy.com/u/david_jonker)
#### Post date: [January 9, 2007, 3:10pm UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/4 "2007-01-09T15:10:45Z")

</div>

Hmm. That’s a good question.

If the application accesses the tables in the  
older DBspaces (or if you think they do), then  
you will likely want to recreate the tables within  
those missing DBspaces. You can create these  
tables either in a separate DBspace, or within  
the main (SYSTEM) database file.

Either way, if you are not going to recreate the  
DBspaces, you can just delete them.

David

---

<div class="post-metadata">

### Author: ![tweetie](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tweetie](https://forum.servoy.com/u/tweetie)
#### Post date: [January 9, 2007, 8:05pm UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/5 "2007-01-09T20:05:19Z")

</div>

> david\_jonker:  
> Either way, if you are not going to recreate the  
> DBspaces, you can just delete them.
> 
> David

That’s just the problem…you can’t delete them

---

<div class="post-metadata">

### Author: ![david\_jonker](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@david\_jonker](https://forum.servoy.com/u/david_jonker)
#### Post date: [January 9, 2007, 8:18pm UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/6 "2007-01-09T20:18:42Z")

</div>

Do you get any sort of error message?

---

<div class="post-metadata">

### Author: ![tweetie](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tweetie](https://forum.servoy.com/u/tweetie)
#### Post date: [January 10, 2007, 8:38am UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/7 "2007-01-10T08:38:18Z")

</div>

It’s just greyed out

---

<div class="post-metadata">

### Author: ![david\_jonker](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@david\_jonker](https://forum.servoy.com/u/david_jonker)
#### Post date: [January 10, 2007, 2:55pm UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/8 "2007-01-10T14:55:21Z")

</div>

Okay. I’m pretty certain we can still delete them.  
You’ll need to start Interactive SQL.

Within Sybase Central, right-click on the database  
in the Folders pane that contains the DB space to be  
deleted. This will open a context menu. Choose the  
Open Interactive SQL menu item.

Then, type the following SQL into the SQL Statements  
pane within Interactive SQL:

DROP DBSPACE oldspace;

Where ‘oldspace’ is the name of the DB space. Execute  
the SQL statement.

David

---

<div class="post-metadata">

### Author: ![tweetie](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tweetie](https://forum.servoy.com/u/tweetie)
#### Post date: [January 10, 2007, 3:01pm UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/9 "2007-01-10T15:01:15Z")

</div>

Not allowed while ‘DBA’ is using database…  
But dont you need at least one DBSPACE? The DBSPACE named ‘SYSTEM’ just simply has the wrong pathname. I noticed also that you can allocate space for a DBSPACE. Could you use this to prevent fragmenting of the db file?

---

<div class="post-metadata">

### Author: ![tweetie](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tweetie](https://forum.servoy.com/u/tweetie)
#### Post date: [January 10, 2007, 10:02pm UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/10 "2007-01-10T22:02:39Z")

</div>

Hi David,

since I have got your attention ![:D]( "Very Happy")  
I am also trying to use the index consultant. But everytime it gets to analyse about 164000 queries SYbase Central gets disconnected. And the ASA service quits. Has it something with the page-size beeing to small and/or DBSPACES?

---

<div class="post-metadata">

### Author: ![david\_jonker](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@david\_jonker](https://forum.servoy.com/u/david_jonker)
#### Post date: [January 11, 2007, 5:09pm UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/11 "2007-01-11T17:09:55Z")

</div>

RE: DBspace…

The SYSTEM DBspace is the default/main db space. I’m assuming you  
mean that the SYSTEM dbspace has the wrong pathname to the other  
DB spaces?! If so, it’s not a big deal. It won’t affect performance at all.

Yes, you can allocate additional space for a DBspace, just like you can  
for a “regular” database (i.e. only has the SYSTEM dbspace). This will  
definitely help with fragmenting of the DB file, because it will allocate  
(attempt to) one continuous block of disk space.

RE: Index Consultant

It shouldn’t be doing this. 164,000 queries is a big number. Are you sure  
you’re not running out of memory? That could possibly be causing the  
connection to close… If you turn on logging and send the file, we can try  
to figure out what the problem is. Turn on logging for the server by  
specifying:

-oe templogfile.txt

David

---

<div class="post-metadata">

### Author: ![tweetie](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tweetie](https://forum.servoy.com/u/tweetie)
#### Post date: [January 14, 2007, 12:16am UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/12 "2007-01-14T00:16:02Z")

</div>

> david\_jonker:  
> RE: DBspace…
> 
> The SYSTEM DBspace is the default/main db space. I’m assuming you  
> mean that the SYSTEM dbspace has the wrong pathname to the other  
> DB spaces?! If so, it’s not a big deal. It won’t affect performance at all.

Yeah…that’s what I ment.

> david\_jonker:  
> Yes, you can allocate additional space for a DBspace, just like you can  
> for a “regular” database (i.e. only has the SYSTEM dbspace). This will  
> definitely help with fragmenting of the DB file, because it will allocate  
> (attempt to) one continuous block of disk space.

> david\_jonker:  
> RE: Index Consultant
> 
> It shouldn’t be doing this. 164,000 queries is a big number.

That was just a workload of 4 hours…At first I had a workload of 350,000 queries, after saving the workload, everything froze and the ASA service quit

> david\_jonker:  
> Are you sure  
> you’re not running out of memory? That could possibly be causing the  
> connection to close… If you turn on logging and send the file, we can try  
> to figure out what the problem is. Turn on logging for the server by  
> specifying:
> 
> -oe templogfile.txt
> 
> David

Where do I do that…in the configuration part of ASA service?Something like

```auto
-ti 0 -x tcpip{dobroadcast=no} -qs -qw -o "C:/Program Files/Servoy/sybase_db/sybase_log.txt"
"C:/Program Files/Servoy/database/assyst.db"
-oe "C:/Program Files/Servoy/sybase_db/templogfile.txt"

```

Another question. Does Sybase give training in the Netherlands. I feel like we are not using the full potential of Sybase and would to spice up our knowledge.

---

<div class="post-metadata">

### Author: ![david\_jonker](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@david\_jonker](https://forum.servoy.com/u/david_jonker)
#### Post date: [January 17, 2007, 2:09pm UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/13 "2007-01-17T14:09:28Z")

</div>

Yes, that is correct. Just add it to the other startup  
parameters.

We can/do offer personal training in the Netherlands.  
The person to contact is Rob Waywell:  
rwaywell\_AT\_sybase.com

David

---

<div class="post-metadata">

### Author: ![tweetie](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tweetie](https://forum.servoy.com/u/tweetie)
#### Post date: [January 19, 2007, 8:55pm UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/14 "2007-01-19T20:55:17Z")

</div>

Hi David,

I can’t seem to get that logging working (see code below).  
I tried to do an analysis again with 37.000 queries. This time I get to actually analyse something, but it stops when it reachs 1031. The connection is dropped. And I have to restart the service.

```auto
-ti 0 -x tcpip{dobroadcast=no} -qs -qw -o "C:/Program Files/Servoy/sybase_db/sybase_log.txt"
-oe "C:/Program Files/Servoy/sybase_db/templogfile.txt"
"C:/Program Files/Servoy/database/servoy_repository.db"
"C:/Program Files/Servoy/database/assyst.db"
"C:/Program Files/Servoy/database/pcdb.db"
"C:/Program Files/Servoy/database/log_data.db"

```

Thankx in advance

---

<div class="post-metadata">

### Author: ![tweetie](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tweetie](https://forum.servoy.com/u/tweetie)
#### Post date: [January 20, 2007, 10:06pm UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/15 "2007-01-20T22:06:25Z")

</div>

OKay I got the templogfile working…but it didn’t mention anything.  
I got the following errors in Sybase Central

```auto
java.sql.SQLException: [Sybase][ODBC Driver][Adaptive Server Anywhere]Communication error

```

```auto
[Sybase][ODBC Driver][Adaptive Server Anywhere]Connection was terminated
SQLCODE: -308
SQLSTATE: 08S01

```

---

<div class="post-metadata">

### Author: ![tweetie](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tweetie](https://forum.servoy.com/u/tweetie)
#### Post date: [January 21, 2007, 6:43pm UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/16 "2007-01-21T18:43:40Z")

</div>

Tried the following:  
-deleted all data from all the tables  
-ran index consultant and performed a new analysis based on a previous workload  
-this the analysis ran all the way through this time(Except it did an analysis twice the amount of queries)  
-When it finished it generated some errors (Some queries were discarded after cauzing parser/optimizer errors)  
-Then a Sybase Central Internal Error occured (see attachment for Stack Trace)  
-When you want to see the indexes in script-form…Sybase Central doesn’t show them

Is it usefull to send the db file with the workload and without the data to you?

Thanx in advance

[scj\_errors.txt](https://forum.servoy.com/uploads/short-url/yui7ectL1iZU71mndLxMd5iPJJY.txt) (38.6 KB)

---

<div class="post-metadata">

### Author: ![Westy](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@Westy](https://forum.servoy.com/u/Westy)
#### Post date: [November 30, 2008, 7:10pm UTC](https://forum.servoy.com/t/dbspaces-and-sybase/6932/17 "2008-11-30T19:10:01Z")

</div>

> david\_jonker:  
> RE: DBspace…
> 
> The SYSTEM DBspace is the default/main db space. I’m assuming you  
> mean that the SYSTEM dbspace has the wrong pathname to the other  
> DB spaces?! If so, it’s not a big deal. It won’t affect performance at all.

The third page of the Sybase Central “Create a new index” wizard presents the following question:  
“In which dbspace do you want to store the index?”

Directly below this question is a list that contains one line that is identified with a name of “SYSTEM” and a path of “c:\temp\holders.db”.  
I assume it is showing that path because at some time in the past I probably unloaded the database to that path. However, the actual database is located in the database subfolder of the Servoy folder.

There does not appear to be any way for me to change the dbspace location that is shown by the wizard. Why does it ask where to store the index and then not give me the ability to specify the location? How can I get around this problem?

Is it safe for me to ignore the path that it is showing and assume that the new index will be saved within the holders.db file in the Servoy database folder?

Dean Westover  
Choices Software, Inc.  
Sybase Central version 4.3.0.2184  
Adaptive Server Anywhere version 9.0.1.1751
