ago 222011
 

Odeio mitos. Esta é a razão pela qual escrevi este artigo para a revista SQL Magazine, edição 90, atualmente nas bancas.

O que é o Sybase?

Em primeiro lugar, vamos passar a nos referir ao SGBD como Sybase Adaptive Server Enterprise, ou Sybase ASE, para não confundir com a empresa Sybase. Assim como o Oracle Database é o principal produto da empresa Oracle, algumas vezes o criador é confundido com a criatura.

A maioria dos DBAs que conheço acham que o Sybase ASE é um produto velho, esquecido pela própria companhia que o produz. Fazendo uma breve pesquisa para este artigo, me deparei com três posturas: um DBA Oracle demonstrou que tinha até certa raiva do Sybase, dizendo que não sabe por que ele ainda existe. Um outro DBA SQL Server, quando eu comentei sobre um livro de Sybase ASE que eu tinha comprado, me disse que não sabia que existiam livros deste SGBD. E por último, um gestor técnico da área me perguntou se para um cargo de DBA Sybase ASE poderia utilizar um DBA SQL Server, já que são produtos similares.

Duas coisas que, na minha opinião, que não tem lugar no mercado de TI são mistérios e emoções, e como estas respostas estão cheias de ambos, foi esta situação que me motivou a escrever este artigo.

A verdade é que o Sybase ASE é um bom produto, com funcionalidades de causar inveja a qualquer DBA, e a Sybase possui outros produtos excelentes. A propósito, o termo Adaptive do produto é utilizado porque este é o SGBD da Sybase voltado ao uso geral, com razoável adaptabilidade a diversos tipos de aplicações. Já outros SGBD da Sybase são direcionados a propósitos específicos: como exemplos, o Sybase IQ é um RDBMS orientado a colunas, feito especialmente para Data Warehouses gigantes, e o SQL Anywhere tem como alvo os bancos de dados distribuídos.

mai 202011
 

A principal ferramenta para visualização de dados de desempenho no Sybase ASE é a system stored procedure sp_sysmon.

Ela tem muitas formas de uso, e uma delas é coletar dados por um determinado período e retorna-los ao DBA.

Dados equivalentes aos coletados pelo sp_sysmon também são utilizados pelo Monitor Server, e armazenados no Historical Server para análise futura.

No exemplo abaixo, eu solicito que o sp_sysmon colete informações por um período de 2 minutos, mas apenas informações sobre I/O. Se neste exemplo eu não especificar a categoria de informações, todas serão retornadas.

A categoria de I/O nos permite encontrar gargalos no sistema relativos a algum device específico.

A documentação do Sybase ASE 15.5 possui um livro inteiro dedicado à utilização e interpretação dos dados emitidos pelo sp_sysmon.

http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc00842.1502/pdf/spsysmon.pdf

[sybase@CentOS ~]$ isql -SCENTOS -Usa -PNerv2011
1> sp_sysmon "00:02:00", diskio
2> go
===============================================================================
Sybase Adaptive Server Enterprise System Performance Report
===============================================================================
Server Version:        Adaptive Server Enterprise/15.5/EBF 18159 SMP ESD#2/P/Li
nux Intel/Linux 2.6.9-55.ELsmp i686/asear155/2514/32-bit
/FBO/Wed Aug 25 08:21:19 2010
Run Date:              May 20, 2011
Sampling Started at:   May 20, 2011 09:55:52
Sampling Ended at:     May 20, 2011 09:57:52
Sample Interval:       00:02:00
Sample Mode:           No Clear
Counters Last Cleared: May 20, 2011 09:53:20
Server Name:           CENTOS
===============================================================================
===============================================================================
Disk I/O Management
-------------------
Max Outstanding I/Os            per sec      per xact       count  % of total
-------------------------  ------------  ------------  ----------  ----------
Server                            n/a           n/a           0       n/a
Engine 0                          n/a           n/a         105       n/a
I/Os Delayed by
Disk I/O Structures               n/a           n/a           0       n/a
Server Config Limit               n/a           n/a           0       n/a
Engine Config Limit               n/a           n/a           0       n/a
Operating System Limit            n/a           n/a           0       n/a
Total Requested Disk I/Os           1.5          10.9         185
Completed Disk I/O's
Asynchronous I/O's
Engine 0                        1.5          10.9         185     100.0 %
Synchronous I/O's
Total Completed I/Os            0.0           0.0           0       n/a
-------------------------  ------------  ------------  ----------
Total Completed I/Os                1.5          10.9         185
Device Activity Detail
----------------------
Device:
/opt/sybase/data/dbccdb.dat
dbccdb                        per sec      per xact       count  % of total
-------------------------  ------------  ------------  ----------  ----------
Total I/Os                          0.0           0.0           0       n/a
-------------------------  ------------  ------------  ----------  ----------
Total I/Os                          0.0           0.0           0       0.0 %
-----------------------------------------------------------------------------
Device:
/opt/sybase/data/dbccdb_log.dat
dbccdb_log                    per sec      per xact       count  % of total
-------------------------  ------------  ------------  ----------  ----------
Total I/Os                          0.0           0.0           0       n/a
-------------------------  ------------  ------------  ----------  ----------
Total I/Os                          0.0           0.0           0       0.0 %
-----------------------------------------------------------------------------
Device:
/opt/sybase/data/master.dat
master                        per sec      per xact       count  % of total
-------------------------  ------------  ------------  ----------  ----------
Reads
APF                             0.0           0.0           0       0.0 %
Non-APF                         0.0           0.1           1       0.8 %
Writes                            1.1           7.5         127      99.2 %
-------------------------  ------------  ------------  ----------  ----------
Total I/Os                          1.1           7.5         128      69.2 %
Mirror Semaphore Granted            1.1           7.5         128     100.0 %
Mirror Semaphore Waited             0.0           0.0           0       0.0 %
-----------------------------------------------------------------------------
Device:
/opt/sybase/data/sybmgmtdb.dat
sybmgmtdev                    per sec      per xact       count  % of total
-------------------------  ------------  ------------  ----------  ----------
Total I/Os                          0.0           0.0           0       n/a
-------------------------  ------------  ------------  ----------  ----------
Total I/Os                          0.0           0.0           0       0.0 %
-----------------------------------------------------------------------------
Device:
/opt/sybase/data/sybsysdb.dat
systemdbdev                   per sec      per xact       count  % of total
-------------------------  ------------  ------------  ----------  ----------
Total I/Os                          0.0           0.0           0       n/a
-------------------------  ------------  ------------  ----------  ----------
Total I/Os                          0.0           0.0           0       0.0 %
-----------------------------------------------------------------------------
Device:
/opt/sybase/data/sysprocs.dat
sysprocsdev                   per sec      per xact       count  % of total
-------------------------  ------------  ------------  ----------  ----------
Reads
APF                             0.3           1.8          30      56.6 %
Non-APF                         0.2           1.4          23      43.4 %
Writes                            0.0           0.0           0       0.0 %
-------------------------  ------------  ------------  ----------  ----------
Total I/Os                          0.4           3.1          53      28.6 %
Mirror Semaphore Granted            0.4           3.1          53     100.0 %
Mirror Semaphore Waited             0.0           0.0           0       0.0 %
-----------------------------------------------------------------------------
Device:
/opt/sybase/data/tempdbdev.dat
tempdbdev                     per sec      per xact       count  % of total
-------------------------  ------------  ------------  ----------  ----------
Reads
APF                             0.0           0.0           0       0.0 %
Non-APF                         0.0           0.1           2      50.0 %
Writes                            0.0           0.1           2      50.0 %
-------------------------  ------------  ------------  ----------  ----------
Total I/Os                          0.0           0.2           4       2.2 %
Mirror Semaphore Granted            0.0           0.2           4     100.0 %
Mirror Semaphore Waited             0.0           0.0           0       0.0 %
-----------------------------------------------------------------------------
(return status = 0)
1>
mai 152011
 

O Sybase ASE possui uma funcionalidade interna para espelhamento de devices, que são seus repositórios de dados.

Utilizando um pouco de criatividade, podemos utilizar esta funcionalidade para mover um device para outro filesystem, sem absolutamente nenhuma indisponibilidade. Basta executar o espelhamento para o filesystem desejado (com o comando disk mirror), e depois retirar o espelhamento (com o comando disk unmirror), mas mantendo o espelho ativo, e não o arquivo original (opção side = ‘primary’).

Como os devices do Sybase ASE podem ser discos brutos, esta técnica permite até a troca de discos rígidos onde estão os bancos de dados, sem indisponibilidade.

No exemplo abaixo, fiz este teste com o banco de dados master, o mais crítico do Sybase ASE.

[sybase@CentOS ~]$ isql -SCENTOS -Usa -PNerv2011 -w999
1> sp_helpdevice
2> go
device_name            physical_name                                                  description                                                                                                                                                                                                        status       cntrltype          vdevno       vpn_low        vpn_high
---------------------- -------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------ ------------------ ------------ -------------- ----------------
dbccdb                 /opt/sybase/data/dbccdb.dat                                    file system device, special, dsync on, directio off, physical disk, 100.00 MB, Free: 0.00 MB                                                                                                                        16386               0               5             0           51199
dbccdb_log             /opt/sybase/data/dbccdb_log.dat                                file system device, special, dsync on, directio off, physical disk, 100.00 MB, Free: 0.00 MB                                                                                                                        16386               0               6             0           51199
master                 /opt/sybase/data/master.dat                                    file system device, special, dsync on, directio off, default disk, physical disk, 60.00 MB, Free: 3.00 MB                                                                                                               3               0               0             0           30719
sybmgmtdev             /opt/sybase/data/sybmgmtdb.dat                                 file system device, special, dsync off, directio on, physical disk, 75.00 MB, Free: 0.00 MB                                                                                                                             2               0               4             0           38399
sysprocsdev            /opt/sybase/data/sysprocs.dat                                  file system device, special, dsync off, directio on, physical disk, 152.00 MB, Free: 0.00 MB                                                                                                                            2               0               1             0           77823
systemdbdev            /opt/sybase/data/sybsysdb.dat                                  file system device, special, dsync off, directio on, physical disk, 6.00 MB, Free: 0.00 MB                                                                                                                              2               0               2             0            3071
tapedump1              /dev/nst0                                                      unknown device type, disk, dump device                                                                                                                                                                                 16               2               0             0           20000
tapedump2              /dev/nst1                                                      unknown device type, tape,        625 MB, dump device                                                                                                                                                                  16               3               0             0           20000
tempdbdev              /opt/sybase/data/tempdbdev.dat                                 file system device, special, dsync off, directio on, physical disk, 100.00 MB, Free: 0.00 MB                                                                                                                            2               0               3             0           51199
(9 rows affected)
(return status = 0)
1> disk mirror name = master, mirror = '/home/sybase/master.dat'
2> go
Creating the physical file for the mirror...
00:00:00000:00023:2011/05/15 14:06:34.69 kernel  mirror for virtual device 0 started using asynchronous (with DIRECTIO) I/O
Starting Dynamic Mirroring of 15360 pages for logical device 'master'.
512 pages mirrored...
1024 pages mirrored...
1536 pages mirrored...
2048 pages mirrored...
2560 pages mirrored...
3072 pages mirrored...
3584 pages mirrored...
4096 pages mirrored...
4608 pages mirrored...
5120 pages mirrored...
5632 pages mirrored...
6144 pages mirrored...
6656 pages mirrored...
7168 pages mirrored...
7680 pages mirrored...
8192 pages mirrored...
8704 pages mirrored...
9216 pages mirrored...
9728 pages mirrored...
10240 pages mirrored...
10752 pages mirrored...
11264 pages mirrored...
11776 pages mirrored...
12288 pages mirrored...
12800 pages mirrored...
13312 pages mirrored...
13824 pages mirrored...
14336 pages mirrored...
14592 pages mirrored...
The remaining 768 pages are currently unallocated and will be mirrored as they are allocated.
1> disk unmirror name = 'master', side = 'primary', mode = 'remove'
2> go
00:00:00000:00023:2011/05/15 14:07:31.44 kernel  Closing the primary device for virtual device master
00:00:00000:00023:2011/05/15 14:07:31.45 kernel  The new primary device is now /home/sybase/master.dat
1> sp_helpdevice
2> go
device_name            physical_name                                                  description                                                                                                                                                                                                        status       cntrltype          vdevno       vpn_low        vpn_high
---------------------- -------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------ ------------------ ------------ -------------- ----------------
dbccdb                 /opt/sybase/data/dbccdb.dat                                    file system device, special, dsync on, directio off, physical disk, 100.00 MB, Free: 0.00 MB                                                                                                                        16386               0               5             0           51199
dbccdb_log             /opt/sybase/data/dbccdb_log.dat                                file system device, special, dsync on, directio off, physical disk, 100.00 MB, Free: 0.00 MB                                                                                                                        16386               0               6             0           51199
master                 /home/sybase/master.dat                                        file system device, special, dsync on, directio off, default disk, physical disk, 60.00 MB, Free: 3.00 MB                                                                                                               3               0               0             0           30719
sybmgmtdev             /opt/sybase/data/sybmgmtdb.dat                                 file system device, special, dsync off, directio on, physical disk, 75.00 MB, Free: 0.00 MB                                                                                                                             2               0               4             0           38399
sysprocsdev            /opt/sybase/data/sysprocs.dat                                  file system device, special, dsync off, directio on, physical disk, 152.00 MB, Free: 0.00 MB                                                                                                                            2               0               1             0           77823
systemdbdev            /opt/sybase/data/sybsysdb.dat                                  file system device, special, dsync off, directio on, physical disk, 6.00 MB, Free: 0.00 MB                                                                                                                              2               0               2             0            3071
tapedump1              /dev/nst0                                                      unknown device type, disk, dump device                                                                                                                                                                                 16               2               0             0           20000
tapedump2              /dev/nst1                                                      unknown device type, tape,        625 MB, dump device                                                                                                                                                                  16               3               0             0           20000
tempdbdev              /opt/sybase/data/tempdbdev.dat                                 file system device, special, dsync off, directio on, physical disk, 100.00 MB, Free: 0.00 MB                                                                                                                            2               0               3             0           51199
(9 rows affected)
(return status = 0)
1>
abr 292011
 

O comando DBCC CHECKSTORAGE do Sybase ASE valida a alocação de páginas e sua consistência.

Todas as informações provenientes deste comando são armazenadas no banco de dados dbccdb, a partir do qual podem ser gerados relatórios de consistência, que podem ser utilizados também para planejamento da capacidade.

Entretanto, a configuração do dbccdb não é trivial. Além de criar um banco de dados, é necessário configurar parâmetros específicos para que o DBCC CHECKSTORAGE possa ser executado, e estes parâmetro diferem para cada banco de dados analisado.

Para ajudar com esta tarefa, existe a procedure sp_plan_dbccdb, que fornece qual o tamanho que o banco dbccdb terá que ter, além de quanta memória e processos devem ser configuradas para cada banco analisado.

No exemplo abaixo, eu crio o dbccdb com o tamanho recomendado, mas executo as configurações apenas para a execução do DBCC CHECKSTORAGE no banco de dados master.

[sybase@nerv00 ~]$ isql -SNERV00 -Usa -w999 -PNerv2011
1> dbcc checkstorage
2> go
Checking master: Logical pagesize is 2048 bytes
Msg 9964, Level 16, State 2:
Server 'NERV00', Line 1:
Database 'dbccdb' was not found. Use sp_helpdb to list the available databases.
1> sp_plan_dbccdb
2> go
Recommended size for dbccdb database is 22MB (data = 20MB, log = 2MB).
No suitable devices for dbccdb in master..sysdevices.
Recommended values for workspace size, cache size and process count are:
dbname scan ws text ws cache comp mem process count
master 192K 48K 640K 0K 1
tempdb 1280K 336K 1280K 0K 2
model 64K 48K 640K 0K 1
pubs2 80K 48K 640K 0K 1
sybsystemdb 96K 48K 1280K 0K 2
sybsystemprocs 1872K 480K 640K 0K 1
sybmgmtdb 928K 240K 640K 0K 1
pubs3 80K 48K 640K 0K 1
(return status = 0)
1> disk init name = "dbccdb_data", physname = "/opt/sybase/data/dbccdb_data.dat", size = "200M"
2> go
1> disk init name = "dbccdb_log", physname = "/opt/sybase/data/dbccdb_log.dat", size = "20M"
2> go
1> create database dbccdb on dbccdb_data = "200M" log on dbccdb_log = "20M"
2> go
CREATE DATABASE: allocating 102400 logical pages (200.0 megabytes) on disk 'dbccdb_data' (102400 logical pages requested).
CREATE DATABASE: allocating 10240 logical pages (20.0 megabytes) on disk 'dbccdb_log' (10240 logical pages requested).
Database 'dbccdb' is now online.
1> exit
[sybase@nerv00 ~]$ isql -SNERV00 -Usa -w999 -PNerv2011 -i/opt/sybase/ASE-15_0/scripts/installdbccdb
(return status = 0)
(1 row affected)
(1 row affected)
Msg 911, Level 11, State 2:
Server 'NERV00', Line 24:
Attempt to locate entry in sysdatabases for database 'dbccalt' by name failed - no entry found under that name. Make sure that name is entered properly.
Database option 'select into/bulkcopy/pllsort' turned ON for database 'dbccdb'.
Running CHECKPOINT on database 'dbccdb' for option 'select into/bulkcopy/pllsort' to take effect.
Creating dbcc_types table
Object name has been changed.
Warning: Changing an object or column name could break existing stored procedures, cached statements or other compiled objects.
Creating dbcc_config table
Object name has been changed.
Warning: Changing an object or column name could break existing stored procedures, cached statements or other compiled objects.
Creating dbcc_dev_info table
Object name has been changed.
Warning: Changing an object or column name could break existing stored procedures, cached statements or other compiled objects.
Creating dbcc_operation_log table
Object name has been changed.
Warning: Changing an object or column name could break existing stored procedures, cached statements or other compiled objects.
Creating dbcc_operation_results table
Object name has been changed.
Warning: Changing an object or column name could break existing stored procedures, cached statements or other compiled objects.
Creating dbcc_counters table
Object name has been changed.
Warning: Changing an object or column name could break existing stored procedures, cached statements or other compiled objects.
Creating dbcc_faults table
Object name has been changed.
Warning: Changing an object or column name could break existing stored procedures, cached statements or other compiled objects.
Creating dbcc_fault_params table
Object name has been changed.
Warning: Changing an object or column name could break existing stored procedures, cached statements or other compiled objects.
Creating dbcc_exclusions table
Inserting default exclusions into the dbcc_exclusions table
Object name has been changed.
Warning: Changing an object or column name could break existing stored procedures, cached statements or other compiled objects.
Creating dbcc_reco table
Object name has been changed.
Warning: Changing an object or column name could break existing stored procedures, cached statements or other compiled objects.
Creating dbcc_control table
Object name has been changed.
Warning: Changing an object or column name could break existing stored procedures, cached statements or other compiled objects.
Inserting type codes into dbcc_types table
Inserting recommendation codes into the dbcc_reco table.
Upgrading dbcc_operation_log schema
Upgrading dbcc_operation_results schema
Upgrading dbcc_faults schema
Upgrading dbcc_operation_results schema
Upgrading dbcc_operation_log schema
Upgrading dbcc_counters schema
Upgrading dbcc_faults schema
Upgrading default exclusion list
Upgrading dbcc_exclusions schema
Creating index on dbcc_types table
Creating index on dbcc_config table
Creating index on dbcc_dev_info table
Creating index on dbcc_operation_log table
Creating index on dbcc_operation_results table
Creating index on dbcc_counters table
Creating index on dbcc_faults table
Creating index on dbcc_fault_params table
Creating index on dbcc_exclusions table
Creating index on dbcc_reco table
Creating default workspaces
Configuring default workspaces
Installing sp_validatedb
Installing sp_getopid
Installing sp_dbcc_run_recommendations
Installing sp_dbcc_run_alterws
Installing sp_dbcc_run_createws
Installing sp_dbcc_run_configreport
Installing sp_dbcc_run_deletehistory
Installing sp_dbcc_run_deletedb
Installing sp_dbcc_run_evaluatedb
Installing sp_dbcc_run_updateconfig
Installing sp_dbcc_run_summaryreport
Installing sp_dbcc_run_runcheck
Installing sp_dbcc_run_statisticsreport
Installing sp_dbcc_run_faultreport
Installing sp_dbcc_run_differentialreport
Installing sp_dbcc_run_fullreport
Installing sp_dbcc_run_patch_finishtime
Installing sp_dbcc_run_exclusions
Installing dbcc stored procedures.
Installing sp_dbcc_recommendations
Installing sp_dbcc_patch_finishtime
Installing sp_dbcc_exclusions
Installing sp_dbcc_alterws
Installing sp_dbcc_createws
Installing sp_dbcc_configreport
Installing sp_dbcc_deletehistory
Installing sp_dbcc_deletedb
Installing sp_dbcc_evaluatedb
Installing sp_dbcc_updateconfig
Installing sp_dbcc_summaryreport
Installing sp_dbcc_runcheck
Installing sp_dbcc_statisticsreport
Installing sp_dbcc_faultreport
Installing sp_dbcc_differentialreport
Installing sp_dbcc_fullreport
Installing sp_dbcc_help_fault
Loading of dbccdb database is complete.
(return status = 0)
[sybase@nerv00 ~]$ isql -SNERV00 -Usa -w999 -PNerv2011
1> sp_cacheconfig "dbccdb_cache", "10M"
2> go
(return status = 0)
1> sp_poolconfig "dbccdb_cache", "2M", "16K"
2> go
(return status = 0)
1> sp_dbcc_createws dbccdb, "default", scan_master, scan, "192K"
2> go
(1 row affected)
Workspace scan_master of 192KB size has been created successfully in dbccdb database.
(return status = 0)
1> sp_dbcc_createws dbccdb, "default", text_master, text, "48K"
2> go
(1 row affected)
Workspace text_master of 48KB size has been created successfully in dbccdb database.
(return status = 0)
1> sp_dbcc_updateconfig master, "max worker processes", "1"
2> go
The value of the dbcc configuration parameter 'max worker processes' for database master has been updated.
(return status = 0)
1> sp_dbcc_updateconfig master, "dbcc named cache", "dbccdb_cache", "2M"
2> go
The value of the dbcc configuration parameter 'dbcc named cache' for database master has been updated.
(return status = 0)
1> sp_dbcc_updateconfig master, "scan workspace", "scan_master"
2> go
The value of the dbcc configuration parameter 'scan workspace' for database master has been updated.
(return status = 0)
1> sp_dbcc_updateconfig master, "text workspace", "text_master"
2> go
The value of the dbcc configuration parameter 'text workspace' for database master has been updated.
(return status = 0)
1> dbcc checkstorage (master)
2> go
Checking master: Logical pagesize is 2048 bytes
(return status = 0)
DBCC CHECKSTORAGE for database 'master' sequence 1 completed at Apr 29 2011 4:01PM. 0 faults and 0 suspect conditions were located. 0 checks were aborted. You should investigate the recorded faults, and plan a course of action that will correct them.
1>
abr 282011
 

Um Device no Sybase pode ser aumentado, mas não reduzido.

[sybase@nerv00 ~]$ isql -SNERV00 -Usa -w999 -PNerv2011
1> sp_helpdevice users_disk_01
2> GO
device_name physical_name description status cntrltype vdevno vpn_low vpn_high
-------------------------- -------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------ ------------------ ------------ -------------- ----------------
users_disk_01 /opt/sybase/data/users_disk_01.dat file system device, special, dsync off, directio on, default disk, physical disk, 1024.00 MB, Free: 1020.00 MB 3 0 5 0 524287
(1 row affected)
dbname size allocated vstart lstart
------------ -------------------------- -------------------------------------- ------------ ------------
pubs3 4.00 MB Apr 28 2011 4:35PM 0 0
(1 row affected)
(return status = 0)
1> disk resize name = "users_disk_01", size = "1G"
2> GO
1> sp_helpdevice users_disk_01
2> GO
device_name physical_name description status cntrltype vdevno vpn_low vpn_high
-------------------------- -------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------ ------------------ ------------ -------------- ----------------
users_disk_01 /opt/sybase/data/users_disk_01.dat file system device, special, dsync off, directio on, default disk, physical disk, 2048.00 MB, Free: 2044.00 MB 3 0 5 0 1048575
(1 row affected)
dbname size allocated vstart lstart
------------ -------------------------- -------------------------------------- ------------ ------------
pubs3 4.00 MB Apr 28 2011 4:35PM 0 0
(1 row affected)
(return status = 0)
1>
abr 282011
 

Nesta manutenção, eu adiciono um Device no formato de um arquivo no sistema operacional, com o tamanho de 1GB. Em seguida, torno este Device o padrão para novos bancos de dados, para poder criar o banco de exemplo pubs3.

Veja que no exemplo abaixo eu já crio o Device com a opção de Direct I/O, para não utilizar o Cache do Filesystem do sistema operacional.

[sybase@nerv00 ~]$ isql -SNERV00 -Usa -w999 -PNerv2011
1> disk init name = "users_disk_01", physname = "/opt/sybase/data/users_disk_01.dat", size = "1G", directio = true
2> GO
1>
2> select * from sysdevices
3> GO
low high status cntrltype name phyname mirrorname vdevno crdate resizedate status2
----------- ----------- ------ --------- ------------------------------------------------------------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ----------- -------------------------- -------------------------- -----------
0 15359 3 0 master /opt/sybase/data/master.dat NULL 0 Apr 25 2011 2:41PM NULL 0
0 20000 16 2 tapedump1 /dev/nst0 NULL 0 Apr 25 2011 2:41PM NULL 0
0 20000 16 3 tapedump2 /dev/nst1 NULL 0 Apr 25 2011 2:41PM NULL 0
0 77823 2 0 sysprocsdev /opt/sybase/data/sysprocs.dat NULL 1 Apr 25 2011 2:42PM NULL 1
0 1535 2 0 systemdbdev /opt/sybase/data/sybsysdb.dat NULL 2 Apr 25 2011 2:42PM NULL 1
0 51199 2 0 tempdbdev /opt/sybase/data/tempdbdev.dat NULL 3 Apr 25 2011 2:42PM NULL 1
0 38399 2 0 sybmgmtdev /opt/sybase/data/sybmgmtdb.dat NULL 4 Apr 25 2011 2:43PM NULL 1
0 524287 2 0 users_disk_01 /opt/sybase/data/users_disk_01.dat NULL 5 Apr 28 2011 4:33PM NULL 1
(8 rows affected)
1> sp_diskdefault users_disk_01, defaulton
2> GO
(return status = 0)
1> sp_diskdefault master, defaultoff
2> GO
(return status = 0)
1> exit
[sybase@nerv00 ~]$ cd /opt/sybase/ASE-15_0/scripts/
[sybase@nerv00 scripts]$ isql -Usa -PNerv2011 -SNERV00 -iinstallpubs3
Creating the "pubs3" database
CREATE DATABASE: allocating 2048 logical pages (4.0 megabytes) on disk
'users_disk_01' (2048 logical pages requested).
Database 'pubs3' is now online.
Database option 'trunc log on chkpt' turned ON for database 'pubs3'.
Running CHECKPOINT on database 'pubs3' for option 'trunc log on chkpt' to take
effect.
(return status = 0)
Type added.
(return status = 0)
Type added.
(return status = 0)
Default bound to column.
(return status = 0)
Default bound to column.
(return status = 0)
Default bound to column.
(return status = 0)
Rule bound to table column.
(return status = 0)
Rule bound to table column.
(return status = 0)
Rule bound to table column.
(return status = 0)
(return status = 0)
[sybase@nerv00 scripts]$
abr 282011
 

Várias ferramentas do Sybase ASE podem ser utiliadas para se avaliar o custo e o plano de execução de um comando SQL.

SET STATISTICS TIME ON : mostra o tempo necessário para executar o comando.

SET STATISTICS SUBQUERYCACHE ON: Exibe informações sobre Cache Hits para subqueries.

SET STATISTICS IO ON: exibe informações sobre leituras físicas e lógicas, e gravações.

SET SHOWPLAN ON: exibe o plano de execução em si.

No exemplo abaixo, eu utilizo todas estas opções para analiar estatísticas do mesmo SQL. 

[sybase@nerv00 ~]$ isql -SNERV00 -Usa -w999 -PNerv2011
1> USE pubs2
2> GO
1> sp_tables
2> GO
table_qualifier table_owner table_name table_type remarks
------------------------------------------------------------ ------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------ -----------
pubs2 dbo sysalternates SYSTEM TABLE NULL
pubs2 dbo sysattributes SYSTEM TABLE NULL
pubs2 dbo syscolumns SYSTEM TABLE NULL
pubs2 dbo syscomments SYSTEM TABLE NULL
pubs2 dbo sysconstraints SYSTEM TABLE NULL
pubs2 dbo sysdepends SYSTEM TABLE NULL
pubs2 dbo sysencryptkeys SYSTEM TABLE NULL
pubs2 dbo sysgams SYSTEM TABLE NULL
pubs2 dbo sysindexes SYSTEM TABLE NULL
pubs2 dbo sysjars SYSTEM TABLE NULL
pubs2 dbo syskeys SYSTEM TABLE NULL
pubs2 dbo syslogs SYSTEM TABLE NULL
pubs2 dbo sysobjects SYSTEM TABLE NULL
pubs2 dbo syspartitionkeys SYSTEM TABLE NULL
pubs2 dbo syspartitions SYSTEM TABLE NULL
pubs2 dbo sysprocedures SYSTEM TABLE NULL
pubs2 dbo sysprotects SYSTEM TABLE NULL
pubs2 dbo sysqueryplans SYSTEM TABLE NULL
pubs2 dbo sysreferences SYSTEM TABLE NULL
pubs2 dbo sysroles SYSTEM TABLE NULL
pubs2 dbo syssegments SYSTEM TABLE NULL
pubs2 dbo sysslices SYSTEM TABLE NULL
pubs2 dbo sysstatistics SYSTEM TABLE NULL
pubs2 dbo systabstats SYSTEM TABLE NULL
pubs2 dbo systhresholds SYSTEM TABLE NULL
pubs2 dbo systypes SYSTEM TABLE NULL
pubs2 dbo sysusermessages SYSTEM TABLE NULL
pubs2 dbo sysusers SYSTEM TABLE NULL
pubs2 dbo sysxtypes SYSTEM TABLE NULL
pubs2 dbo au_pix TABLE NULL
pubs2 dbo authors TABLE NULL
pubs2 dbo blurbs TABLE NULL
pubs2 dbo discounts TABLE NULL
pubs2 dbo publishers TABLE NULL
pubs2 dbo roysched TABLE NULL
pubs2 dbo sales TABLE NULL
pubs2 dbo salesdetail TABLE NULL
pubs2 dbo stores TABLE NULL
pubs2 dbo titleauthor TABLE NULL
pubs2 dbo titles TABLE NULL
pubs2 dbo sysquerymetrics VIEW NULL
pubs2 dbo titleview VIEW NULL
(42 rows affected)
(return status = 0)
1> SET STATISTICS TIME ON
2> GO
Execution Time 0.
Adaptive Server cpu time: 0 ms. Adaptive Server elapsed time: 0 ms.
1> SET STATISTICS SUBQUERYCACHE ON
2> GO
Parse and Compile Time 0.
Adaptive Server cpu time: 0 ms.
Execution Time 0.
Adaptive Server cpu time: 0 ms. Adaptive Server elapsed time: 0 ms.
1> SET STATISTICS IO ON
2> GO
Parse and Compile Time 0.
Adaptive Server cpu time: 0 ms.
Total writes for this command: 0
Execution Time 0.
Adaptive Server cpu time: 0 ms. Adaptive Server elapsed time: 0 ms.
1> SET SHOWPLAN ON
2> GO
Parse and Compile Time 0.
Adaptive Server cpu time: 0 ms.
Total writes for this command: 0
Execution Time 0.
Adaptive Server cpu time: 0 ms. Adaptive Server elapsed time: 0 ms.
1> SELECT COUNT(*) FROM titles
2> GO
QUERY PLAN FOR STATEMENT 1 (at line 1).
STEP 1
The type of query is SELECT.
2 operator(s) under root
|ROOT:EMIT Operator (VA = 2)
|
| |SCALAR AGGREGATE Operator (VA = 1)
| | Evaluate Ungrouped COUNT AGGREGATE.
| |
| | |SCAN Operator (VA = 0)
| | | FROM TABLE
| | | titles
| | | Index : titleind
| | | Forward Scan.
| | | Positioning at index start.
| | | Index contains all needed columns. Base table will not be read.
| | | Using I/O Size 2 Kbytes for index leaf pages.
| | | With LRU Buffer Replacement Strategy for index leaf pages.
Parse and Compile Time 0.
Adaptive Server cpu time: 0 ms.
-----------
18
Table: titles scan count 1, logical reads: (regular=1 apf=0 total=1), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Total writes for this command: 0
Execution Time 0.
Adaptive Server cpu time: 0 ms. Adaptive Server elapsed time: 10 ms.
(1 row affected)
1>
abr 282011
 

Além de ser trivial trabalhar com Raw Devices no Sybase ASE (pode-se controlar o espaço utilizado no dispositivo, e até alocar vários bancos de dados no mesmo Raw Device), é possível fazer um espelhamento de um Device em outro Device já existente, eliminando assim a necessidade de um RAID, enquanto continua-se com o ganho obtido pelo acesso direto ao disco rígido.

Este tipo de espelhamento pode ser feito também com Devices baseados em arquivos.

[sybase@Sybase01 ~]$ isql -Usa -PNerv2011 -SSYBASE01 -w 150
1> disk mirror name = "IMDB", mirror = "IMDB_mirror"
2> go
Msg 5155, Level 16, State 1:
Server 'SYBASE01', Line 1:
The command 'DISK MIRROR' cannot be executed since disk mirroring has been disabled. In order to enable disk mirroring, use: sp_configure 'disable
disk mirroring',0 and restart the server.
1> sp_configure 'disable disk mirroring',0
2> go
Parameter Name Default Memory Used
Config Value Run Value Unit
Type
------------------------------------------------------------ ---------------------------------------- ----------------------
---------------------------------------- ---------------------------------------- ----------------------------------------
----------------------------------------
disable disk mirroring 1 0
0 1 switch
static
(1 row affected)
Configuration option changed. Since the option is static, Adaptive Server must be rebooted in order for the change to take effect.
Changing the value of 'disable disk mirroring' does not increase the amount of memory Adaptive Server uses.
(return status = 0)
1> shutdown
2> go
Server SHUTDOWN by request.
ASE is terminating this process.
CT-LIBRARY error:
ct_results(): network packet layer: internal net library error: Net-Library operation terminated due to disconnect
[sybase@Sybase01 ~]$ /opt/sybase/ASE-15_0/install/startserver -f /opt/sybase/ASE-15_0/install/RUN_SYBASE01
[sybase@Sybase01 ~]$ 00:00:00000:00000:2011/03/23 14:22:00.49 kernel SySAM: Using licenses from: /opt/sybase/SYSAM-2_0/licenses/SYBASE_ASE_DE.lic
00:00:00000:00000:2011/03/23 14:22:00.50 kernel SySAM: Checked out license for 1 ASE_CORE (2013.1231/permanent/0A1F EC50 7138 C903).
00:00:00000:00000:2011/03/23 14:22:00.50 kernel This product is licensed to: ASE Developer Edition - For Development and Test use only
00:00:00000:00000:2011/03/23 14:22:00.50 kernel Checked out license ASE_CORE
00:00:00000:00000:2011/03/23 14:22:00.50 kernel Adaptive Server Enterprise (Developer Edition)
00:00:00000:00000:2011/03/23 14:22:00.51 kernel Using config area from primary master device.
00:00:00000:00000:2011/03/23 14:22:00.52 kernel Could not allocate memory using Huge Pages. Allocated using regular pages. For better performance, reboot the server after configuring enough Huge Pages.
00:00:00000:00000:2011/03/23 14:22:00.52 kernel Internal run-time model set for Linux - Native
00:00:00000:00000:2011/03/23 14:22:00.52 kernel Using 1024 file descriptors.
00:00:00000:00000:2011/03/23 14:22:00.52 kernel Adaptive Server Enterprise/15.5/EBF 18159 SMP ESD#2/P/Linux Intel/Linux 2.6.9-55.ELsmp i686/asear155/2514/32-bit/FBO/Wed Aug 25 08:21:19 2010
00:00:00000:00000:2011/03/23 14:22:00.52 kernel Confidential property of Sybase, Inc.
00:00:00000:00000:2011/03/23 14:22:00.53 kernel Copyright 1987, 2010
00:00:00000:00000:2011/03/23 14:22:00.53 kernel Sybase, Inc. All rights reserved.
00:00:00000:00000:2011/03/23 14:22:00.53 kernel Unpublished rights reserved under U.S. copyright laws.
00:00:00000:00000:2011/03/23 14:22:00.53 kernel
00:00:00000:00000:2011/03/23 14:22:00.53 kernel This software contains confidential and trade secret information of Sybase,
00:00:00000:00000:2011/03/23 14:22:00.53 kernel Inc. Use, duplication or disclosure of the software and documentation by
00:00:00000:00000:2011/03/23 14:22:00.53 kernel the U.S. Government is subject to restrictions set forth in a license
00:00:00000:00000:2011/03/23 14:22:00.54 kernel agreement between the Government and Sybase, Inc. or other written
00:00:00000:00000:2011/03/23 14:22:00.54 kernel agreement specifying the Government's rights to use the software and any
00:00:00000:00000:2011/03/23 14:22:00.54 kernel applicable FAR provisions, for example, FAR 52.227-19.
00:00:00000:00000:2011/03/23 14:22:00.54 kernel Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
00:00:00000:00000:2011/03/23 14:22:00.54 kernel Using /opt/sybase as the 'SYBASE' environment variable, found during startup.
00:00:00000:00000:2011/03/23 14:22:00.55 kernel Using OCS-15_0 as the 'SYBASE_OCS' environment variable, found during startup.
00:00:00000:00000:2011/03/23 14:22:00.55 kernel Using ASE-15_0 as the 'SYBASE_ASE' environment variable, found during startup.
00:00:00000:00000:2011/03/23 14:22:00.55 kernel ASE booted on host 'Sybase01.localdomain' running Linux release 2.6.18-194.32.1.el5 version #1 SMP Wed Jan 5 17:53:09 EST 2011.
00:00:00000:00000:2011/03/23 14:22:00.55 kernel Using '/opt/sybase/ASE-15_0/SYBASE01.cfg' for configuration information.
00:00:00000:00000:2011/03/23 14:22:00.55 kernel Logging ASE messages in file '/opt/sybase/ASE-15_0/install/SYBASE01.log'.
00:00:00000:00000:2011/03/23 14:22:00.55 kernel Platform TCP network support seems IPv6-aware, IPv4/IPv6 are both enabled.
00:00:00000:00000:2011/03/23 14:22:00.55 kernel ASE booted with TCP_NODELAY enabled.
00:00:00000:00000:2011/03/23 14:22:00.57 kernel SSL Plus v5.2.2 security modules loaded successfully.
00:00:00000:00000:2011/03/23 14:22:00.57 kernel Network and device connection limit is 1009.
00:00:00000:00000:2011/03/23 14:22:00.57 kernel ASE - Dynamic Pluggable Component Interface is disabled
00:00:00000:00000:2011/03/23 14:22:00.75 server Number of blocks left for proc headers: 51152.
00:00:00000:00000:2011/03/23 14:22:00.84 server Proc header memory allocated 10230 pages for each per engine cache
00:00:00000:00000:2011/03/23 14:22:00.84 kernel Enabling Linux Native Kernel asynchronous disk I/O strategy.
00:00:00000:00000:2011/03/23 14:22:00.85 kernel Initializing virtual device 0, '/opt/sybase/data/master.dat' with dsync 'off'.
00:00:00000:00000:2011/03/23 14:22:00.85 kernel Virtual device 0 started using asynchronous (with DIRECTIO) i/o.
00:00:00000:00000:2011/03/23 14:22:00.85 server Loaded default Unilib conversion handle.
00:00:00000:00000:2011/03/23 14:22:00.86 kernel Either the config parameter 'use security services' is set to 0, or ASE does not support use of external security mechanisms on this platform. The Security Control Layer will not be initialized. No external security mechanisms will be supported.
00:00:00000:00000:2011/03/23 14:22:00.86 kernel Unix interval timer enabled for sysclk interrupts.
00:00:00000:00000:2011/03/23 14:22:00.86 kernel libsybibmmq - Sybase IBM MQ interface/15.5/EBF 18159 SMP ESD#2/P/Linux Intel/Linux 2.6.9-55.ELsmp i686/asear155/2514/32-bit/OPT/Wed Aug 25 05:46:01 2010
00:00:00000:00000:2011/03/23 14:22:00.86 kernel Confidential property of Sybase, Inc.
Copyright 1987, 2010
Sybase, Inc. All rights reserved.
Unpublished rights reserved under U.S. copyright laws.
This software contains confidential and trade secret information of Sybase,
Inc. Use, duplication or disclosure of the software and documentation by
the U.S. Government is subject to restrictions set forth in a license
agreement between the Government and Sybase, Inc. or other written
agreemen
00:00:00000:00000:2011/03/23 14:22:00.87 kernel Loaded encryption provider CSI-2.6.3M2-linux-2010/07/07 08:00:38 PDT-sybcsi_openssl-OpenSSL 0.9.8l 5 Nov 2009.
00:00:00000:00000:2011/03/23 14:22:00.87 kernel Begin processing to generate RSA keypair.
00:00:00000:00000:2011/03/23 14:22:00.93 kernel Completed processing to generate RSA keypair.
00:00:00000:00000:2011/03/23 14:22:00.94 kernel Encryption provider initialization succeeded on engine 0.
00:00:00000:00000:2011/03/23 14:22:00.94 kernel engine 0, os pid 2835 online
00:00:00000:00000:2011/03/23 14:22:00.94 server No active traceflags
00:00:00000:00001:2011/03/23 14:22:00.94 kernel libomni1 - Component Integration Services: using 'Sybase Client-Library/15.5/P-EBF18132 ESD #6/DRV.15.5.1/Linux Intel/Linux 2.6.9-55.ELsmp x86_64 Native Threads/BUILD1550-008/OPT/Mon Jul 26 21:02:32 2010'
00:00:00000:00001:2011/03/23 14:22:00.95 server Size of the 8K memory pool: 8192 Kb
00:00:00000:00001:2011/03/23 14:22:00.96 server Size of the 4K memory pool: 73728 Kb
Memory allocated for the default data cache cachelet 1: 81920 Kb
00:00:00000:00001:2011/03/23 14:22:00.98 server Size of the 4K memory pool: 81920 Kb
Memory allocated for the tempdb_cache cachelet 1: 81920 Kb
00:00:00000:00001:2011/03/23 14:22:00.98 server Opening Master Database ...
00:00:00000:00001:2011/03/23 14:22:01.02 server Loading ASE's default sort order and character set
00:00:00000:00001:2011/03/23 14:22:01.03 server Recovering database 'master'.
00:00:00000:00001:2011/03/23 14:22:01.03 server Started estimating recovery log boundaries for database 'master'.
00:00:00000:00001:2011/03/23 14:22:01.04 server Database 'master', checkpoint=(3788, 27), first=(3788, 27), last=(3788, 27).
00:00:00000:00001:2011/03/23 14:22:01.04 server Completed estimating recovery log boundaries for database 'master'.
00:00:00000:00001:2011/03/23 14:22:01.04 server Started ANALYSIS pass for database 'master'.
00:00:00000:00001:2011/03/23 14:22:01.04 server Completed ANALYSIS pass for database 'master'.
00:00:00000:00001:2011/03/23 14:22:01.04 server Log contains all committed transactions until 2011/03/23 14:21:52.01 for database master.
00:00:00000:00001:2011/03/23 14:22:01.04 server Started REDO pass for database 'master'. The total number of log records to process is 1.
00:00:00000:00001:2011/03/23 14:22:01.05 server Completed REDO pass for database 'master'.
00:00:00000:00001:2011/03/23 14:22:01.11 server Timestamp for database 'master' is (0x0000, 0x0000f5e4).
00:00:00000:00001:2011/03/23 14:22:01.11 server Recovery of database 'master' will undo incomplete nested top actions.
00:00:00000:00001:2011/03/23 14:22:01.11 server Started recovery checkpoint for database 'master'.
00:00:00000:00001:2011/03/23 14:22:01.12 server Completed recovery checkpoint for database 'master'.
00:00:00000:00001:2011/03/23 14:22:01.12 server Started filling free space info for database 'master'.
00:00:00000:00001:2011/03/23 14:22:01.13 server Completed filling free space info for database 'master'.
00:00:00000:00001:2011/03/23 14:22:01.14 server Started cleaning up the default data cache for database 'master'.
00:00:00000:00001:2011/03/23 14:22:01.14 server Completed cleaning up the default data cache for database 'master'.
00:00:00000:00001:2011/03/23 14:22:01.16 server Checking external objects.
00:00:00000:00001:2011/03/23 14:22:01.22 server Database 'master' is now online.
00:00:00000:00001:2011/03/23 14:22:01.23 server The transaction log in the database 'master' will use I/O size of 8 Kb.
00:00:00000:00001:2011/03/23 14:22:01.25 server server name is 'SYBASE01'
00:00:00000:00001:2011/03/23 14:22:01.25 server Activating disk 'sysprocsdev' of size 155648 KB.
00:00:00000:00001:2011/03/23 14:22:01.25 kernel Initializing virtual device 1, '/opt/sybase/data/sysprocs.dat' with dsync 'off'.
00:00:00000:00001:2011/03/23 14:22:01.25 kernel Virtual device 1 started using asynchronous (with DIRECTIO) i/o.
00:00:00000:00001:2011/03/23 14:22:01.26 server Activating disk 'systemdbdev' of size 6144 KB.
00:00:00000:00001:2011/03/23 14:22:01.26 kernel Initializing virtual device 2, '/opt/sybase/data/sybsysdb.dat' with dsync 'off'.
00:00:00000:00001:2011/03/23 14:22:01.26 kernel Virtual device 2 started using asynchronous (with DIRECTIO) i/o.
00:00:00000:00001:2011/03/23 14:22:01.26 server Activating disk 'tempdbdev' of size 102400 KB.
00:00:00000:00001:2011/03/23 14:22:01.26 kernel Initializing virtual device 3, '/opt/sybase/data/tempdbdev.dat' with dsync 'off'.
00:00:00000:00001:2011/03/23 14:22:01.26 kernel Virtual device 3 started using asynchronous (with DIRECTIO) i/o.
00:00:00000:00001:2011/03/23 14:22:01.26 server Activating disk 'sybmgmtdev' of size 76800 KB.
00:00:00000:00001:2011/03/23 14:22:01.26 kernel Initializing virtual device 4, '/opt/sybase/data/sybmgmtdb.dat' with dsync 'off'.
00:00:00000:00001:2011/03/23 14:22:01.27 kernel Virtual device 4 started using asynchronous (with DIRECTIO) i/o.
00:00:00000:00001:2011/03/23 14:22:01.27 server Activating disk 'IMDB' of size 10240000 KB.
00:00:00000:00001:2011/03/23 14:22:01.27 kernel Initializing virtual device 5, '/dev/sdb1' with dsync 'off'.
00:00:00000:00001:2011/03/23 14:22:01.27 kernel Virtual device 5 started using asynchronous (with DIRECTIO) i/o.
00:00:00000:00001:2011/03/23 14:22:01.27 server Activating disk 'IMDB_mirror' of size 10240000 KB.
00:00:00000:00001:2011/03/23 14:22:01.27 kernel Initializing virtual device 6, '/dev/sdc1' with dsync 'off'.
00:00:00000:00001:2011/03/23 14:22:01.27 kernel Virtual device 6 started using asynchronous (with DIRECTIO) i/o.
00:00:00000:00001:2011/03/23 14:22:01.33 server Recovering database 'sybsystemdb'.
00:00:00000:00001:2011/03/23 14:22:01.33 server Started estimating recovery log boundaries for database 'sybsystemdb'.
00:00:00000:00001:2011/03/23 14:22:01.33 server Database 'sybsystemdb', checkpoint=(903, 14), first=(903, 14), last=(903, 14).
00:00:00000:00001:2011/03/23 14:22:01.33 server Completed estimating recovery log boundaries for database 'sybsystemdb'.
00:00:00000:00001:2011/03/23 14:22:01.34 server Started ANALYSIS pass for database 'sybsystemdb'.
00:00:00000:00001:2011/03/23 14:22:01.34 server Completed ANALYSIS pass for database 'sybsystemdb'.
00:00:00000:00001:2011/03/23 14:22:01.34 server Log contains all committed transactions until 2011/03/21 12:05:09.76 for database sybsystemdb.
00:00:00000:00001:2011/03/23 14:22:01.34 server Started REDO pass for database 'sybsystemdb'. The total number of log records to process is 1.
00:00:00000:00001:2011/03/23 14:22:01.34 server Completed REDO pass for database 'sybsystemdb'.
00:00:00000:00001:2011/03/23 14:22:01.36 server Timestamp for database 'sybsystemdb' is (0x0000, 0x000013b0).
00:00:00000:00001:2011/03/23 14:22:01.36 server Recovery of database 'sybsystemdb' will undo incomplete nested top actions.
00:00:00000:00001:2011/03/23 14:22:01.36 server Started recovery checkpoint for database 'sybsystemdb'.
00:00:00000:00001:2011/03/23 14:22:01.36 server Completed recovery checkpoint for database 'sybsystemdb'.
00:00:00000:00001:2011/03/23 14:22:01.37 server Started filling free space info for database 'sybsystemdb'.
00:00:00000:00001:2011/03/23 14:22:01.37 server Completed filling free space info for database 'sybsystemdb'.
00:00:00000:00001:2011/03/23 14:22:01.38 server Started cleaning up the default data cache for database 'sybsystemdb'.
00:00:00000:00001:2011/03/23 14:22:01.38 server Completed cleaning up the default data cache for database 'sybsystemdb'.
00:00:00000:00001:2011/03/23 14:22:01.38 server Boot Count: 11
00:00:00000:00001:2011/03/23 14:22:01.39 server Checking external objects.
00:00:00000:00001:2011/03/23 14:22:01.44 server The transaction log in the database 'sybsystemdb' will use I/O size of 8 Kb.
00:00:00000:00001:2011/03/23 14:22:01.44 server Resident Node id: a1600a66fa7e
00:00:00000:00001:2011/03/23 14:22:01.46 server Transaction coordinator initialized.
00:00:00000:00001:2011/03/23 14:22:01.46 server Database 'sybsystemdb' is now online.
00:00:00000:00001:2011/03/23 14:22:01.47 server Recovering database 'model'.
00:00:00000:00001:2011/03/23 14:22:01.48 server Started estimating recovery log boundaries for database 'model'.
00:00:00000:00001:2011/03/23 14:22:01.48 server Database 'model', checkpoint=(898, 33), first=(898, 33), last=(898, 33).
00:00:00000:00001:2011/03/23 14:22:01.49 server Completed estimating recovery log boundaries for database 'model'.
00:00:00000:00001:2011/03/23 14:22:01.49 server Started ANALYSIS pass for database 'model'.
00:00:00000:00001:2011/03/23 14:22:01.49 server Completed ANALYSIS pass for database 'model'.
00:00:00000:00001:2011/03/23 14:22:01.49 server Log contains all committed transactions until 2011/03/21 12:05:09.76 for database model.
00:00:00000:00001:2011/03/23 14:22:01.49 server Started REDO pass for database 'model'. The total number of log records to process is 1.
00:00:00000:00001:2011/03/23 14:22:01.50 server Completed REDO pass for database 'model'.
00:00:00000:00001:2011/03/23 14:22:01.50 server Timestamp for database 'model' is (0x0000, 0x00001302).
00:00:00000:00001:2011/03/23 14:22:01.50 server Recovery of database 'model' will undo incomplete nested top actions.
00:00:00000:00001:2011/03/23 14:22:01.50 server Started recovery checkpoint for database 'model'.
00:00:00000:00001:2011/03/23 14:22:01.51 server Completed recovery checkpoint for database 'model'.
00:00:00000:00001:2011/03/23 14:22:01.51 server Started filling free space info for database 'model'.
00:00:00000:00001:2011/03/23 14:22:01.51 server Completed filling free space info for database 'model'.
00:00:00000:00001:2011/03/23 14:22:01.52 server Started cleaning up the default data cache for database 'model'.
00:00:00000:00001:2011/03/23 14:22:01.52 server Completed cleaning up the default data cache for database 'model'.
00:00:00000:00001:2011/03/23 14:22:01.52 server Checking external objects.
00:00:00000:00001:2011/03/23 14:22:01.57 server The transaction log in the database 'model' will use I/O size of 8 Kb.
00:00:00000:00001:2011/03/23 14:22:01.57 server Database 'model' is now online.
00:00:00000:00001:2011/03/23 14:22:01.57 server The logical pagesize of the server is 4 Kb.
00:00:00000:00001:2011/03/23 14:22:01.58 server 0 dump conditions detected at boot time
00:00:00000:00001:2011/03/23 14:22:01.58 server Clearing temporary database 'tempdb'.
00:00:00000:00001:2011/03/23 14:22:01.68 server Timestamp for database 'tempdb' is (0x0000, 0x00001302).
00:00:00000:00001:2011/03/23 14:22:01.73 server The transaction log in the database 'tempdb' will use I/O size of 8 Kb.
00:00:00000:00001:2011/03/23 14:22:01.73 server Database 'tempdb' is now online.
00:00:00000:00001:2011/03/23 14:22:01.79 server Recovering database 'sybsystemprocs'.
00:00:00000:00001:2011/03/23 14:22:01.79 server Started estimating recovery log boundaries for database 'sybsystemprocs'.
00:00:00000:00001:2011/03/23 14:22:01.80 server Database 'sybsystemprocs', checkpoint=(31833, 31), first=(31833, 31), last=(31833, 31).
00:00:00000:00001:2011/03/23 14:22:01.80 server Completed estimating recovery log boundaries for database 'sybsystemprocs'.
00:00:00000:00001:2011/03/23 14:22:01.80 server Started ANALYSIS pass for database 'sybsystemprocs'.
00:00:00000:00001:2011/03/23 14:22:01.80 server Completed ANALYSIS pass for database 'sybsystemprocs'.
00:00:00000:00001:2011/03/23 14:22:01.80 server Log contains all committed transactions until 2011/03/22 17:41:35.13 for database sybsystemprocs.
00:00:00000:00001:2011/03/23 14:22:01.81 server Started REDO pass for database 'sybsystemprocs'. The total number of log records to process is 1.
00:00:00000:00001:2011/03/23 14:22:01.81 server Completed REDO pass for database 'sybsystemprocs'.
00:00:00000:00001:2011/03/23 14:22:01.90 server Timestamp for database 'sybsystemprocs' is (0x0000, 0x000463c3).
00:00:00000:00001:2011/03/23 14:22:01.90 server Recovery of database 'sybsystemprocs' will undo incomplete nested top actions.
00:00:00000:00001:2011/03/23 14:22:01.90 server Started recovery checkpoint for database 'sybsystemprocs'.
00:00:00000:00001:2011/03/23 14:22:01.91 server Completed recovery checkpoint for database 'sybsystemprocs'.
00:00:00000:00001:2011/03/23 14:22:01.91 server Started filling free space info for database 'sybsystemprocs'.
00:00:00000:00001:2011/03/23 14:22:01.91 server Completed filling free space info for database 'sybsystemprocs'.
00:00:00000:00001:2011/03/23 14:22:01.92 server Started cleaning up the default data cache for database 'sybsystemprocs'.
00:00:00000:00001:2011/03/23 14:22:01.92 server Completed cleaning up the default data cache for database 'sybsystemprocs'.
00:00:00000:00001:2011/03/23 14:22:01.92 server Checking external objects.
00:00:00000:00001:2011/03/23 14:22:01.99 server The transaction log in the database 'sybsystemprocs' will use I/O size of 8 Kb.
00:00:00000:00001:2011/03/23 14:22:01.99 server Database 'sybsystemprocs' is now online.
00:00:00000:00009:2011/03/23 14:22:02.03 kernel network name Sybase01, interface IPv4, address 127.0.0.1, type tcp, port 5000, filter NONE
00:00:00000:00001:2011/03/23 14:22:02.19 server The wash size of the 4K buffer pool in cache default data cache has been changed from 14744 Kb to 8848 Kb due to a change in the size of the pool.
00:00:00000:00001:2011/03/23 14:22:02.20 server Recovery has tuned the size of '32K' pool in 'default data cache' to benefit recovery performance. The original configuration will be restored at the end of recovery.
00:00:00000:00001:2011/03/23 14:22:02.20 server Recovery has tuned the size of '4K' pool in 'default data cache' to benefit recovery performance. The original configuration will be restored at the end of recovery.
00:00:00000:00001:2011/03/23 14:22:02.20 server Recovery has tuned the '32K' pool in 'default data cache' by changing its 'local async prefetch limit' from 10 to 80. The original configuration will be restored at the end of recovery.
00:00:00000:00001:2011/03/23 14:22:02.20 server Recovery has tuned the '4K' pool in 'default data cache' by changing its 'local async prefetch limit' from 10 to 80. The original configuration will be restored at the end of recovery.
00:00:00000:00001:2011/03/23 14:22:02.20 server The server will recover databases serially.
00:00:00000:00001:2011/03/23 14:22:02.21 server Recovering database 'pubs2'.
00:00:00000:00001:2011/03/23 14:22:02.22 server Started estimating recovery log boundaries for database 'pubs2'.
00:00:00000:00001:2011/03/23 14:22:02.23 server Database 'pubs2', checkpoint=(1305, 31), first=(1305, 31), last=(1305, 31).
00:00:00000:00001:2011/03/23 14:22:02.23 server Completed estimating recovery log boundaries for database 'pubs2'.
00:00:00000:00001:2011/03/23 14:22:02.23 server Started ANALYSIS pass for database 'pubs2'.
00:00:00000:00001:2011/03/23 14:22:02.23 server Completed ANALYSIS pass for database 'pubs2'.
00:00:00000:00001:2011/03/23 14:22:02.23 server Log contains all committed transactions until 2011/03/23 11:43:34.43 for database pubs2.
00:00:00000:00001:2011/03/23 14:22:02.23 server Started REDO pass for database 'pubs2'. The total number of log records to process is 1.
00:00:00000:00001:2011/03/23 14:22:02.23 server Completed REDO pass for database 'pubs2'.
00:00:00000:00001:2011/03/23 14:22:02.26 server Timestamp for database 'pubs2' is (0x0000, 0x0000260d).
00:00:00000:00001:2011/03/23 14:22:02.26 server Recovery of database 'pubs2' will undo incomplete nested top actions.
00:00:00000:00001:2011/03/23 14:22:02.26 server Started recovery checkpoint for database 'pubs2'.
00:00:00000:00001:2011/03/23 14:22:02.26 server Completed recovery checkpoint for database 'pubs2'.
00:00:00000:00001:2011/03/23 14:22:02.27 server Started filling free space info for database 'pubs2'.
00:00:00000:00001:2011/03/23 14:22:02.27 server Completed filling free space info for database 'pubs2'.
00:00:00000:00001:2011/03/23 14:22:02.27 server Started cleaning up the default data cache for database 'pubs2'.
00:00:00000:00001:2011/03/23 14:22:02.27 server Completed cleaning up the default data cache for database 'pubs2'.
00:00:00000:00001:2011/03/23 14:22:02.28 server Checking external objects.
00:00:00000:00001:2011/03/23 14:22:02.32 server The transaction log in the database 'pubs2' will use I/O size of 8 Kb.
00:00:00000:00001:2011/03/23 14:22:02.32 server Database 'pubs2' is now online.
00:00:00000:00001:2011/03/23 14:22:02.33 server Recovering database 'pubs3'.
00:00:00000:00001:2011/03/23 14:22:02.34 server Started estimating recovery log boundaries for database 'pubs3'.
00:00:00000:00001:2011/03/23 14:22:02.34 server Database 'pubs3', checkpoint=(1223, 27), first=(1223, 27), last=(1223, 27).
00:00:00000:00001:2011/03/23 14:22:02.34 server Completed estimating recovery log boundaries for database 'pubs3'.
00:00:00000:00001:2011/03/23 14:22:02.34 server Started ANALYSIS pass for database 'pubs3'.
00:00:00000:00001:2011/03/23 14:22:02.35 server Completed ANALYSIS pass for database 'pubs3'.
00:00:00000:00001:2011/03/23 14:22:02.35 server Log contains all committed transactions until 2011/03/23 11:43:35.68 for database pubs3.
00:00:00000:00001:2011/03/23 14:22:02.35 server Started REDO pass for database 'pubs3'. The total number of log records to process is 1.
00:00:00000:00001:2011/03/23 14:22:02.35 server Completed REDO pass for database 'pubs3'.
00:00:00000:00001:2011/03/23 14:22:02.36 server Timestamp for database 'pubs3' is (0x0000, 0x00002765).
00:00:00000:00001:2011/03/23 14:22:02.36 server Recovery of database 'pubs3' will undo incomplete nested top actions.
00:00:00000:00001:2011/03/23 14:22:02.36 server Started recovery checkpoint for database 'pubs3'.
00:00:00000:00001:2011/03/23 14:22:02.36 server Completed recovery checkpoint for database 'pubs3'.
00:00:00000:00001:2011/03/23 14:22:02.37 server Started filling free space info for database 'pubs3'.
00:00:00000:00001:2011/03/23 14:22:02.37 server Completed filling free space info for database 'pubs3'.
00:00:00000:00001:2011/03/23 14:22:02.37 server Started cleaning up the default data cache for database 'pubs3'.
00:00:00000:00001:2011/03/23 14:22:02.37 server Completed cleaning up the default data cache for database 'pubs3'.
00:00:00000:00001:2011/03/23 14:22:02.38 server Checking external objects.
00:00:00000:00001:2011/03/23 14:22:02.41 server The transaction log in the database 'pubs3' will use I/O size of 8 Kb.
00:00:00000:00001:2011/03/23 14:22:02.41 server Database 'pubs3' is now online.
00:00:00000:00001:2011/03/23 14:22:02.42 server Recovering database 'IMDB'.
00:00:00000:00001:2011/03/23 14:22:02.43 server Started estimating recovery log boundaries for database 'IMDB'.
00:00:00000:00001:2011/03/23 14:22:02.43 server Database 'IMDB', checkpoint=(1048580, 13), first=(1048580, 13), last=(1048580, 13).
00:00:00000:00001:2011/03/23 14:22:02.43 server Completed estimating recovery log boundaries for database 'IMDB'.
00:00:00000:00001:2011/03/23 14:22:02.43 server Started ANALYSIS pass for database 'IMDB'.
00:00:00000:00001:2011/03/23 14:22:02.43 server Completed ANALYSIS pass for database 'IMDB'.
00:00:00000:00001:2011/03/23 14:22:02.43 server Log contains all committed transactions until 2011/03/23 14:19:12.15 for database IMDB.
00:00:00000:00001:2011/03/23 14:22:02.43 server Started REDO pass for database 'IMDB'. The total number of log records to process is 1.
00:00:00000:00001:2011/03/23 14:22:02.44 server Completed REDO pass for database 'IMDB'.
00:00:00000:00001:2011/03/23 14:22:02.44 server Timestamp for database 'IMDB' is (0x0000, 0x0000131e).
00:00:00000:00001:2011/03/23 14:22:02.44 server Recovery of database 'IMDB' will undo incomplete nested top actions.
00:00:00000:00001:2011/03/23 14:22:02.44 server Started recovery checkpoint for database 'IMDB'.
00:00:00000:00001:2011/03/23 14:22:02.45 server Completed recovery checkpoint for database 'IMDB'.
00:00:00000:00001:2011/03/23 14:22:02.45 server Started filling free space info for database 'IMDB'.
00:00:00000:00001:2011/03/23 14:22:02.46 server Completed filling free space info for database 'IMDB'.
00:00:00000:00001:2011/03/23 14:22:02.46 server Started cleaning up the default data cache for database 'IMDB'.
00:00:00000:00001:2011/03/23 14:22:02.46 server Completed cleaning up the default data cache for database 'IMDB'.
00:00:00000:00001:2011/03/23 14:22:02.46 server Checking external objects.
00:00:00000:00001:2011/03/23 14:22:02.50 server The transaction log in the database 'IMDB' will use I/O size of 8 Kb.
00:00:00000:00001:2011/03/23 14:22:02.50 server Database 'IMDB' is now online.
00:00:00000:00001:2011/03/23 14:22:02.52 server Recovering database 'sybmgmtdb'.
00:00:00000:00001:2011/03/23 14:22:02.52 server Started estimating recovery log boundaries for database 'sybmgmtdb'.
00:00:00000:00001:2011/03/23 14:22:02.53 server Database 'sybmgmtdb', checkpoint=(7211, 42), first=(7211, 42), last=(7211, 42).
00:00:00000:00001:2011/03/23 14:22:02.53 server Completed estimating recovery log boundaries for database 'sybmgmtdb'.
00:00:00000:00001:2011/03/23 14:22:02.53 server Started ANALYSIS pass for database 'sybmgmtdb'.
00:00:00000:00001:2011/03/23 14:22:02.53 server Completed ANALYSIS pass for database 'sybmgmtdb'.
00:00:00000:00001:2011/03/23 14:22:02.53 server Log contains all committed transactions until 2011/03/23 14:21:51.94 for database sybmgmtdb.
00:00:00000:00001:2011/03/23 14:22:02.54 server Started REDO pass for database 'sybmgmtdb'. The total number of log records to process is 1.
00:00:00000:00001:2011/03/23 14:22:02.54 server Completed REDO pass for database 'sybmgmtdb'.
00:00:00000:00001:2011/03/23 14:22:02.66 server Timestamp for database 'sybmgmtdb' is (0x0000, 0x0000c648).
00:00:00000:00001:2011/03/23 14:22:02.66 server Recovery of database 'sybmgmtdb' will undo incomplete nested top actions.
00:00:00000:00001:2011/03/23 14:22:02.67 server Started recovery checkpoint for database 'sybmgmtdb'.
00:00:00000:00001:2011/03/23 14:22:02.67 server Completed recovery checkpoint for database 'sybmgmtdb'.
00:00:00000:00001:2011/03/23 14:22:02.67 server Started filling free space info for database 'sybmgmtdb'.
00:00:00000:00001:2011/03/23 14:22:02.68 server Completed filling free space info for database 'sybmgmtdb'.
00:00:00000:00001:2011/03/23 14:22:02.68 server Started cleaning up the default data cache for database 'sybmgmtdb'.
00:00:00000:00001:2011/03/23 14:22:02.68 server Completed cleaning up the default data cache for database 'sybmgmtdb'.
00:00:00000:00001:2011/03/23 14:22:02.68 server Checking external objects.
00:00:00000:00001:2011/03/23 14:22:02.74 server The transaction log in the database 'sybmgmtdb' will use I/O size of 8 Kb.
00:00:00000:00001:2011/03/23 14:22:02.74 server Database 'sybmgmtdb' is now online.
00:00:00000:00001:2011/03/23 14:22:02.74 server Recovery has restored the value of 'local async prefetch limit' for '32K' pool in 'default data cache' from '80' to 'DEFAULT'.
00:00:00000:00001:2011/03/23 14:22:02.74 server Recovery has restored the value of 'local async prefetch limit' for '4K' pool in 'default data cache' from '80' to 'DEFAULT'.
00:00:00000:00001:2011/03/23 14:22:02.74 server Recovery has restored the original size for '32K' pool and '4K' pool in 'default data cache'.
00:00:00000:00001:2011/03/23 14:22:02.75 server Recovery complete.
00:00:00000:00001:2011/03/23 14:22:02.75 server ASE's default unicode sort order is 'binary'.
00:00:00000:00001:2011/03/23 14:22:02.75 server ASE's default sort order is:
00:00:00000:00001:2011/03/23 14:22:02.75 server 'bin_iso_1' (ID = 50)
00:00:00000:00001:2011/03/23 14:22:02.75 server on top of default character set:
00:00:00000:00001:2011/03/23 14:22:02.75 server 'iso_1' (ID = 1).
00:00:00000:00001:2011/03/23 14:22:02.76 server Master device size: 60 megabytes, or 30720 virtual pages. (A virtual page is 2048 bytes.)
00:00:00000:00011:2011/03/23 14:22:02.77 kernel Initializing Job Scheduler Task
00:00:00000:00011:2011/03/23 14:22:02.83 kernel Installed Job Scheduler sequencer code version 0.27 - 27 tokens
JS Agent/15.5/EBF 18159 SMP ESD#2/P/Linux Intel/Linux 2.6.9-55.ELsmp i686/asear155/2514/32-bit/OPT/Wed Aug 25 05:46:01 2010
Confidential property of Sybase, Inc.
Copyright 1987, 2010
Sybase, Inc. All rights reserved.
Unpublished rights reserved under U.S. copyright laws.
This software contains confidential and trade secret information of Sybase,
Inc. Use, duplication or disclosure of the software and documentation by
the U.S. Government is subject to restrictions set forth in a license
agreement between the Government and Sybase, Inc. or other written
agreement specifying the Government's rights to use the software and any
applicable FAR provisions, for example, FAR 52.227-19.
Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
00:00:00000:00011:2011/03/23 14:22:03.09 kernel Job Scheduler Task state set to running, startcount 1.
[sybase@Sybase01 ~]$ isql -Usa -PNerv2011 -SSYBASE01 -w 150
1> disk mirror name = "IMDB", mirror = "IMDB_mirror"
2> go
Creating the physical file for the mirror...
00:00:00000:00012:2011/03/23 14:22:06.48 kernel mirror for virtual device 5 started using asynchronous (with DIRECTIO) I/O
Starting Dynamic Mirroring of 2560000 pages for logical device 'IMDB'.
512 pages mirrored...
1024 pages mirrored...
1536 pages mirrored...
2048 pages mirrored...
2560 pages mirrored...
3072 pages mirrored...
3584 pages mirrored...
4096 pages mirrored...
4608 pages mirrored...
5120 pages mirrored...
5632 pages mirrored...
6144 pages mirrored...
6656 pages mirrored...
7168 pages mirrored...
7680 pages mirrored...
8192 pages mirrored...
8704 pages mirrored...
9216 pages mirrored...
9728 pages mirrored...
10240 pages mirrored...
...
1570304 pages mirrored...
1570816 pages mirrored...
1571328 pages mirrored...
1571840 pages mirrored...
1572352 pages mirrored...
1572864 pages mirrored...
The remaining 987136 pages are currently unallocated and will be mirrored as they are allocated.
1>
abr 282011
 

Um excelente recurso do Sybase ASE é o CACHE nominado, que pode ser criado para uso por apenas um (ou mais) banco de dados.

Desta forma, a memória da máquina pode ser direcionada para os bancos de dados mais críticos.

[sybase@Sybase01 ~]$ isql -Usa -PNerv2011 -SSYBASE01 -w 150
1> USE master
2> go
1> exec sp_cacheconfig IMBD_Cache, '131072.0K', mixed
2> go
00:00:00000:00025:2011/03/23 14:29:30.80 server Configuration file '/opt/sybase/ASE-15_0/SYBASE01.cfg' has been written and the previous version has been renamed to '/opt/sybase/ASE-15_0/SYBASE01.045'.
00:00:00000:00025:2011/03/23 14:29:30.97 kernel Allocating a shared memory segment of size 139096064 bytes.
00:00:00000:00025:2011/03/23 14:29:30.98 kernel Could not allocate memory using Huge Pages. Allocated using regular pages. For better performance, reboot the server after configuring enough Huge Pages.
00:00:00000:00025:2011/03/23 14:29:30.98 kernel Total shared memory allocated in this attempt. Number of segments(s): 1. Total size of allocation in bytes: 139096064
00:00:00000:00025:2011/03/23 14:29:31.55 server Size of the 4K memory pool: 131072 Kb
Memory allocated for the IMBD_Cache cachelet 1: 131072 Kb
The change is completed. The option is dynamic and ASE need not be rebooted for the change to take effect.
(return status = 0)
1> exit
[sybase@Sybase01 ~]$
abr 282011
 

O protocolo de comunicação das ferramentas Sybase é o TDS – Tabular Data Stream.

Este é um formato aberto, e uma busca sobre ferramentas que o utilizam no Ubuntu me trouxe o pacote que tem o programa tsql, que é um cliente totalmente funcional, além de muito leve, para acessar um servidor Sybase através do Ubuntu.

Muito melhor do que utilizar uma pesada (e cara) ferramenta proprietária, e sem precisar utilizar o isql diretamente no servidor.

ricardo@ricardo-notebook:~$ sudo apt-get install freetds-bin
Lendo listas de pacotes... Pronto
Construindo árvore de dependências
Lendo informação de estado... Pronto
O seguinte pacote foi instalado automaticamente e já não é necessário:
libtextcat-data-utf8
Use 'apt-get autoremove' para removê-los.
Os NOVOS pacotes a seguir serão instalados:
freetds-bin
0 pacotes atualizados, 1 pacotes novos instalados, 0 a serem removidos e 12 não atualizados.
É preciso baixar 0 B/283 kB de arquivos.
Depois desta operação, 729 kB adicionais de espaço em disco serão usados.
Selecionando pacote previamente não selecionado freetds-bin.
(Lendo banco de dados ... 143628 ficheiros e directórios actualmente instalados.)
Desempacotando freetds-bin (de .../freetds-bin_0.82-7_amd64.deb) ...
Processando gatilhos para man-db ...
Configurando freetds-bin (0.82-7) ...
ricardo@ricardo-notebook:~$ tsql -H 192.168.56.101 -p 5000 -U sa -P Nerv2011 -D pubs2
locale is "pt_BR.UTF-8"
locale charset is "UTF-8"
Default database being set to pubs2
1> sp_helpdb
2> go
name db_size owner dbid created durability status
IMDB 6144.0 MB sa 6 Mar 23, 2011 full no options set
master 26.0 MB sa 1 Mar 21, 2011 full mixed log and data
model 6.0 MB sa 3 Mar 21, 2011 full mixed log and data
pubs2 7.0 MB sa 4 Mar 22, 2011 full trunc log on chkpt, mixed log and data
pubs3 6.0 MB sa 5 Mar 22, 2011 full trunc log on chkpt, mixed log and data
sybmgmtdb 75.0 MB sa 31515 Mar 21, 2011 full select into/bulkcopy/pllsort, trunc log on chkpt, mixed log and data
sybsystemdb 12.0 MB sa 31513 Mar 21, 2011 full mixed log and data
sybsystemprocs 152.0 MB sa 31514 Mar 21, 2011 full trunc log on chkpt, mixed log and data
tempdb 106.0 MB sa 2 Mar 27, 2011 no_recovery select into/bulkcopy/pllsort, trunc log on chkpt, mixed log and data
(9 rows affected)
name attribute_class attribute int_value char_value comments
tempdb buffer manager cache binding 1 tempdb_cache NULL
IMDB buffer manager cache binding 1 IMBD_Cache NULL
(2 rows affected)
(return status = 0)
1> sp_who
2> go
fid spid status loginame origname hostname blk_spid dbname tempdbname cmd block_xloid
0 2 sleeping NULL NULL NULL 0 master tempdb DEADLOCK TUNE 0
0 3 sleeping NULL NULL NULL 0 master tempdb MIRROR HANDLER 0
0 4 sleeping NULL NULL NULL 0 master tempdb ASTC HANDLER 0
0 5 sleeping NULL NULL NULL 0 master tempdb CHECKPOINT SLEEP 0
0 6 sleeping NULL NULL NULL 0 master tempdb HK WASH 0
0 7 sleeping NULL NULL NULL 0 master tempdb HK GC 0
0 8 sleeping NULL NULL NULL 0 master tempdb HK CHORES 0
0 9 sleeping NULL NULL NULL 0 master tempdb PORT MANAGER 0
0 10 sleeping NULL NULL NULL 0 pubs2 tempdb NETWORK HANDLER 0
0 11 sleeping NULL NULL NULL 0 sybmgmtdb tempdb JOB SCHEDULER 0
0 13 sleeping NULL NULL NULL 0 master tempdb LICENSE HEARTBEAT 0
0 15 recv sleep jstask jstask NULL 0 sybmgmtdb tempdb AWAITING COMMAND 0
0 16 recv sleep jstask jstask NULL 0 sybmgmtdb tempdb AWAITING COMMAND 0
0 17 recv sleep jstask jstask NULL 0 sybmgmtdb tempdb AWAITING COMMAND 0
0 18 recv sleep jstask jstask NULL 0 sybmgmtdb tempdb AWAITING COMMAND 0
0 19 recv sleep jstask jstask NULL 0 sybmgmtdb tempdb AWAITING COMMAND 0
0 20 recv sleep jstask jstask NULL 0 sybmgmtdb tempdb AWAITING COMMAND 0
0 21 recv sleep jstask jstask NULL 0 sybmgmtdb tempdb AWAITING COMMAND 0
0 22 recv sleep jstask jstask NULL 0 sybmgmtdb tempdb AWAITING COMMAND 0
0 23 running sa sa ricardo-notebook 0 pubs2 tempdb INSERT 0
(20 rows affected)
(return status = 0)
1> exit
ricardo@ricardo-notebook:~$