When you do not have the row in sysprocesses but you do have in
syslocks that is zombie lock ( i.e. phantom lock )
You will need to either recycle ASE server or use dbcc . If you are
using ASE 12.5.4 or later version , you can try using 'dbcc
lock_release'
A phantom [lock] is when there is an entry in syslocks for
a spid, but the spid does not exist in sysobjects (phantoms
have no body, just cast a shadow). Phantom locks are usually
due to bugs in process cleanup in the ASE.
Wednesday, 20 April 2011
ASE : How to 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.
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.
ASE : 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 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.
ASE : 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.
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.
ASE : 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
where SY.name="number of user connections" and SY.config = S.config
ASE : SQL to Find out all "Defined Rules" in ASE database
select sysobjects.name as "rule name",
object_name(syscolumns.id) as "table name",
syscolumns.name as "column name"
from sysobjects, syscolumns
where object_name(syscolumns.domain)=sysobjects.name
and sysobjects.type='R'
object_name(syscolumns.id) as "table name",
syscolumns.name as "column name"
from sysobjects, syscolumns
where object_name(syscolumns.domain)=sysobjects.name
and sysobjects.type='R'
ASE : To check the platform ASE is running on with a SQL query
select name from master..spt_values where type = 'E' and number =1
Subscribe to:
Posts (Atom)