Wednesday, January 26, 2011

Maximum device size for ASE 12.5 and ASE 15.0

Up to ASE 12.5.x the maximum device size is 32GB (provided
that the OS knows how to handle large [>2GB] files) because
of the way the device number is encoded in the sysdevices
table (i.e. only 24 bits are available to describe the file
itself).

In ASE 15 this limit has been lifted.


ASE-15 device and database limits per server are as follow:

- device size limit: 4 terabytes per device
- server limit: 2 billion logical devices per server
- database size limit: 32 terabytes per database
- server limit: 32767 databases per server

So, maximum storage per ASE server is over one million terabytes (32TB x
32767).
Up to ASE 12.5.x the maximum device size is 32GB (provided
that the OS knows how to handle large [>2GB] files) because
of the way the device number is encoded in the sysdevices
table (i.e. only 24 bits are available to describe the file
itself).

In ASE 15 this limit has been lifted.


ASE-15 device and database limits per server are as follow:

- device size limit: 4 terabytes per device
- server limit: 2 billion logical devices per server
- database size limit: 32 terabytes per database
- server limit: 32767 databases per server

So, maximum storage per ASE server is over one million terabytes (32TB x
32767).

Monday, January 24, 2011

dump database three phases

The dump database command makes a copy of the entire
database, including both the data and the transaction log.
dump database does not truncate the log.
dump database allows dynamic dumps. Users can continue to
make changes to the database while the dump takes place.
This makes it convenient to back up databases on a regular
basis.
dump database executes in three phases. A progress message
informs you when each phase completes. When the dump is
finished, it reflects all changes that were made during its
execution, except for those initiated during phase 3."

Phase 1
* Phase 1 is the DBPAGES phase
* The Backup Server scans and dumps all the allocated
pages (both data and log pages) for the given database,
without checking to see whether any of the pages were
updated while this phase is going on.

Phase 2
* Phase 2 is the FLUSHPAGES phase:
* All the data pages that were modified during but not
logged in phase 1 (for example, a fast bcp) are dumped.
* The dump instant is the end of this phase. Recovery
restores the database to the state after phase 2.

Phase 3
* Phase 3 is the SCANLOGPAGES phase:
* The log pages are dumped again to capture
up-to-the-minute changes.
* dump transaction has only one phase: the SCANLOGPAGES
phase.
The dump database command makes a copy of the entire
database, including both the data and the transaction log.
dump database does not truncate the log.
dump database allows dynamic dumps. Users can continue to
make changes to the database while the dump takes place.
This makes it convenient to back up databases on a regular
basis.
dump database executes in three phases. A progress message
informs you when each phase completes. When the dump is
finished, it reflects all changes that were made during its
execution, except for those initiated during phase 3."

Phase 1
* Phase 1 is the DBPAGES phase
* The Backup Server scans and dumps all the allocated
pages (both data and log pages) for the given database,
without checking to see whether any of the pages were
updated while this phase is going on.

Phase 2
* Phase 2 is the FLUSHPAGES phase:
* All the data pages that were modified during but not
logged in phase 1 (for example, a fast bcp) are dumped.
* The dump instant is the end of this phase. Recovery
restores the database to the state after phase 2.

Phase 3
* Phase 3 is the SCANLOGPAGES phase:
* The log pages are dumped again to capture
up-to-the-minute changes.
* dump transaction has only one phase: the SCANLOGPAGES
phase.

how to get host/port,host name,server name,and db name in syabse

select address_info as "host/port"
      ,host_name() as "hostname"
      ,@@servername as "servername"
      ,db_name() "current_dbname"
from master..syslisteners
select address_info as "host/port"
      ,host_name() as "hostname"
      ,@@servername as "servername"
      ,db_name() "current_dbname"
from master..syslisteners

Use of "with overrride" option in database creation


Suppose we have a device, test_dev and you wish to create a database
with data and log on it.

create database testdb1
 on test_dev = 100
 log on test_dev = 20
 with override

You now have distinct data and log segments on the same device.
You can dump this log as usual with dump tran.

The log is always on it's own segment (the "log" segment).
The problem with dumping the tran log comes when the log segment is mixed with any other
kind of segment on the same fragment
(yielding a sysusages segmap that is something other than "4")

Suppose we have a device, test_dev and you wish to create a database
with data and log on it.

create database testdb1
 on test_dev = 100
 log on test_dev = 20
 with override

You now have distinct data and log segments on the same device.
You can dump this log as usual with dump tran.

The log is always on it's own segment (the "log" segment).
The problem with dumping the tran log comes when the log segment is mixed with any other
kind of segment on the same fragment
(yielding a sysusages segmap that is something other than "4")

Wednesday, January 19, 2011

dsync,direct io

The directio and dsync parameters are mutually exclusive. If a device has dsync set to “true,” you cannot set
directio to “true” for this device. To enable directio for a device, you must first reset dsync to “false.”
Direct I/O is always the preferred way.
dsync only applies to operating system files (meaning that it has no effect on "raw" devices used as Sybase disk devices)
The directio and dsync parameters are mutually exclusive. If a device has dsync set to “true,” you cannot set
directio to “true” for this device. To enable directio for a device, you must first reset dsync to “false.”
Direct I/O is always the preferred way.
dsync only applies to operating system files (meaning that it has no effect on "raw" devices used as Sybase disk devices)