打印本文 打印本文 关闭窗口 关闭窗口
最近一段时间都在弄sybase和ms-sqlserver,写了一份学习笔记
作者:武汉SEO闵涛  文章来源:敏韬网  点击数4203  更新时间:2009/4/22 23:09:38  文章录入:mintao  责任编辑:mintao

可能内容有些没章法。
以前在坛上许过写份学习资料出来。今天补上。望对学习者有帮助。

简介:
对学习sybase和ms-sqlserver的体会,包括安装、初始化、sql学习,过程和触发子创建,db-library和ct-library以及同oracle的不同之处,和细节注意对比。

[不能上传文件,只好列出内容]
Sybase学习体会
原创:戴黎鸣
第一大块:Sybase安装 [redhat 7.2]
Sybase rpm 包安装顺序 12.5.0.1 for linux
sybase-common-12.5.0.1DE-1.i386.rpm
sybase-ase-12.5.0.1ESD-1.i386.rpm
sybase-efts-12.5.0.1ESD-1.i386.rpm
sybase-openclient-12.5.0.1ESD-1.i386.rpm
sybase-esql-12.5.0.1ESD-1.i386.rpm
sybase-sqlremote-7.0.2-1.i386.rpm
sybase-chinese-12.5.0.1ESD-1.i386.rpm
安装
rpm -ivh sybase-common-12.5.0.3-7.i386.rpm
rpm -ivh sybase-ase-12.5.0.3-7.i386.rpm  [ -Uhv --nodeps]
rpm -ivh sybase-efts-12.5.0.3-7.i386.rpm  [ -Uhv --nodeps]
rpm -ivh sybase-openclient-12.5.0.3-7.i386.rpm
rpm -ivh sybase-esql-12.5.0.3-7.i386.rpm
rpm -ivh sybase-sqlremote-7.0.2-1.i386.rpm
卸载
rpm -e sybase-efts-12.5.0.3-7
rpm -e sybase-sqlremote-7.0.2-1
rpm -e sybase-esql-12.5.0.3-7
rpm -e sybase-openclient-12.5.0.3-7
rpm -e sybase-openclient-12.5.0.3-7
rpm -e sybase-ase-12.5.0.3-7
rpm -e sybase-chinese-12.5.0.3-7
rpm -e sybase-doc-12.5.0.3-7
rpm -e sybase-common-12.5.0.3-7
rpm -ql libstdc++
安装顺序和依赖关系说明:
sybase-common-12.5.0.1DE-1.i386.rpm The common package is a prerequisite to all other packages. It creates and installs the default runtime environment required by other packages, and includes tools to configure, install, and administer Adaptive Server and related components.
NOTE: The sybase-common-12.5-3.i386.rpm is a pre-required package. You must install it before you install any other rpm package as all depend on the common package.

sybase-ase-12.5.0.1ESD-1.i386.rpm This package installs all binary server components required to run Adaptive Server, Backup Server, XP Server, Monitor Server, Historical Server and related utilities and tools for database development and maintenance. 

sybase-efts-12.5.0.1ESD-1.i386.rpm The efts package installs the Enhanced Full-Text Search Specialty Data Store, which provides the capability to do complex searches on character and text data stored in the ASE. The performance of the searches can be orders of magnitude faster than using standard SQL searches.

sybase-openclient-12.5.0.1ESD-1.i386.rpm The Open Client package installs the Sybase Open Client Software Development Kit (SDK). Open Client consists of programming interfaces and networking services for writing client applications for point-to-point communication to Sybase server products.

sybase-esql-12.5.0.1ESD-1.i386.rpm The Embedded SQL package installs the Sybase ESQL binaries, libraries, include files and sample programs. It consists of the programming interfaces and networking services for writing client application in Embedded-SQL for point-to-point communication to ASE.
NOTE: The sybase-esql-12.5.0.1ESD-1.i386.rpm package requires the sybase-openclient-12.5.0.1ESD-1.i386.rpm package. 

sybase-sqlremote-7.0.2-1.i386.rpm The SQL Remote package installs the Sybase SQL Remote for Adaptive Server Enterprise. SQL Remote is a data-replication technology designed for two-way replication between a consolidated data server and large numbers of remote databases, typically including many mobile databases.

sybase-chinese-12.5.0.1ESD-1.i386.rpm 
sybase-french-12.5.0.1ESD-1.i386.rpm 
sybase-german-12.5.0.1ESD-1.i386.rpm 
sybase-japanese-12.5.0.1ESD-1.i386.rpm 
sybase-korean-12.5.0.1ESD-1.i386.rpm 
sybase-polish-12.5.0.1ESD-1.i386.rpm 
sybase-portuguese-12.5.0.1ESD-1.i386.rpm 
sybase-thai-12.5.0.1ESD-1.i386.rpm 
sybase-spanish-12.5.0.1ESD-1.i386.rpm 
NOTE: These packages cannot be installed on a platform that is running an incorrect version of Linux, kernel and run-time. These packages do allow for upgrade of previous released versions under Linux. These packages do not allow for degrading later installs.

Consistency Check: Once the files have been transferred to the target machine, perform a consistency check before installing the packages. Enter:

#rpm -- checksig *.rpm

You should receive the following output:
sybase-common-12.5.0.1DE-1.i386.rpm: md5 OK 
sybase-ase-12.5.0.1ESD-1.i386.rpm: md5 OK 
sybase-efts-12.5.0.1ESD-1.i386.rpm: md5 OK 
sybase-esql-12.5.0.1ESD-1.i386.rpm: md5 OK 
sybase-openclient-12.5.0.1ESD-1.i386.rpm: md5 OK 
sybase-sqlremote-12.5.0.1ESD-1.i386.rpm: md5 OK 
sybase-french-12.5.0.1ESD-1.i386.rpm: md5 OK 
sybase-german-12.5.0.1ESD-1.i386.rpm: md5 OK

Refer to the Installation Guide for detailed installation instructions

usage: isql [-b] [-e] [-F] [-p] [-n] [-v] [-X] [-Y] [-Q]
        [-a display_charset] [-A packet_size] [-c cmdend] [-D database]
        [-E editor [-h header [-H hostname [-i inputfile]
        [-I interfaces_file] [-J client_charset] [-K keytab_file]
        [-l login_timeout] [-m errorlevel] [-M labelname labelvalue]
        [-o outputfile] [-P password] [-R remote_server_principal]
        [-s col_separator] [-S server_name] [-t timeout] [-U username]
        [-V [security_options]] [-w column_width] [-z localename]
        [-Z security_mechanism]
 
1、 Root用户,先将rpm包解压,解压后的目录为/opt/Sybase-12.5
rpm -ivh *.rpm 顺序为前面所述的顺序。
如果以前安装过,用
rpm -e  'rpm -qa|grep sybase'卸载
2、 执行$SYBASE/install/sybinstall.sh,它将创建sybase用户和口令,用passwd将sybase的用户口令修改为所要设定的口令。
3、 在root用户登录文件中加入以下语句(以bash用户,.bash_profile为例。更改系统内存值为60M):echo "62914560" > /proc/sys/kernel/shmmax
{
1、 改/etc/sysctl.conf文件加入
   kernel.shmmax=10000
   fs.aio-max-size=10000
2、 编辑$SYBASE/ASE/init/ sample_resource_files/ srvbuild.adaptive_server.rs文件
其他服务建立文件也如此。
   注意输入数据文件时,如果没有建立raw device 将要指定存放的目录和数据库数据文件。
3、 修改后用svrbuildres -r  $SYBASE/ASE/init/sample_resource_files/
srvbuild.adaptive_server.rs执行将建立数据库。
} /opt/sybase-12.5/ASE-12_5/bin/srvbuildres -r /opt/sybase-12.5/ASE-12_5/init/
sample_resource_files/leon.adapative_server.rs
4、 设置完成后,重新用sybase登陆[他会自动设定完成环境变量],建一个目录存放日后的数据库文件
5、 重新restart computer
6、 sybase登陆x-windows,执行$SYBASE/ASE-12_5/bin/srvbuild,选择完四个服务器,键入数据,执行创建。
[
在X-Windows中使用srvbuild工具配置ASE产品 
1、用sybase用户登录X-Windows,执行sybase安装目录(/opt/sybase-11.9.2)下/bin/srvbuild命令。 
2、在srvbuild窗口中,选择要安装Server类型。把四种Server都选上。 
3、给Server命名。将Adaptive Server命名为TEST,相应地,Backup Server自动命名为TEST_back,Monitor Server命名为TEST_mon,XP Server命名为TEST_XP。点击OK按钮,进入各Server的配置过程。 
4、配置Adaptive Server。填写或选择以下内容: 
Master device path(主设备路径):/db/sybsystem/master.dat 
Master device size(MB)(主设备大小):60 
Master database size(MB)(主数据库大小):20 
Sybsystemprocs device path(系统存储过程设备路径):/db/sybsystem/systemprocs.dat 
Sybsystemprocs device size(MB)(系统存储过程

[1] [2] [3] [4] [5]  下一页

打印本文 打印本文 关闭窗口 关闭窗口