Installing The Sybase Syntax Database

This article provides instructions for installing online help for Transact-SQL syntax.The $SYBASE/$SYBASE_ASE/scripts directory contains scripts for installing syntax help database:ins_syn_sql.

1.Installing

Use following command to install:

  
  
  
  
  1. [sybase@syb01 ~]$ isql -Usa -P****** -Ssyb01 < /$SYBASE/$SYBASE_ASE/scripts/ins_syn_sql 

2.Using online help:

  
  
  
  
  1. 1> sp_syntax 'alter' 
  2. 2> go 
  3.  Syntax Help 
  4.                                                                                  
  5.  ------------------------------------------------------------------------------  
  6.  System Procedure                                                                
  7.  sp_altermessage - Enables and disables the logging of a system-defined or       
  8.          user-defined message in the Adaptive Server error log.                  
  9.    sp_altermessage message_id, parameter, parameter_value                        
  10.                                                                                  
  11.  Transact-SQL                                                                    
  12.  alter database - Increases the amount of space allocated to a database.         
  13.    alter database database_name                                                  
  14.       [on {default | database_device } [= size]                                  
  15.           [, database_device [= size]]...]                                       
  16.       [log on { default | database_device } [ = size ]                           
  17.           [ , database_device [= size]]...]                                      
  18.       [with override]                                                            
  19.       [for load]                                                                 
  20.       [for proxy_update] 
  21. .................................. 
  22.                                                                                  
  23.  dbcc Procedure                                                                  
  24.  sp_dbcc_alterws - Changes the size of the specified workspace to a specified    
  25.          value, and initializes the workspace.                                   
  26.    sp_dbcc_alterws dbname, wsname, "wssize[K|M]"                                 
  27.                                                                                  
  28. (return status = 0

3.Troubleshooting

If the master device isn't the default device on sybase ASE,when you install the syntax database,the following occurs:

  
  
  
  
  1. There is not enough room in the default devices to create the sybsyntax database. 

To fix it,you need to edit ins_syn_sql script and comment out the following lines like this:

  
  
  
  
  1. /*begin 
  2.         /* is the space left on the default database devices > size of model? */ 
  3.         if  (select sum (high-low +1)  from sysdevices where status & 11 = 1) 
  4.         -  (select sum (isnull (size, 0)) from sysusages, sysdevices 
  5.                 where vstart >= sysdevices.low 
  6.                 and vstart <= sysdevices.high 
  7.                 and sysdevices.status &11 = 1 
  8.                 and sysdevices.vdevno = sysusages.vdevno) 
  9.                 > (select sum(sysusages.size) from sysusages where dbid = 3
  10.         begin 
  11.                if (@@maxpagesize = 1024 * 2) 
  12.                         create database sybsyntax on default = 3 
  13.                else 
  14.                if (@@maxpagesize = 1024 * 4) 
  15.                         create database sybsyntax on default = 6 
  16.                else 
  17.                         create database sybsyntax on default 
  18.         end 
  19.         else 
  20.         begin 
  21.  
  22.                 /* 
  23.                 ** 18047, "There is not enough room on the default devices to create the sybsyntax database." 
  24.                 */ 
  25.                 raiserror 18047 
  26.                 select syb_quit() 
  27.         end 
  28. end*/ 

After commented out this entire section, add a line like this to the script:

  
  
  
  
  1. if not exists (select name from sysdatabases where name = "sybsyntax"
  2. create database sybsyntax on default 
  3. go 

 

本文出自 “candon123” 博客,谢绝转载!

你可能感兴趣的:(Sybase)