创建数据库:本数据库创建在设备 userdev上,而在分开的设备(logdev)上创建数据库日志。
1>     create database mydatabase   //创建一个名为mydatabase的数据库
2>     on userdev = “50M”          //数据库的存储空间为50M,数据库设备      
                          //userdev,而不是master
3>     log on logdev=”10M”             //日志文件的存储空间为10M
4>     go
  也可以用命令 create database mydatabase 来创建用户数据库mydatabase,这个数据库也会默认的创建在设备userdev上,日志文件也创建在userdev,但不幸的的是,用户创建的这个数据库将只有2M的容量,恐怕这不是创建者所期望的。因此,不管是Sybase还是我本人,都强烈建议使用上表的过程创建用户数据库,以便于这个数据库可以满足真实的应用场景。创建完数据库后,我们很想知道创建的这个数据库到底是怎么一个状况?通过系统存储过程-sp_helpdb来获得数据库的各种信息。下面是我的某个sybase服务器的范例:
1> sp_helpdb
2> go
 name                     db_size       owner                    dbid 
         created          
         status                                                                                                
 ------------------------ ------------- ------------------------ ------
         ------------------
         ------------------------------------------------------------------------------------------------------
 master                         12.0 MB sa                            1
         Jun 28, 2005     
         mixed log and data                                                                                    
 model                           4.0 MB sa                            3
         Jun 28, 2005     
         mixed log and data                                                                                    
 myfirstdatabase               110.0 MB sa                            4
         Jul 08, 2005     
         no options set                                                                                         
 secdatadb                      98.0 MB sa                            5
         Jul 08, 2005     
         no options set                                                                                         
 sybsystemdb                     4.0 MB sa                        31513
         Jun 28, 2005     
         mixed log and data                                                                                    
 sybsystemprocs                120.0 MB sa                        31514
         Jun 28, 2005     
         trunc log on chkpt, mixed log and data                                                                
 tempdb                          4.0 MB sa                            2
         Aug 13, 2005     
         select into/bulkcopy/pllsort, trunc log on chkpt, mixed log and data                                    
(1 row affected)
(return status = 0)
1>