Tuesday, February 17, 2009

How know when your ASE server was started??

# In ASE 12.5, the server boot time has been captured in loggedindatetime of sysprocesses for the internal system processes:


select min(loggedindatetime)
from master..sysprocesses where suid=0

# In ASE 12.5.0.1, it's even simpler:


select @@boottime


The static global variable @@boottime is undocumented, but happens to be identical to sysdatabases.crdate for tempdb.

# In ASE 12.5, the server boot time has been captured in loggedindatetime of sysprocesses for the internal system processes:


select min(loggedindatetime)
from master..sysprocesses where suid=0

# In ASE 12.5.0.1, it's even simpler:


select @@boottime


The static global variable @@boottime is undocumented, but happens to be identical to sysdatabases.crdate for tempdb.

Wednesday, February 11, 2009

Device Sizes for ASE 15.0

The maximum device size is 4TB.

The maximum number of database devices is 2,147,483,647. However, Adaptive
Server must retain a description of each device in memory, so in practice
this number is limited by your system's memory. Your operating system also
limits how many devices one program can open simultaneously.

A database can contain up to 2,147,483,648 logical pages, so its maximum
size depends on its logical page size:

The maximum database size on a 2K page server is 4TB.

The maximum database size on a 4K page server is 8TB.

The maximum database size on an 8K page server is 16TB.

The maximum database size on a 16K page server is 32TB.
The maximum device size is 4TB.

The maximum number of database devices is 2,147,483,647. However, Adaptive
Server must retain a description of each device in memory, so in practice
this number is limited by your system's memory. Your operating system also
limits how many devices one program can open simultaneously.

A database can contain up to 2,147,483,648 logical pages, so its maximum
size depends on its logical page size:

The maximum database size on a 2K page server is 4TB.

The maximum database size on a 4K page server is 8TB.

The maximum database size on an 8K page server is 16TB.

The maximum database size on a 16K page server is 32TB.

Saturday, February 7, 2009

Model Database Corrupt

The server will start, but tempdb may not get created properly, you cannot create any new databases, and thus it may not be useable.

Load the model database from your dumpfile restart the server.
If you do not have backups, you can restore the original model via script in the script directory, for windows it is:


c:\sybase\ASE-XX_X\scripts\instmodl

You can alternately use the command:

sqlsrvr -d -w model

Of course you would have lost anything that you added to model, so you will have to create those objects again.

The server will start, but tempdb may not get created properly, you cannot create any new databases, and thus it may not be useable.

Load the model database from your dumpfile restart the server.
If you do not have backups, you can restore the original model via script in the script directory, for windows it is:


c:\sybase\ASE-XX_X\scripts\instmodl

You can alternately use the command:

sqlsrvr -d -w model

Of course you would have lost anything that you added to model, so you will have to create those objects again.

Finding number of user connections

select S.config, SY.name, S.value2 from syscurconfigs S, sysconfigures SY
where SY.name="number of user connections" and SY.config = S.config
select S.config, SY.name, S.value2 from syscurconfigs S, sysconfigures SY
where SY.name="number of user connections" and SY.config = S.config