+ All Categories
Home > Documents > Wiki Sybase

Wiki Sybase

Date post: 25-Oct-2014
Category:
Upload: santosh
View: 333 times
Download: 1 times
Share this document with a friend
Popular Tags:
62
p_passwordpolicy Description An interface that a user with sso_role can use to configure login and password policy options. Syntax To specify, remove, and list new password complexity options: sp_passwordpolicy {“set” | “clear” | “list”}, policy_option, option_value To verify the password complexity options: sp_passwordpolicy 'validate password options' To generate asymmetric key pairs for network login password encryption: sp_passwordpolicy "regenerate keypair" To expire passwords: sp_passwordpolicy "expire role passwords", "[rolename | wildcard]" sp_passwordpolicy "expire login passwords", "[login_name | wildcard]" sp_passwordpolicy "expire stale role passwords", "datetime" sp_passwordpolicy "expire stale login passwords", "datetime" Parameters set sets a value to an option. When using set, you must specify the policy_option. clear deletes the row for the option specified in the master.dbo.sysattributes table. If there is no policy option specified, clear deletes all the option rows in the
Transcript
Page 1: Wiki Sybase

p_passwordpolicyDescription

An interface that a user with sso_role can use to configure login and password policy options.

Syntax

To specify, remove, and list new password complexity options:

sp_passwordpolicy {“set” | “clear” | “list”}, policy_option, option_value

To verify the password complexity options:

sp_passwordpolicy 'validate password options'

To generate asymmetric key pairs for network login password encryption:

sp_passwordpolicy "regenerate keypair"

To expire passwords:

sp_passwordpolicy "expire role passwords", "[rolename | wildcard]"sp_passwordpolicy "expire login passwords", "[login_name | wildcard]"sp_passwordpolicy "expire stale role passwords", "datetime"sp_passwordpolicy "expire stale login passwords", "datetime"

Parametersset

sets a value to an option. When using set, you must specify the policy_option.

clear

deletes the row for the option specified in the master.dbo.sysattributes table. If there is no policy option specified, clear deletes all the option rows in the sysattributes table. When using clear, you must specify the policy_option.

list

lists the values of the options specified. When using list, you must specify the policy_option.

policy_option, option_value

is the option parameter for set, clear, and list, with option_value being the their values:

Page 2: Wiki Sybase

Option Description

allow password downgrade

Ends the password downgrade period. During the password downgrade period, passwords are stored in syslogins in both old and new encodings to allow user passwords to retained if the server is downgraded, for example, to Adaptive Server 15.0.2.

disallow simple passwords

Value of 1 turns this option on, and a value of 0 turns it off.

min digits in password

Indicates the minimum number of digits to be allowed in a password.

min alpha in password

Indicates the minimum number of alphabetic characters in a password.

min special char in password

Indicates the minimum number of special characters allowed in a password.

min upper char in password

Indicates the minimum number of upper-case characters allowed in a password

min lower char in password

Indicates the minimum number of lower case characters allowed in a password.

systemwide password expiration

Indicates the system-wide password expiration in days.

password exp warn interval

Indicates the password expiration warning interval in days.

minimum password length

Sets the minimum length of the password.

maximum failed logins

Sets the maximum number of failed logins allowed in a session before the account is locked.

expire login Specifies that a login status changes to expired status when you create or reset your login. You are required to change your password on your first login.

"enable last login updates"

enables or disables code in Adaptive Server authentication that records the timestamp when each login occurs.The first parameter “set” sets the value of this attribute.The parameter “list” displays the current value of the attribute, and the parameter "clear" deletes the row from sysattributes. On upgrade or new installation, this attribute does not

Page 3: Wiki Sybase

exist in sysattributes. The login timestamp occurs when the attribute row does not exist or has a value of 1. The login timestamp is not maintained if the attribute value is 0.

“expire login passwords", "[login_name | wildcard]"

expires login passwords, all logins or logins matching a wild card pattern. The column status in master database catalog syslogins is updated with a status bit LOGIN_EXPIRED (0x4) to indicate the password is expired.

"expire role passwords", "[rolename | wildcard]"

expires the password of a role, all roles or roles matching a wild-card pattern. The column status in master database catalog syssrvroles is updated with a status bit ROLE_EXPIRED (0x4) to indicate the password is expired:

"expire stale login passwords", "datetime"

expires login passwords have not been changed after a datetime specified. The column status in master database catalog syslogins is updated with a status bit LOGIN_EXPIRED (0x0004) to indicate that the password is expired. See “Entering Date and Time Data” in Adaptive Server 15.0 Reference Manual: Building Blocks, Chapter 1, “System and User Defined Datatypes” for an explanation of how datetime values are entered.

"expire stale role passwords", "datetime"

expires role passwords have not been changed after a datetime specified. The column status in master database catalog syssrvroles is updated with a status bit ROLE_EXPIRED (0x4) to indicate the password is expired.

"regenerate keypair"

generates the asymmetric key pairs to be used for network login password encryption.There is no catalog update for this option; the actions occur only in memory fields.

'validate password options'

reports errors or inconsistencies in the password complexity option values set, including length and expiration. The result is reported in a tabular format, with each row representing a validation step, the result of the step, and the validation test performed. The result is one of Pass, Fail, or Not Applicable (NA). If any validation test fails, the return status is set to 1.

Page 4: Wiki Sybase

Examples

Example 1

Sets a password expiration warning interval to seven days before the password expires:

sp_passwordpolicy 'set',       'password exp warn interval', 7

Example 2

Lists the option for minimum number of special characters:

sp_passwordpolicy 'list',       'min special char in password'

Example 3

Resets disallow simple passwords to the default value:

sp_passwordpolicy 'clear', 'disallow simple passwords'

Example 4

These examples demonstrate using validate password options. These outputs have been reformatted for clarity, and do not resemble the output you see on your screen if you execute this procedure

These password complexity options and their values are stored in the server: minimum password length:        8 min alpha in password:         2 min digits in password:        2 min upper char in password:    2 min lower char in password:    2

To validate these options, enter:

sp_passwordpolicy 'validate password options'

Validation Step      Pass/Fail/NA      Validation Test ---------------      ------------     -----------------------------min alpha in password         Fail     'min alpha in password' > = 'min upper char in password + 'min lower char in password'

minimum password length - 1   Pass     'minimum password length' > = 'min                                         digits in password' + 'min special                                         char in password' + 'min alpha in                                        password'

Page 5: Wiki Sybase

minimum password length - 2   Pass     'minimum password length' > = 'min                                         digits in password' + min special                                         char in password' + 'min upper                                         char in password' + 'min lower                                        char in password'

maximum password length - 1   Pass    'max password length' > = 'min digits in password' + 'min special char in password' + 'min alpha in password'

maximum password length – 2   Pass    'max password length' > = 'min digits in password' + 'min special char in password' + 'min upper char in password' + 'min lower char in password'password exp warn interval    NA      'password exp warn interval' < = 'systemwide password expiration'

(6 rows affected) (return status = 1)

There is one failure: The sum of min upper char in password + min lower char in password is greater than the value of min alpha in password, so the validation step min alpha in password fails.

Example 5

Validating the following options stored in Adaptive Server:

minimum password length:        8min digits in password:         2min special char in password:   2min alpha in password:          6min upper char in password:     3min lower char in password: 3sp_passwordpolicy 'validate password options'

Validation Step        Pass/Fail/NA      Validation Test ---------------         ------------     ----------------------------- min alpha in password        Pass        'min alpha in password' > = 'min upper                                           char in password' + 'min lower char in password'

minimum password length-1    Fail         'minimum password length' > = 'min digits in password' + 'min special char in password' + 'min alpha in password'

minimum password length-2    Fail        'minimum password length' > = 'min digits in password' + 'min special char in password' + 'min upper                                           char in password' + 'min lower                                          char in password'

Page 6: Wiki Sybase

maximum password length-1    Pass        'max password length' > = 'min digits in password' + 'min special char in password' + 'min alpha in password'

maximum password length–2    Pass        'max password length' > = 'min digits in password' + 'min                                           special char in password' + 'min                                           upper char in password' + 'min                                          lower char in password'

password exp warn interval    NA         'password exp warn interval' < = 'systemwide password expiration'

(6 rows affected) (return status = 1)

There are two failures in step 2 and step 3.The sum of min digits in password, min special char in password and min alpha in password is greater than the value of minimum password length, so the validation step minimum password length -1 fails. The sum of min digits in password, min special char in password, min upper char in password and min lower char in password is greater than the value of minimum password length, so the validation step minimum password length -2 fails.

Example 6

The following examples illlustrate the option 'validate password options'. The outputs have been reformatted for clarity, and do not resemble the output you see on your screed when you execute this procedure.

These password complexity options and their values are stored in the server:

minimum password length:        8min alpha in password:         2min digits in password:        2min upper char in password:    2min lower char in password:     2

To validate these options, enter: sp_passwordpolicy 'validate password options' Validation Step           Pass/Fail/NA    Validation Test ---------------            ------------    -------------------------- min alpha in password         Fail      'min alpha in password' > = 'min

upper char in password + 'min lower char in password'

minimum password length - 1   Pass      'minimum password length' > =

'min                                          digits in password' + 'min special                                          char in password' + 'min alpha in                                         password'

Page 7: Wiki Sybase

minimum password length - 2   Pass     'minimum password length' > = 'min                                         digits in password' + min special                                         char in password' + 'min upper                                         char in password' + 'min lower                                        char in password'

maximum password length - 1   Pass      'max password length' > = 'min

digits in password' + 'min special char in password' + 'min alpha in password'

maximum password length – 2   Pass      'max password length' > = 'min

digits in password' + 'min special char in password' + 'min upper char in password' + 'min lower char in password'

password exp warn interval    NA        'password exp warn interval' < = 'systemwide password expiration'

(6 rows affected) (return status = 1)

There is one failure: the sum of min upper char in password + min lower char in password is greater than the value of min alpha in password, so the validation step min alpha in password fails.

Validating the following options stored in Adaptive Server: minimum password length:        8 min digits in password:         2 min special char in password:   2 min alpha in password:          6 min upper char in password:     3 min lower char in password: 3 sp_passwordpolicy 'validate password options' Validation Step        Pass/Fail/NA      Validation Test ---------------        -------------     ------------------------------ min alpha in password        Pass        'min alpha in password' > =

'min upper                                           char in password' + 'min lower                                          char in password'

minimum password length-1    Fail         'minimum password length' > =

'min                                            digits in password' + 'min special                                            char in password' + 'min alpha in password'

minimum password length-2    Fail        'minimum password length' > =

'min                                            digits in password' + 'min special                                            char in password' + 'min upper                                            char in password' + 'min lower                                           char in password'

maximum password length-1    Pass        'max password length' > = 'min

digits in password' + 'min special

Page 8: Wiki Sybase

char in password' + 'min alpha in password'

maximum password length–2    Pass        'max password length' > = 'min

digits in password' + 'min special char in password' + 'min upper char in password' + 'min lower char in password'

password exp warn interval    NA         'password exp warn interval' <

=                                          'systemwide password expiration'

(6 rows affected) (return status = 1)

There are two failures in step 2 and step 3.

The sum of min digits in password, min special char in password and min alpha in password is greater than the value of minimum password length, so the validation step minimum password length -1 fails. The sum of min digits in password, min special char in password, min upper char in password and min lower char in password is greater than the value of minimum password length, so the validation step minimum password length -2 fails.

Validating the following options stored in Adaptive Server: minimum password length:      8 min digits in password:       11 min special char in password: 11 min alpha in password:        11 min upper char in password:   1 min lower char in password:    1 sp_passwordpolicy 'validate password options' Validation Step         Pass/Fail/NA     Validation Test ---------------          ------------    ----------------------------- min alpha in password      Pass           'min alpha in password' > =

'min                                            upper char in password' + 'min                                           lower char in password'

minimum password length-1  Fail           'minimum password length' > =

'min                                            digits in password' + 'min                                            special char in password' + 'min                                           alpha in password'

minimum password length-2   Fail         'minimum password length' > =

'min                                           digits in password' + 'min special                                           char in password' + 'min upper                                           char in password' + 'min lower                                          char in password'

maximum password length-1   Fail         'max password length' > = 'min

digits in password' + 'min special

Page 9: Wiki Sybase

char in password' + 'min alpha in password'

maximum password length–2   Pass         'max password length' > = 'min

digits in password' + 'min special char in password' + 'min upper char in password' + 'min lower char in password'

password exp warn interval    NA         'password exp warn interval' <

=                                         'systemwide password expiration'

(6 rows affected) (return status = 1)

There are 3 failures, including a serious one, a failure in a test for maximum password length, where the sum of the required password components is greater than the maximum password allowed.

Validating the following options stored in Adaptive Server: minimum password length:       8 min digits in password:        2 min special char in password:  1 min alpha in password:         4 min upper char in password:    0 min lower char in password:     0 sp_passwordpolicy 'validate password options' Validation Step        Pass/Fail/NA         Validation Test ---------------         ------------

------------------------------min alpha in password      Pass 'min alpha in password' > = 'min upper char in password' + 'min lower char in password'

minimum password length-1  Pass             'minimum password length' >

=                                             'min digits in password' + 'min                                              special char in password' +                                            'min alpha in password'

minimum password length-2  Pass             'minimum password length' >

=                                             'min digits in password' + 'min                                              special char in password' +                                             'min upper char in password' +                                            'min lower char in password'

maximum password length-1  Pass             'max password length' > =

'min                                              digits in password' + 'min                                              special char in password' + 'min                                            'min alpha in password'

Page 10: Wiki Sybase

maximum password length–2  Pass            'max password length' > =

'min                                             digits in password' + 'min                                             special char in password' + 'min                                             upper char in password' + 'min                                            lower char in password'

password exp warn interval   NA            'password exp warn interval'

< =                                           'systemwide password expiration'

(6 rows affected) (return status = 0)

There are no failures with these settings. This reports all 5 rows returned, and a return status of 0.

Usage

sp_passwordpolicy information is stored in the master.dbo.sysattributes table.

Auditing

The set and clear commands in sp_passwordpolicy are audited through audit event 115, “Password Administration.”

A audit option “password” audits these actions.

sp_passwordpolicy 'set', 'option_name', 'option_value' sp_passwordpolicy 'clear', 'option_name' sp_passwordpolicy 'expire login passwords' sp_passwordpolicy 'expire stale login passwords' sp_passwordpolicy 'regenerate keypair' sp_passwordpolicy 'expire role passwords' sp_passwordpolicy 'expire stale role passwords'

How to include environment variables in LINUX/UNIX shell?

Page 11: Wiki Sybase

Its strongly recommended that before running any Sybase command ( Server startup, optdiag,bcp,isql etc) , you should have proper environment in current shell.

All Sybase environment variable are defined SYBASE.sh (For KShell and Bash Shell)/SYBASE.csh ( For CShell) file in UNIX/LINUX platform.

Its default location is $SYBASE (Sybase Server installation directory).

Prior to perform any task on Sybase ASE Server, you should have all environment (environment variable) in the current Shell.

You can include Sybase environment variable by executing the $SYBASE/SYBASE.sh. The Preferred method to include environment is by calling the $SYBASE/SYBASE.sh in Sybase user .profile(in Sun OS)/.bashrc ( in Linux).

.bashrc/.profile presents in the $HOME dir of Sybase User.

In windows, sybase.bat/sybase.env is environment variable file,resides in $SYBASE.

[sybase@localhost ~]$ vi .bashrc # .bashrc# Source global definitionsif [ -f /etc/bashrc ]; then. /etc/bashrcfi# User specific aliases and functions#alias sql_profile='. /home/sybase/SQL/SYBASE.sh'#alias rep_profile='. /home/sybase/REP/SYBASE.sh'. /home/sybase/SQL/SYBASE.sh

To Check the environment, you can use set command or check any variable like this.

[sybase@localhost ~]$ echo $SYBASE/home/sybase/SQL

Which are important sybase environment variables? $SYBASE (%SYBASE%) – Sybase Home ( Sybase installation directory) $SYBASE_ASE ( %SYBASE_ASE%) – Sybase ASE Home ( Sybase ASE Home in $SYBASE) $SYBASE_OCS (%SYBASE_OCS) – Sybase Open Clinet Directory $DSQUERY – Sybase Server name$ for UNIX/Linux. % for Windows.

Page 12: Wiki Sybase

What are valid logical page size of SYBASE ASE Server?How to know page size of SYBASE ASE Server

SYBASE ASE offers following logical page size of server :

2K 4K 8K 16K

Logical page size of SYBASE ASE Server

You can check the logical page size of server by @@maxpagesize enviorment variable.

1> select @@maxpagesize2> go----- 2048 --Its 2K page of server(1 row affected)

How can we start the sybase server?How can to start the sybase server? or

How to start backup server ?

After log in your Linux/Unix machine.Step 1: Find out current location or present working directory.Step 2: Locate environmental file SYBASE.sh or SYBASE.csh profile which is ,by default, located in $SYBASE.Step 3: Run environmental file.Step 4: Verify SYBASE.sh or SYBASE.csh run properly.Step 5: Find out RUN_ServerfileStep 6: Start server with startserver.Step 7: Start backup server with startserver.Step 1: pwd -- know your present working directory.Step 2: cd <directory_name_where_SYBASE.sh_present> --find out SYBASE.sh profile which can you find SYBASE ASE directory.Step 3: . SYBASE.sh -- run it and include it.Step 4: echo $SYBABE -- shows path where $SYBASE created which verify that SYBASE.sh run prperly.Step 5: cd $SYBASE/SYBASE_ASE/install ls -ltr -- find out RUN_server_file name.

Page 13: Wiki Sybase

Step 6: startserver -f RUN_servername

Starting Back Up Server : Step 7:startserver -f RUN_SYB_BACKUP

Note: "Its depend upon installation where SYBASE ASE Server installed, so relative path of Run_serverfile can be differ.

How can we shutdown the Sybase ASE server?How can we shutdown the Sybase ASE server? or

What is difference between shutdown and shutdown with nowait

Server should be started.[1]

sa_role is required for shutting down server.

shutdown will wait for completion of all running processes and do shut down gracefully.

shutdown with no wait will not wait completion of any process. It will kill all process immediately and server will proceed for winding up.

Example : Shutting down server1> shutdown2> goExample : Shutting down with nowait1> shutdown with nowait2> go

Caution :: Please use shutdown with nowait on your risk. It can put database under risk and delay database recovery/downtime during startup.

How to log in Sybase ASE server ?Step 1 : Start the Server [1]

Step 2 : Locate $SYBASE/$SYBASE_ASE/install [[2]]

Step 3 : Using isql utility authorize login can access Sybase ASE.

Syntax: isql -Ulogin name -Ppassword -Sservername

Page 14: Wiki Sybase

Example: isql -Usa -P -SPROD_ASE

If DSQUERY environment variable presents in the your shell, you can skip server name with above isql command. It will take server name from DSQUERY

Related Page : How can you trace your path of error log,SYBASE ASE Server name,Back up Server name etc?

What are system required databases for Sybase ASE 12.X & 15.x?

Contents[hide]

1 What are other type of databases in SYBASE ASE? o 1.1 1. System Database o 1.2 2. Optional Database o 1.3 3.Sample database o 1.4 3.User Defined Database

What are other type of databases in SYBASE ASE?

There are four kind of databases in SYBASE ASE:

1. System databases2. Optional databases3. Sample databases4. User defined databases

1. System Database

There are five required system databases in Sybase ASE :

1. master DB 2. model DB 3. temp DB 4. sybsystemprocs DB 5. sybsystemdb

master DB : contain metadata and brain of Sybase ASE. Its first DB which come online after boot.

model DB : template DB. Whenever new DB is created , a copy of model DB is copied. temp DB : temporary database. Used during sorting and other temporary work.

Page 15: Wiki Sybase

sybsystemprocs DB : store all system procedure info. sybsystemdb : used for distributed transaction management system.

2. Optional Database

There are optional databases which are installed on the requirement of environment.

1. sybsecurity DB 2. dbccdb DB 3. sybmgmt DB

sybsecurity DB : installed in server for auditing purpose. dbcc DB : for maintaing a consitensy information of database. sybmgmt DB : stores job schedule information.

3.Sample database

SYBASE ASE provided two sample database for learning and practice purpose.

1. pubs2 2. pubs3

3.User Defined Database

These databases created by userin SYBASE ASE.

How to check the Sybase Server NameHow to check the Sybase Server Name

The global variable @@servername stores the Sybase Server name

For that you Need to login in the Sybase Server and after that you can execute the below command as :

select @@servernamego

You can also check the server name, in ASE's Errorlog, interfaces and RUN server file.

Top ten table usage wise in a database?

Page 16: Wiki Sybase

Top Ten Crucial table in master database :

1. sysdevices 2. sysdatabases 3. sysusages 4. sysconfigure 5. syslogins 6. syssrvroles 7. sysloginroles 8. sysservers 9. sysresourcelimit 10. sysremotelogins

Related Page : What are system required databases for SYBASE ASE 12.X & 15.x?

Nice difference between Sybase and Oracle - Sybase outperforms Oracle.Survey among Sybase and Oracle customers.

1. License fees: 75% of respondents thought that Sybase ASE was less expensive, by an average of 28%.

2. Support costs: 78% of respondents thought that Sybase ASE was less expensive, by an average of 32%.

3. Number of database administrators: nobody thought that Oracle required fewer DBAs and 61% thought that Sybase required fewer DBAs. On average the saving was 32%.

4. Frequency of security patches: again, nobody thought that this was less frequent in the case of Oracle while 68% thought that this was the case with Sybase, with an average reduction of 22%.

5. Issue resolution: 73% thought that Sybase was faster at resolving issues, typically being 21% faster.

Reference: http://www.sybase.com/files/White_Papers/SYBASE_ASE_Bloor_Research_TCO_vs_Oracle.pdf

How to check the Version of Sybase Server Running?

Page 17: Wiki Sybase

Step 1: Server should be start [1]

Step 2: Login to the server [2]

Step 3: Execute select @@version .

Example:1> select @@version 2> go ------------------------------------------------------------------ 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

New Features in Sybase ASE 15.x ? MDA Installation Automaticaly.

ASE 15.x isql client can now do large network packets.

IPv6 platform support : IPv6 is now supported on IBM AIX. 15.0.2 ESD*1.

Encrypted columns : meets US Government encryption standards.

IN ASE 15.x, there are a number of partition level operations you can do. Reorgs can be done on a partition level.

ASE 15.0 and later versions no longer use vdevno. i.e. the disk init syntax doesn’t need to mention the vdevno parameter(Even earlier, it was optional).

Before 15.0, after changing a database option we need to use that database and do checkpoint on it. But ASE15.0 doesn’t need

this.

ASE 15 Cluster Edition, a high-availability version of ASE similar to Oracle’s RAC.

Dumping and loading databases with password protection:You can protect your database dump from unauthorized loads using the

password parameter of the dump database command. If you include the password parameter when you make a database dump, you must also include this password when you load the database.

Page 18: Wiki Sybase

Fast bcp: In 15.0.2, fast BCP is also allowed for indexed tables. Rest all things about bcp remain same, like select

into/bulkcopy/pllsort’ is enabled; logging only the page allocations in log etc.

Disk init syntax: Disk init syntax in 12.5 expects size parameter in K, M, and G only. From 15.0 and onwards, T (Terabyte)

can be specified.Also, pre 15.0; the maximum size of a device was 32GB

In ASE 15.0.2 IR, you can run sp_configure nondefault, which will list out, the configuration parameters set to non-default

values. It is veru usefull to check which config not using the dafult values.

Automatic update statistics : Instead of manually running update statistics at a certain time, you can set update statistics to run automatically at the time that best suits your site and avoid running it at times that hamper your system. The best time for you to run update statistics is based on the feedback from the datachange function. datachange also helps to ensure that you do not unnecessarily run update statistics.In ASE 15.0, Update statistics is not necessary after index rebuild. Also sp_recompile is not necessary after index rebuild.

Application tracing: Version 15.0.2 of ASE comes with the new feature of ‘application tracing’. Understanding this feature is a must for every DBA,because it provides a simple mechanism to figure out what your client applications are actually doing:

app tracing lets you capture the SQL submitted to the ASE server by a specific client connection, and writes it into a file.

set tracefile ‘/tmp/spid54.trace.out’ for 54 * where 54 is spid set show_sqltext on

VLDB Support: ASE 15 allows you to assign two billion logical devices to a single server, with each device up to 4 Tb in size. ASE 15 supports over 32,767 databases, and the maximum size limit for an individual database is 32 terabytes, extending the

maximum storage per ASE server to over 1 million terabytes!

Functional indexes: When applications need to search tables based on the result of a function, performance can suffer.

Functional indexes allow the server to build indexes on a table based on the result of a function. When repeated searches use that function, the results do not need to be computed from scratch.

Row-locked system catalogs :Adaptive Server version 15.0 converts most system catalogs to a datarows locking scheme. These

Page 19: Wiki Sybase

system catalogs continue to use allpages locking scheme: Materialized tables such as syslocks and sysprocesses. These tables are generated during run-time and their locking schemes are irrelavent for concurrency. sysmessages and sysusermessages, which are read-only tables. Auditing tables in sybsecurity, which are write-once and read many times.

Semantic partitions/smart partitioning: ASE 15 makes large databases easy to manage. And more efficient by allowing you to divide tables into smaller partitions which can be individually managed. You can run maintenance tasks on selected partitions

to avoid slowing overall performance, and queries run faster because ASE 15’s smart query optimizer bypasses partitions that don’t contain relevant data.

Query Processor: The Adaptive Server version 15.0 query processor is self-tuning, requiring fewer interventions than earlier versions. This version of Adaptive Server has less reliance on worktables for materialization between steps since the engine supports data flow between steps. However, more worktables could be used in cases where Adaptive Server determines that hash and merge operations are effective.

Scrollable cursors:With large data sets, filing through a mountain of results data can be difficult. ASE 15’s bi-directional scrollable cursors make it convenient to work with large result sets because your application can easily move backward and forward through a result set, one row at a time. This especially helps with Web applications that need to process large result sets but present the user with subsets of those results.

Computed columns: Often applications repeat the same calculation over and over for the same report or query. ASE 15 supports both virtual and materialized columns based on server calculations. Columns can be the computed result of other data in the table, saving that result for future repeated queries.

Query processing metrics (qp metrics):Query processing (QP) metrics identify and compare empirical metric values in query

execution. When a query is executed, it is associated with a set of defined metrics that are the basis for comparison in QP metrics.

Large identifiers:There are new limits for the length of object names or identifiers: 255 bytes for regular identifiers, and 253 bytes for delimited identifiers. The new limit applies to most user-defined identifiers including table name, column name,

index name and so on. Due to the expanded limits, some system tables (catalogs) and built-in functions have been expanded.

User-defined web services:In addition to the Web methods provided by the Adaptive Server Web Services Engine, Web Services enables you to create Web services and execute SQL commands in Adaptive Server Enterprise using either a Web browser or a SOAP

Page 20: Wiki Sybase

client. These user-defined Web services use existing security and auditing control inherent in Adaptive Server Enterprise.

How can you trace your path of error log,SYBASE ASE Server name,Back up Server name etc?Or, What is RUN Server File( RUN_SERVER_FILE) and how can we interpret it ? * Sybase ASE Server Name, Error log path location, Interface file location and Back up Serevr name stored in Run_Server_file.* Run Serevr file situated in $SYBASE/$SYBASE_ASE/install.* Name of Run Server File starts with RUN_servername. * Example : if Server Name is prod_ase then file name will be ' RUN_prod_ase.

RUN_SERVER_FILE PARAMETER INTERPRETATION -c : Configration file Information -d : Master device Information-e : Information of ErrorLog-i : Information of Interfaces file-s : Name of Serevr-z : Logical page size of server

Step by Step instruction to learn SYBASE ASE ?What are system required databases for Sybase ASE 12.X & 15.x?

What is interface file and how can it interpret?

How to log in Sybase ASE server ?

How to check the Sybase Server Name

How can you trace your path of error log,SYBASE ASE Server name,Back up Server name etc?

How to initialize database device ?

How to create database ?

How to drop devices ?

Page 21: Wiki Sybase

How to install SYBASE ASE in console mode ?

Contents[hide]

1 Installing SYBASE ASE 15.5 Developer Edition in Fedora o 1.1 Log in Linux machine as root o 1.2 Adding SYBASE Account o 1.3 Allocating shared max memory in Operating System o 1.4 Un-tarring ase tar file o 1.5 Installation o 1.6 Building or Configuration of SYBASE ASE Server

Installing SYBASE ASE 15.5 Developer Edition in Fedora

There are given below steps for installing SYBASE ASE 15.5 Developer free edition in Linux:

Download software from sybase. Creating lgoin name of sybase in Linux machine. Expanding Shared max memory at lease 64 MB. login as sybase account and untarring dounloaded tar file. Installing SYBASE ASE in Linux machine. Installer ask for Building Server .

Log in Linux machine as root[tuxdistro@localhost t] su rootpassword:

Adding SYBASE Account[root@localhost t] adduser sybase

Allocating shared max memory in Operating System [root@localhost t] cd /[root@localhost /] cd etc[root@localhost /][root@localhost /][root@localhost etc]# sysctl -a |grep shmmax /* find out current value of shared max memory */kernel.shmmaxvi = 33108864[root@localhost etc]# vi sysctl.conf /* manually adding kernel.shmmax = 77108864 in EOF*/[root@localhost etc]# sysctl -p sysctl.confnet.ipv4.ip_forward = 0net.ipv4.conf.default.rp_filter = 1

Page 22: Wiki Sybase

net.ipv4.conf.default.accept_source_route = 0kernel.sysrq = 0kernel.core_uses_pid = 1kernel.shmmax = 77108864 /*It is varied , here it should be 64 MB*/[root@localhost etc]# sysctl -a |grep shmmaxkernel.shmmaxvi = 77108864 df -k /*show space of disk in kilobyte*/df -h /*show space of disk in gigabyte human readble format. (df -h .is not compatible to all version )*/

Un-tarring ase tar file [root@localhost etc] su sybase[sybase@localhost etc] tar -xvf ase155esd2_linuxx86.tgz /* it will make archives,ASE-ThirdPartyLegal.pdf,setup.bin,ase155esd2_linuxx86.tgz,sample_response.txt,sysam_utilities */

Installation [sybase@localhost etc] cd /home/Desktop /* Reach out in that location*/[sybase@localhost Desktop] ./setup.bin -i console /* some time it runs ./setup -console */Preparing to install...Extracting the JRE from the installer archive...Unpacking the JRE...Extracting the installation resources from the installer archive...Configuring the installer for this system's environment...Launching installer...Preparing CONSOLE Mode Installation...Sybase Adaptive Server Enterprise Suite (created with InstallAnywhere)Intro------------InstallAnywhere will guide you through the installation of Sybase Adaptive Server Enterprise Suite 15.5 ESD2.It is strongly recommended that you quit all programs before continuing with this installation.Respond to each prompt to proceed to the next step in the installation. If youwant to change something on a previous step, type 'back'.You may cancel this installation at any time by typing 'quit'.PRESS <ENTER> TO CONTINUE: Choose Install Folder---------------------Where would you like to install?Default Install Folder: /home/sybase/SYBASE_ASEENTER AN ABSOLUTE PATH, OR PRESS <ENTER> TO ACCEPT THE DEFAULT: The directory /home/sybase/SYBASE_ASE does not exist. Do you want to create it?(Y/N): Y Choose Install Set------------------Please choose the Install Set to be installed by this installer.->1- Typical2- Full3- Customize...

Page 23: Wiki Sybase

ENTER THE NUMBER FOR THE INSTALL SET, OR PRESS <ENTER> TO ACCEPT THE DEFAULT: Software License Type Selection-------------------------------What would you like to do?->1- Install licensed copy of Sybase Adaptive Server Enterprise Suite2- Install Free Developer Edition of Sybase Adaptive Server Enterprise Suite3- Install Express Edition of Sybase Adaptive Server Enterprise Suite4- Evaluate Sybase Adaptive Server Enterprise SuiteEnter one of the options above: 2End-user license agreement--------------------------1) All regionsPlease enter the number of the location you are installing. (1-1) (DEFAULT: 1): IMPORTANT - READ CAREFULLY BEFORE USING THE ACCOMPANYING SOFTWARESYBASE(R) ADAPTIVE SERVER(R) ENTERPRISEDEVELOPER'S EDITION v15.5.xLICENSE AGREEMENTNOTICE TO USER: BY INSTALLING OR USING THIS SOFTWARE YOU ACCEPT ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT. PLEASE READ IT CAREFULLY.THE FOLLOWING TERMS AND CONDITIONS ("AGREEMENT") SHALL GOVERN YOUR INSTALLATION AND USE OF THE ACCOMPANYING ADAPTIVE SERVER ENTERPRISE DEVELOPER'S EDITION v15.5.x SOFTWARE PROGRAM, DOCUMENTATION AND RELATED EXPLANATORY MATERIALS (THE "PROGRAM"). BY INSTALLING AND USING THE PROGRAM YOU AGREE TO ABIDE BY THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT ACCEPT OR AGREE WITH THESE TERMS, YOU MAY NOT INSTALL OR USE THE PROGRAM.YOU ARE REQUIRED TO ACCEPT THE TERMS OF THE AGREEMENT BEFOREPress ENTER to read the text [Type 'back' and press ENTER to skip the text] : I agree to the terms of the Sybase license for the install location specified. (Y/N): YPre-Installation Summary------------------------Please Review the Following Before Continuing:Product Name:Sybase Adaptive Server Enterprise SuiteInstall Folder:/home/sybase/SYBASE_ASEProduct Features:Adaptive Server Enterprise,Open Client,DB-Library,jConnect 6.0 for JDBC,jConnect 7.0 for JDBC,Interactive SQL,QPTune,Sybase Central,Adaptive Server Plug-in,SySAM Plug-in,Agent Management Console,SySAM License Utilities,Unified Agent,

Page 24: Wiki Sybase

ASE Agent Plug-in,ASE ODBC DriverDisk Space Information (for Installation Target): Required: 1,141,741,287 bytesAvailable: 2,447,298,560 bytesReady To Install----------------InstallAnywhere is now ready to install Sybase Adaptive Server Enterprise Suiteonto your system at the following location:/home/sybase/SYBASE_ASEPRESS <ENTER> TO INSTALL: Installing...[==================|==================|==================|==================][------------------|------------------|------------------|------------------]===============================================================================Remember ASE Password---------------------ASE Plug-in has the option to "remember passwords after connecting to servers".The passwords are encrypted and stored on a per-user basis. If for security reasons you do not want ASE Plug-in to store any passwords, you can disable this feature.->1- Enable2- DisableEnter one of the options above: 1===============================================================================

Building or Configuration of SYBASE ASE Server Configure New Servers---------------------The Sybase Adaptive Server Enterprise Suite contains product(s) that needs to configure. At this point in the installation you can choose to configure the product(s). If you choose to configure the product(s) on this screen, you willbe given the option to specify custom values for each product. If you do not choose to configure the product(s) at this time, you can configure them using the configuration utility at a later time.Please deselectany products that you do not want to configure now :[X] 1 - Configure new Adaptive Server[X] 2 - Configure new Backup Server[X] 3 - Configure new Monitor Server[X] 4 - Configure new XP Server[X] 5 - Configure new Job Scheduler[X] 6 - Enable Self Management[X] 7 - Configure Web Services[X] 8 - Configure Unified AgentTo select an item enter its number, or 0 when you are finished: (DEFAULT: 0): 3[X] 1 - Configure new Adaptive Server[X] 2 - Configure new Backup Server[ ] 3 - Configure new Monitor Server[X] 4 - Configure new XP Server[X] 5 - Configure new Job Scheduler

Page 25: Wiki Sybase

[X] 6 - Enable Self Management[X] 7 - Configure Web Services[X] 8 - Configure Unified AgentTo select an item enter its number, or 0 when you are finished: (DEFAULT: 0): 4[X] 1 - Configure new Adaptive Server[X] 2 - Configure new Backup Server[ ] 3 - Configure new Monitor Server[ ] 4 - Configure new XP Server[X] 5 - Configure new Job Scheduler[X] 6 - Enable Self Management[X] 7 - Configure Web Services[X] 8 - Configure Unified AgentTo select an item enter its number, or 0 when you are finished: (DEFAULT: 0): 5[X] 1 - Configure new Adaptive Server[X] 2 - Configure new Backup Server[ ] 3 - Configure new Monitor Server[ ] 4 - Configure new XP Server[ ] 5 - Configure new Job Scheduler[ ] 6 - Enable Self Management[X] 7 - Configure Web Services[X] 8 - Configure Unified AgentTo select an item enter its number, or 0 when you are finished: (DEFAULT: 0): 7[X] 1 - Configure new Adaptive Server[X] 2 - Configure new Backup Server[ ] 3 - Configure new Monitor Server[ ] 4 - Configure new XP Server[ ] 5 - Configure new Job Scheduler[ ] 6 - Enable Self Management[ ] 7 - Configure Web Services[X] 8 - Configure Unified AgentTo select an item enter its number, or 0 when you are finished: (DEFAULT: 0): 8[X] 1 - Configure new Adaptive Server[X] 2 - Configure new Backup Server[ ] 3 - Configure new Monitor Server[ ] 4 - Configure new XP Server[ ] 5 - Configure new Job Scheduler[ ] 6 - Enable Self Management[ ] 7 - Configure Web Services[ ] 8 - Configure Unified AgentTo select an item enter its number, or 0 when you are finished: (DEFAULT: 0): ===============================================================================Configure New Adaptive Server-----------------------------Adaptive Server Name (DEFAULT: LOCALHOST): ASE1Port Number (DEFAULT: 5000): Error Log (DEFAULT: /home/sybase/SYBASE_ASE/ASE-15_0/install/LOCALHOST.log): /home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1.logApplication Type->1- Mixed (OLTP/DSS)2- Online Transaction Proccessing (OLTP)3- Decision Support Systems (DSS)

Page 26: Wiki Sybase

Select an application type: 1Page Size1- 2k->2- 4k3- 8k4- 16kSelect a page size: 2Warning: You have selected 4k as the logical page size for theAdaptive Server. If you plan to load dump from another database,make sure this logical page size matches the size of the sourcedatabase. The default logical page size in previous Adaptive Serverversions was 2KB.Master Device (DEFAULT: /home/sybase/SYBASE_ASE/data/master.dat): Master Device Size (MB) (DEFAULT: 60): Master Database Size (MB) (DEFAULT: 26): System Procedure Device (DEFAULT: /home/sybase/SYBASE_ASE/data/sysprocs.dat): System Procedure Device Size (MB) (DEFAULT: 152): System Procedure Database Size (MB) (DEFAULT: 152): System Device (DEFAULT: /home/sybase/SYBASE_ASE/data/sybsysdb.dat): System Device Size (MB) (DEFAULT: 6): System Database Size (MB) (DEFAULT: 6): Tempdb Device (DEFAULT: /home/sybase/SYBASE_ASE/data/tempdbdev.dat): Tempdb Device Size (MB) (DEFAULT: 100): Tempdb Database Size (MB) (DEFAULT: 100): Enable PCI->1- No2- YesDo you want to configure PCI/JAVA?: Optimize ASE Configuration->1- No2- YesDo you want to optimize ASE configuration?: ===============================================================================Configure New Backup Server---------------------------Backup Server Name (DEFAULT: ASE1_BS): Port Number (DEFAULT: 5001): Error Log (DEFAULT: /home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1_BS.log): ===============================================================================Configure New Servers Summary-----------------------------Adaptive ServerAdaptive Server Name ASE1Port Number 5000Application Type Mixed (OLTP/DSS)Page Size 4kError Log

/home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1.logMaster Device /home/sybase/SYBASE_ASE/data/master.datMaster Device Size (MB) 60Master Database Size (MB) 26System Procedure Device

/home/sybase/SYBASE_ASE/data/sysprocs.datSystem Procedure Device Size (MB) 152

Page 27: Wiki Sybase

System Procedure Database Size (MB) 152System Device

/home/sybase/SYBASE_ASE/data/sybsysdb.datSystem Device Size (MB) 6System Database Size (MB) 6Tempdb Device

/home/sybase/SYBASE_ASE/data/tempdbdev.datTempdb Device Size (MB) 100Tempdb Database Size (MB) 100Backup ServerBackup Server Name ASE1_BSPort Number 5001Error Log

/home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1_BS.logDo you want to continue? (DEFAULT: yes): ===============================================================================Configure New Adaptive Server-----------------------------Warning: You have selected '4k' as the logical page size for the AdaptiveServer. If you plan to load dump from another database, make sure this logicalpage size matches the size of the source database. The default logical pagesize in previous Adaptive Server versions was 2KB.Building Adaptive Server 'ASE1':Writing entry into directory services...Directory services entry complete.Building master device...Master device complete.Writing RUN_ASE1 file...RUN_ASE1 file complete.Starting server...Server started.Building sysprocs device and sybsystemprocs database...sysprocs device and sybsystemprocs database created.Running installmaster script to install system stored procedures...installmaster: 10% complete.installmaster: 20% complete.installmaster: 30% complete.installmaster: 40% complete.installmaster: 50% complete.installmaster: 60% complete.installmaster: 70% complete.installmaster: 80% complete.installmaster: 90% complete.installmaster: 100% complete.installmaster script complete.Creating two-phase commit database...Two phase commit database complete.Extending tempdb database ...Extending tempdb database complete.Installing common character sets (Code Page 437, Code Page 850, ISO Latin-1,Macintosh and HP Roman-8)...Character sets installed.Setting server name in Adaptive Server...Server name added.Server 'ASE1' was successfully created.

Page 28: Wiki Sybase

===============================================================================Configure New Backup Server---------------------------Building Backup Server 'ASE1_BS':Writing entry into directory services...Directory services entry complete.Writing RUN_ASE1_BS file...RUN_ASE1_BS file complete.Starting server...Server started.Server 'ASE1_BS' was successfully created.===============================================================================Installation Completed----------------------The installation was successful.Please check regularly for updates at http://www.sybase.com/downloads.If you have not done so, please go to https://sybase.subscribenet.com to obtainthe Sybase software licenses.PRESS <ENTER> TO EXIT THE INSTALLER: [sybase@localhost t]$ showserverF S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD0 S sybase 8812 8811 0 80 0 - 1973 sys_po 14:24 pts/1 00:00:00 /home/sybase/SYBASE_ASE/ASE-15_0/bin/backupserver -e/home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1_BS.log -N25 -C20 -M/home/sybase/SYBASE_ASE/ASE-15_0/bin/sybmultbuf -SASE1_BS0 S sybase 8771 8770 1 80 0 - 45769 select 14:24 ? 00:00:13 /home/sybase/SYBASE_ASE/ASE-15_0/bin/dataserver -sASE1 -d/home/sybase/SYBASE_ASE/data/master.dat -e/home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1.log - c/home/sybase/SYBASE_ASE/ASE-15_0/ASE1.cfg -M/home/sybase/SYBASE_ASE/ASE-15_0[sybase@localhost t]$ ps -eaf|grep datas /* Checking Running status of SYBASE ASE */sybase 8770 1 0 14:24 pts/1 00:00:00 sh -c /home/sybase/SYBASE_ASE/ASE-15_0/bin/dataserver -sASE1 - d/home/sybase/SYBASE_ASE/data/master.dat -e/home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1.log - c/home/sybase/SYBASE_ASE/ASE-15_0/ASE1.cfg -M/home/sybase/SYBASE_ASE/ASE-15_0 > /dev/null 2>&1 sybase 8771 8770 1 14:24 ? 00:00:13 /home/sybase/SYBASE_ASE/ASE-15_0/bin/dataserver -sASE1 - d/home/sybase/SYBASE_ASE/data/master.dat -e/home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1.log - c/home/sybase/SYBASE_ASE/ASE-15_0/ASE1.cfg -M/home/sybase/SYBASE_ASE/ASE-15_0sybase 9730 20657 0 14:36 pts/1 00:00:00 grep datas[sybase@localhost t]$ isql -Usa -SASE1Password: 1> select @@servername /*Confirming Name of Server */2> go------------------------------------------------------------ ASE1 (1 row affected)1> select getdate()2> go--------------------------

Page 29: Wiki Sybase

Apr 18 2012 2:37PM (1 row affected)1>exit

How to install SYBASE ASE in console mode ?

Contents[hide]

1 Installing SYBASE ASE 15.5 Developer Edition in Fedora o 1.1 Log in Linux machine as root o 1.2 Adding SYBASE Account o 1.3 Allocating shared max memory in Operating System o 1.4 Un-tarring ase tar file o 1.5 Installation o 1.6 Building or Configuration of SYBASE ASE Server

Installing SYBASE ASE 15.5 Developer Edition in Fedora

There are given below steps for installing SYBASE ASE 15.5 Developer free edition in Linux:

Download software from sybase. Creating lgoin name of sybase in Linux machine. Expanding Shared max memory at lease 64 MB. login as sybase account and untarring dounloaded tar file. Installing SYBASE ASE in Linux machine. Installer ask for Building Server .

Log in Linux machine as root[tuxdistro@localhost t] su rootpassword:

Adding SYBASE Account[root@localhost t] adduser sybase

Allocating shared max memory in Operating System [root@localhost t] cd /[root@localhost /] cd etc[root@localhost /][root@localhost /][root@localhost etc]# sysctl -a |grep shmmax /* find out current value of shared max memory */kernel.shmmaxvi = 33108864

Page 30: Wiki Sybase

[root@localhost etc]# vi sysctl.conf /* manually adding kernel.shmmax = 77108864 in EOF*/[root@localhost etc]# sysctl -p sysctl.confnet.ipv4.ip_forward = 0net.ipv4.conf.default.rp_filter = 1net.ipv4.conf.default.accept_source_route = 0kernel.sysrq = 0kernel.core_uses_pid = 1kernel.shmmax = 77108864 /*It is varied , here it should be 64 MB*/[root@localhost etc]# sysctl -a |grep shmmaxkernel.shmmaxvi = 77108864 df -k /*show space of disk in kilobyte*/df -h /*show space of disk in gigabyte human readble format. (df -h .is not compatible to all version )*/

Un-tarring ase tar file [root@localhost etc] su sybase[sybase@localhost etc] tar -xvf ase155esd2_linuxx86.tgz /* it will make archives,ASE-ThirdPartyLegal.pdf,setup.bin,ase155esd2_linuxx86.tgz,sample_response.txt,sysam_utilities */

Installation [sybase@localhost etc] cd /home/Desktop /* Reach out in that location*/[sybase@localhost Desktop] ./setup.bin -i console /* some time it runs ./setup -console */Preparing to install...Extracting the JRE from the installer archive...Unpacking the JRE...Extracting the installation resources from the installer archive...Configuring the installer for this system's environment...Launching installer...Preparing CONSOLE Mode Installation...Sybase Adaptive Server Enterprise Suite (created with InstallAnywhere)Intro------------InstallAnywhere will guide you through the installation of Sybase Adaptive Server Enterprise Suite 15.5 ESD2.It is strongly recommended that you quit all programs before continuing with this installation.Respond to each prompt to proceed to the next step in the installation. If youwant to change something on a previous step, type 'back'.You may cancel this installation at any time by typing 'quit'.PRESS <ENTER> TO CONTINUE: Choose Install Folder---------------------Where would you like to install?Default Install Folder: /home/sybase/SYBASE_ASEENTER AN ABSOLUTE PATH, OR PRESS <ENTER> TO ACCEPT THE DEFAULT: The directory /home/sybase/SYBASE_ASE does not exist. Do you want to create it?(Y/N): Y Choose Install Set

Page 31: Wiki Sybase

------------------Please choose the Install Set to be installed by this installer.->1- Typical2- Full3- Customize...ENTER THE NUMBER FOR THE INSTALL SET, OR PRESS <ENTER> TO ACCEPT THE DEFAULT: Software License Type Selection-------------------------------What would you like to do?->1- Install licensed copy of Sybase Adaptive Server Enterprise Suite2- Install Free Developer Edition of Sybase Adaptive Server Enterprise Suite3- Install Express Edition of Sybase Adaptive Server Enterprise Suite4- Evaluate Sybase Adaptive Server Enterprise SuiteEnter one of the options above: 2End-user license agreement--------------------------1) All regionsPlease enter the number of the location you are installing. (1-1) (DEFAULT: 1): IMPORTANT - READ CAREFULLY BEFORE USING THE ACCOMPANYING SOFTWARESYBASE(R) ADAPTIVE SERVER(R) ENTERPRISEDEVELOPER'S EDITION v15.5.xLICENSE AGREEMENTNOTICE TO USER: BY INSTALLING OR USING THIS SOFTWARE YOU ACCEPT ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT. PLEASE READ IT CAREFULLY.THE FOLLOWING TERMS AND CONDITIONS ("AGREEMENT") SHALL GOVERN YOUR INSTALLATION AND USE OF THE ACCOMPANYING ADAPTIVE SERVER ENTERPRISE DEVELOPER'S EDITION v15.5.x SOFTWARE PROGRAM, DOCUMENTATION AND RELATED EXPLANATORY MATERIALS (THE "PROGRAM"). BY INSTALLING AND USING THE PROGRAM YOU AGREE TO ABIDE BY THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT ACCEPT OR AGREE WITH THESE TERMS, YOU MAY NOT INSTALL OR USE THE PROGRAM.YOU ARE REQUIRED TO ACCEPT THE TERMS OF THE AGREEMENT BEFOREPress ENTER to read the text [Type 'back' and press ENTER to skip the text] : I agree to the terms of the Sybase license for the install location specified. (Y/N): YPre-Installation Summary------------------------Please Review the Following Before Continuing:Product Name:Sybase Adaptive Server Enterprise SuiteInstall Folder:/home/sybase/SYBASE_ASEProduct Features:Adaptive Server Enterprise,Open Client,DB-Library,jConnect 6.0 for JDBC,jConnect 7.0 for JDBC,Interactive SQL,QPTune,Sybase Central,

Page 32: Wiki Sybase

Adaptive Server Plug-in,SySAM Plug-in,Agent Management Console,SySAM License Utilities,Unified Agent,ASE Agent Plug-in,ASE ODBC DriverDisk Space Information (for Installation Target): Required: 1,141,741,287 bytesAvailable: 2,447,298,560 bytesReady To Install----------------InstallAnywhere is now ready to install Sybase Adaptive Server Enterprise Suiteonto your system at the following location:/home/sybase/SYBASE_ASEPRESS <ENTER> TO INSTALL: Installing...[==================|==================|==================|==================][------------------|------------------|------------------|------------------]===============================================================================Remember ASE Password---------------------ASE Plug-in has the option to "remember passwords after connecting to servers".The passwords are encrypted and stored on a per-user basis. If for security reasons you do not want ASE Plug-in to store any passwords, you can disable this feature.->1- Enable2- DisableEnter one of the options above: 1===============================================================================

Building or Configuration of SYBASE ASE Server Configure New Servers---------------------The Sybase Adaptive Server Enterprise Suite contains product(s) that needs to configure. At this point in the installation you can choose to configure the product(s). If you choose to configure the product(s) on this screen, you willbe given the option to specify custom values for each product. If you do not choose to configure the product(s) at this time, you can configure them using the configuration utility at a later time.Please deselectany products that you do not want to configure now :[X] 1 - Configure new Adaptive Server[X] 2 - Configure new Backup Server[X] 3 - Configure new Monitor Server[X] 4 - Configure new XP Server[X] 5 - Configure new Job Scheduler[X] 6 - Enable Self Management[X] 7 - Configure Web Services[X] 8 - Configure Unified AgentTo select an item enter its number, or 0 when you are finished: (DEFAULT: 0): 3

Page 33: Wiki Sybase

[X] 1 - Configure new Adaptive Server[X] 2 - Configure new Backup Server[ ] 3 - Configure new Monitor Server[X] 4 - Configure new XP Server[X] 5 - Configure new Job Scheduler[X] 6 - Enable Self Management[X] 7 - Configure Web Services[X] 8 - Configure Unified AgentTo select an item enter its number, or 0 when you are finished: (DEFAULT: 0): 4[X] 1 - Configure new Adaptive Server[X] 2 - Configure new Backup Server[ ] 3 - Configure new Monitor Server[ ] 4 - Configure new XP Server[X] 5 - Configure new Job Scheduler[X] 6 - Enable Self Management[X] 7 - Configure Web Services[X] 8 - Configure Unified AgentTo select an item enter its number, or 0 when you are finished: (DEFAULT: 0): 5[X] 1 - Configure new Adaptive Server[X] 2 - Configure new Backup Server[ ] 3 - Configure new Monitor Server[ ] 4 - Configure new XP Server[ ] 5 - Configure new Job Scheduler[ ] 6 - Enable Self Management[X] 7 - Configure Web Services[X] 8 - Configure Unified AgentTo select an item enter its number, or 0 when you are finished: (DEFAULT: 0): 7[X] 1 - Configure new Adaptive Server[X] 2 - Configure new Backup Server[ ] 3 - Configure new Monitor Server[ ] 4 - Configure new XP Server[ ] 5 - Configure new Job Scheduler[ ] 6 - Enable Self Management[ ] 7 - Configure Web Services[X] 8 - Configure Unified AgentTo select an item enter its number, or 0 when you are finished: (DEFAULT: 0): 8[X] 1 - Configure new Adaptive Server[X] 2 - Configure new Backup Server[ ] 3 - Configure new Monitor Server[ ] 4 - Configure new XP Server[ ] 5 - Configure new Job Scheduler[ ] 6 - Enable Self Management[ ] 7 - Configure Web Services[ ] 8 - Configure Unified AgentTo select an item enter its number, or 0 when you are finished: (DEFAULT: 0): ===============================================================================Configure New Adaptive Server-----------------------------Adaptive Server Name (DEFAULT: LOCALHOST): ASE1Port Number (DEFAULT: 5000): Error Log (DEFAULT: /home/sybase/SYBASE_ASE/ASE-15_0/install/LOCALHOST.log)

Page 34: Wiki Sybase

: /home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1.logApplication Type->1- Mixed (OLTP/DSS)2- Online Transaction Proccessing (OLTP)3- Decision Support Systems (DSS)Select an application type: 1Page Size1- 2k->2- 4k3- 8k4- 16kSelect a page size: 2Warning: You have selected 4k as the logical page size for theAdaptive Server. If you plan to load dump from another database,make sure this logical page size matches the size of the sourcedatabase. The default logical page size in previous Adaptive Serverversions was 2KB.Master Device (DEFAULT: /home/sybase/SYBASE_ASE/data/master.dat): Master Device Size (MB) (DEFAULT: 60): Master Database Size (MB) (DEFAULT: 26): System Procedure Device (DEFAULT: /home/sybase/SYBASE_ASE/data/sysprocs.dat): System Procedure Device Size (MB) (DEFAULT: 152): System Procedure Database Size (MB) (DEFAULT: 152): System Device (DEFAULT: /home/sybase/SYBASE_ASE/data/sybsysdb.dat): System Device Size (MB) (DEFAULT: 6): System Database Size (MB) (DEFAULT: 6): Tempdb Device (DEFAULT: /home/sybase/SYBASE_ASE/data/tempdbdev.dat): Tempdb Device Size (MB) (DEFAULT: 100): Tempdb Database Size (MB) (DEFAULT: 100): Enable PCI->1- No2- YesDo you want to configure PCI/JAVA?: Optimize ASE Configuration->1- No2- YesDo you want to optimize ASE configuration?: ===============================================================================Configure New Backup Server---------------------------Backup Server Name (DEFAULT: ASE1_BS): Port Number (DEFAULT: 5001): Error Log (DEFAULT: /home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1_BS.log): ===============================================================================Configure New Servers Summary-----------------------------Adaptive ServerAdaptive Server Name ASE1Port Number 5000Application Type Mixed (OLTP/DSS)Page Size 4kError Log

/home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1.logMaster Device /home/sybase/SYBASE_ASE/data/master.dat

Page 35: Wiki Sybase

Master Device Size (MB) 60Master Database Size (MB) 26System Procedure Device

/home/sybase/SYBASE_ASE/data/sysprocs.datSystem Procedure Device Size (MB) 152System Procedure Database Size (MB) 152System Device

/home/sybase/SYBASE_ASE/data/sybsysdb.datSystem Device Size (MB) 6System Database Size (MB) 6Tempdb Device

/home/sybase/SYBASE_ASE/data/tempdbdev.datTempdb Device Size (MB) 100Tempdb Database Size (MB) 100Backup ServerBackup Server Name ASE1_BSPort Number 5001Error Log

/home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1_BS.logDo you want to continue? (DEFAULT: yes): ===============================================================================Configure New Adaptive Server-----------------------------Warning: You have selected '4k' as the logical page size for the AdaptiveServer. If you plan to load dump from another database, make sure this logicalpage size matches the size of the source database. The default logical pagesize in previous Adaptive Server versions was 2KB.Building Adaptive Server 'ASE1':Writing entry into directory services...Directory services entry complete.Building master device...Master device complete.Writing RUN_ASE1 file...RUN_ASE1 file complete.Starting server...Server started.Building sysprocs device and sybsystemprocs database...sysprocs device and sybsystemprocs database created.Running installmaster script to install system stored procedures...installmaster: 10% complete.installmaster: 20% complete.installmaster: 30% complete.installmaster: 40% complete.installmaster: 50% complete.installmaster: 60% complete.installmaster: 70% complete.installmaster: 80% complete.installmaster: 90% complete.installmaster: 100% complete.installmaster script complete.Creating two-phase commit database...Two phase commit database complete.Extending tempdb database ...Extending tempdb database complete.Installing common character sets (Code Page 437, Code Page 850, ISO Latin-1,Macintosh and HP Roman-8)...

Page 36: Wiki Sybase

Character sets installed.Setting server name in Adaptive Server...Server name added.Server 'ASE1' was successfully created.===============================================================================Configure New Backup Server---------------------------Building Backup Server 'ASE1_BS':Writing entry into directory services...Directory services entry complete.Writing RUN_ASE1_BS file...RUN_ASE1_BS file complete.Starting server...Server started.Server 'ASE1_BS' was successfully created.===============================================================================Installation Completed----------------------The installation was successful.Please check regularly for updates at http://www.sybase.com/downloads.If you have not done so, please go to https://sybase.subscribenet.com to obtainthe Sybase software licenses.PRESS <ENTER> TO EXIT THE INSTALLER: [sybase@localhost t]$ showserverF S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD0 S sybase 8812 8811 0 80 0 - 1973 sys_po 14:24 pts/1 00:00:00 /home/sybase/SYBASE_ASE/ASE-15_0/bin/backupserver -e/home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1_BS.log -N25 -C20 -M/home/sybase/SYBASE_ASE/ASE-15_0/bin/sybmultbuf -SASE1_BS0 S sybase 8771 8770 1 80 0 - 45769 select 14:24 ? 00:00:13 /home/sybase/SYBASE_ASE/ASE-15_0/bin/dataserver -sASE1 -d/home/sybase/SYBASE_ASE/data/master.dat -e/home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1.log - c/home/sybase/SYBASE_ASE/ASE-15_0/ASE1.cfg -M/home/sybase/SYBASE_ASE/ASE-15_0[sybase@localhost t]$ ps -eaf|grep datas /* Checking Running status of SYBASE ASE */sybase 8770 1 0 14:24 pts/1 00:00:00 sh -c /home/sybase/SYBASE_ASE/ASE-15_0/bin/dataserver -sASE1 - d/home/sybase/SYBASE_ASE/data/master.dat -e/home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1.log - c/home/sybase/SYBASE_ASE/ASE-15_0/ASE1.cfg -M/home/sybase/SYBASE_ASE/ASE-15_0 > /dev/null 2>&1 sybase 8771 8770 1 14:24 ? 00:00:13 /home/sybase/SYBASE_ASE/ASE-15_0/bin/dataserver -sASE1 - d/home/sybase/SYBASE_ASE/data/master.dat -e/home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1.log - c/home/sybase/SYBASE_ASE/ASE-15_0/ASE1.cfg -M/home/sybase/SYBASE_ASE/ASE-15_0sybase 9730 20657 0 14:36 pts/1 00:00:00 grep datas[sybase@localhost t]$ isql -Usa -SASE1Password: 1> select @@servername /*Confirming Name of Server */2> go------------------------------------------------------------ ASE1

Page 37: Wiki Sybase

(1 row affected)1> select getdate()2> go-------------------------- Apr 18 2012 2:37PM (1 row affected)1>exit

How to built SYBASE ASE server from resource file?

Contents[hide]

1 How to built server from 'srvbulidres' utility? o 1.1 Installing SYBASE ASE o 1.2 Including environment variable o 1.3 Loacting sample_resousce_file folde o 1.4 Copying Resource server file o 1.5 Viewing resource Server file information (Before Editing) o 1.6 Viewing resource Server file information (After Editing) o 1.7 Checkout srvbuildres command version o 1.8 Building server from srvbuildres command o 1.9 Running Server status o 1.10 Log-in to new created server

How to built server from 'srvbulidres' utility?

Thease are following given below step to built server from srvbulidres utlity :

Installed SYBASE ASE. Enable environment variable. /*(by default it is in directory where sybase installed. */ Loacte sample_resource_file: srvbuild.adaptive_server.rs (by default <DIR>:

$SYBASE/$SYBASE_ASE/init/sample_resource_files) Make a duplicate copy of

$SYBASE/$SYBASE_ASE/init/sample_resource_files/srvbuild.adaptive_server.rs -- (srvbuild.adaptive_server_Dev1.rs)

Pass required parameter in duplicate file for buliding server (in srvbuild.adaptive_server_Dev1.rs)

Build server

Installing SYBASE ASE Installation [[1]]

Page 38: Wiki Sybase

Including environment variable [sybase@localhost ~]$cd sybase[sybase@localhost ~]$ls -ltr drwxrwxr-x 8 sybase sybase 4096 Mar 23 23:43 jre32drwxr-xr-x 4 sybase sybase 4096 Mar 23 23:43 sybuninstalldrwxr-xr-x 2 sybase sybase 4096 Mar 23 23:43 Sybase_Install_Registrydrwxrwxr-x 3 sybase sybase 4096 Mar 23 23:43 collatedrwxrwxr-x 59 sybase sybase 4096 Mar 23 23:43 charsetsdrwxrwxr-x 4 sybase sybase 4096 Mar 23 23:43 localesdrwxrwxr-x 4 sybase sybase 4096 Mar 23 23:45 jutils-2_0drwxrwxr-x 9 sybase sybase 4096 Mar 23 23:45 jConnect-6_0drwxrwxr-x 3 sybase sybase 4096 Mar 23 23:45 jutils-3_0drwxrwxr-x 9 sybase sybase 4096 Mar 23 23:45 jConnect-7_0drwxrwxr-x 12 sybase sybase 4096 Mar 23 23:45 OCS-15_0drwxrwxr-x 2 sybase sybase 4096 Mar 23 23:45 configdrwxrwxr-x 3 sybase sybase 4096 Mar 23 23:47 DataAccessdrwxrwxr-x 8 sybase sybase 4096 Mar 23 23:47 shareddrwxrwxr-x 5 sybase sybase 4096 Mar 23 23:47 DBISQLdrwxrwxr-x 6 sybase sybase 4096 Mar 23 23:48 SYSAM-2_0drwxrwxr-x 6 sybase sybase 4096 Mar 23 23:48 AMCPdrwxrwxr-x 13 sybase sybase 4096 Mar 23 23:48 UAF-2_5drwxrwxr-x 5 sybase sybase 4096 Mar 23 23:49 ASEPdrwxrwxr-x 8 sybase sybase 4096 Mar 23 23:50 WS-15_0-rwxr-xr-x 1 sybase sybase 1390 Mar 23 23:50 SYBASE.sh-rwxr-xr-x 1 sybase sybase 1764 Mar 23 23:50 SYBASE.csh-rw-r--r-- 1 sybase sybase 936 Mar 23 23:50 SYBASE.envdrwxr-xr-x 2 sybase sybase 4096 Mar 23 23:54 log-rw-rw-r-- 1 sybase sybase 76 Mar 31 12:15 interf.old-rw-rw-r-- 1 sybase sybase 155 Mar 31 12:23 interfacesdrwxrwxr-x 19 sybase sybase 4096 Apr 15 13:38 ASE-15_0drwxrwxr-x 2 sybase sybase 4096 Apr 15 14:59 data[sybase@localhost ~]$. SYBASE.sh

Loacting sample_resousce_file folde [sybase@localhost ~]$cd $SYBASE/$SYBASE_ASE/init/sample_resource_files[sybase@localhost sample_resource_files]$ ls -ltrtotal 104-rw-r--r-- 1 sybase sybase 868 Jan 6 1998 sqlloc.rs-rw-r--r-- 1 sybase sybase 179 Jan 14 2000 sqlupgrade.backup_server.rs-rw-r--r-- 1 sybase sybase 294 Jan 14 2000 sqlupgrade.monitor_server.rs-rw-r--r-- 1 sybase sybase 401 Jan 26 2000 srvbuild.xp_server.rs-rw-r--r-- 1 sybase sybase 671 Jul 14 2004 srvbuild.text_server.rs-rw-r--r-- 1 sybase sybase 959 Apr 13 2005 srvbuild.job_scheduler.rs-rw-r--r-- 1 sybase sybase 621 Mar 5 2009 srvbuild.backup_server.rs-rw-r--r-- 1 sybase sybase 283 Jun 28 2009 sqlupgrade.adaptive_server.rs-rw-r--r-- 1 sybase sybase 1822 Sep 1 2009 srvbuild.adaptive_server.rs It is SYBASE ASE resource server file. -rw-r--r-- 1 sybase sybase 562 Feb 21 2010 srvbuild.monitor_server.rs-rw-r--r-- 1 sybase sybase 3658 Aug 26 2010 auditinit.res-rw-rw-r-- 1 sybase sybase 825 Mar 31 12:12 PRDO_ASE.rs-rw-r--r-- 1 sybase sybase 547 Mar 31 12:23 srvbuild.backup_server.rs_new

Copying Resource server file [sybase@localhost sample_resource_files]$ cp srvbuild.adaptive_server.rs srvbuild.adaptive_server.rs_DEV1

Page 39: Wiki Sybase

Viewing resource Server file information (Before Editing)[sybase@localhost sample_resource_files]$ cat srvbuild.adaptive_server.rs_DEV1sybinit.release_directory: USE_DEFAULTsybinit.product: sqlsrvsqlsrv.server_name: PUT_YOUR_SERVER_NAME_HEREsqlsrv.new_config: yessqlsrv.do_add_server: yessqlsrv.network_protocol_list: tcpsqlsrv.network_hostname_list: PUT_YOUR_HOSTNAME_HEREsqlsrv.network_port_list: PUT_YOUR_PORT_NUMBER_HEREsqlsrv.application_type: USE_DEFAULTsqlsrv.server_page_size: USE_DEFAULTsqlsrv.force_buildmaster: nosqlsrv.master_device_physical_name: PUT_THE_PATH_OF_YOUR_MASTER_DEVICE_HEREsqlsrv.master_device_size: USE_DEFAULTsqlsrv.master_database_size: USE_DEFAULTsqlsrv.errorlog: USE_DEFAULTsqlsrv.do_upgrade: nosqlsrv.sybsystemprocs_device_physical_name: PUT_THE_PATH_OF_YOUR_SYBSYSTEMPROCS_DEVICE_HEREsqlsrv.sybsystemprocs_device_size: USE_DEFAULTsqlsrv.sybsystemprocs_database_size: USE_DEFAULTsqlsrv.sybsystemdb_device_physical_name: PUT_THE_PATH_OF_YOUR_SYBSYSTEMDB_DEVICE_HERE_OR_REMOVE_THIS_LINEsqlsrv.sybsystemdb_device_size: USE_DEFAULTsqlsrv.sybsystemdb_database_size: USE_DEFAULTsqlsrv.tempdb_device_physical_name: PUT_THE_PATH_OF_YOUR_TEMPDB_DEVICE_HERE_OR_REMOVE_THIS_LINEsqlsrv.tempdb_device_size: USE_DEFAULTsqlsrv.tempdb_database_size: USE_DEFAULTsqlsrv.default_backup_server: PUT_YOUR_BACKUP_SERVER_NAME_HERE#sqlsrv.addl_cmdline_parameters: PUT_ANY_ADDITIONAL_COMMAND_LINE_PARAMETERS_HEREsqlsrv.do_configure_pci: nosqlsrv.sybpcidb_device_physical_name: PUT_THE_PATH_OF_YOUR_SYBPCIDB_DATA_DEVICE_HEREsqlsrv.sybpcidb_device_size: USE_DEFAULTsqlsrv.sybpcidb_database_size: USE_DEFAULT# If sqlsrv.do_optimize_config is set to yes, both sqlsrv.avail_physical_memory and sqlsrv.avail_cpu_num need to be set.sqlsrv.do_optimize_config: nosqlsrv.avail_physical_memory: PUT_THE_AVAILABLE_PHYSICAL_MEMORY_FOR_ASE_IN_OPTIMIZATIONsqlsrv.avail_cpu_num: PUT_THE_AVAILABLE_NUMBER_CPU_FOR_ASE_IN_OPTIMIZATION

Viewing resource Server file information (After Editing)'Edited values are Bold'sybase@localhost sample_resource_files]$ cat srvbuild.adaptive_server.rs_DEV1sybinit.release_directory: /opt/sybase/15sybinit.product: sqlsrvsqlsrv.server_name: DEV1sqlsrv.new_config: yessqlsrv.do_add_server: yessqlsrv.network_protocol_list: tcpsqlsrv.network_hostname_list: localhostsqlsrv.network_port_list: 8000

Page 40: Wiki Sybase

sqlsrv.application_type: USE_DEFAULTsqlsrv.server_page_size: USE_DEFAULTsqlsrv.force_buildmaster: nosqlsrv.master_device_physical_name: /opt/sybase/ASE/data/master_DEV1.devsqlsrv.master_device_size: USE_DEFAULTsqlsrv.master_database_size: USE_DEFAULTsqlsrv.errorlog: USE_DEFAULTsqlsrv.do_upgrade: nosqlsrv.sybsystemprocs_device_physical_name: /opt/sybase/ASE/data/sysprocdev_DEV1.devsqlsrv.sybsystemprocs_device_size: USE_DEFAULTsqlsrv.sybsystemprocs_database_size: USE_DEFAULTsqlsrv.default_backup_server: PROD_ASE_BS1sqlsrv.do_configure_pci: nosqlsrv.do_optimize_config: no

Checkout srvbuildres command version[sybase@localhost sample_resource_files]$ srvbuildres -vsrvbuildres/15.5 ESD #2/P/Linux Intel/Linux 2.6.9-55.ELsmp i686/EBF 18159 SMP/OPT/Wed Aug 25 12:18:43 PDT 2010Confidential property of Sybase, Inc.Copyright 1997 - 2010Sybase, 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 bythe U.S. Government is subject to restrictions set forth in a licenseagreement between the Government and Sybase, Inc. or other writtenagreement specifying the rights of the Government to use the softwareand any applicable FAR provisions, for example, FAR 52.227-19.Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA.

Building server from srvbuildres command [sybase@localhost sample_resource_files]$ srvbuildres -r srvbuild.adaptive_server.rs_DEV1/opt/sybase/ASE/data is not a directory. /*Common Error -- Directory is not created*//opt/sybase/ASE/data is not a directory. /* Common Error -- Directory is not created */[sybase@localhost sample_resource_files]$ mkdir /opt/sybase/15/ASE /*Creating Directory*/[sybase@localhost sample_resource_files]$ mkdir /opt/sybase/15/ASE/data /*Creating Directory*/[sybase@localhost sample_resource_files]$ srvbuildres -r srvbuild.adaptive_server.rs_DEV1Building Adaptive Server 'DEV1':Writing entry into directory services...Directory services entry complete.Building master device...Master device complete.Writing RUN_DEV1 file...RUN_DEV1 file complete.Starting server...Server started.Building sysprocs device and sybsystemprocs database...sysprocs device and sybsystemprocs database created.

Page 41: Wiki Sybase

Running installmaster script to install system stored procedures...installmaster: 10% complete.installmaster: 20% complete.installmaster: 30% complete.installmaster: 40% complete.installmaster: 50% complete.installmaster: 60% complete.installmaster: 70% complete.installmaster: 80% complete.installmaster: 90% complete.installmaster: 100% complete.installmaster script complete.Creating two-phase commit database...Two phase commit database complete.Installing common character sets (Code Page 437, Code Page 850, ISO Latin-1,Macintosh and HP Roman-8)...Character sets installed.Setting server name in Adaptive Server...Server name added.Server 'DEV1' was successfully created.

Running Server status sybase@localhost sample_resource_files]$ showserverF S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD0 S sybase 7960 7959 16 75 0 - 44840 - 21:31 ? 00:00:02 /opt/sybase/15/ASE-15_0/bin/dataserver -sDEV1 - d/opt/sybase/15/ASE/data/master_Dev1.dev -e/opt/sybase/15/ASE-15_0/install/DEV1.log -c/opt/sybase/15/ASE-15_0/DEV1.cfg - M/opt/sybase/15/ASE-15_0

Log-in to new created server [sybase@localhost sample_resource_files]$ isql -Usa -SDEV1Password:1> select @@Servername,getdate()2> go------------------------------------------------------------ --------------------------DEV1 Apr 17 2012 11:34PM

What are static and dynamic parameters and what is diffenence between syscurconfigs and sysconfigures?Configuration parameteres are those params which set behaviour of SYBASE ASE. It stores in configuration file .

There are two type of configuration parameter in SYBASE ASE.

Page 42: Wiki Sybase

1. static params  : 2. dynamic params :

1. static parameters are those parameters which require system re-boot for afftecting SYBASE ASE behaviour.These values store in sysconfigures.

1. dynamic parameters are those parameters which does not require system re-boot , afftects take place immediately and will reflect behaviour of SYBASE ASE.These values store in syscurconfigs.

Whenever server starts up configuration variables set, on the basis of, sysconfigures and make a copy as syscurconfigs.

All dynamic variables change reflect in syscurconfigs and sysconfigures.

All static variables change take place in sysconfigures.

Configuring Auditing in the Sybase ASE?

Contents[hide]

1 Add audit_data_dev, and audit_log_dev devices in server 2 create sybsecurity datababase on audit_data_dev and audit_log_dev 3 Install sybsecurity database. 4 Enable the auditing & Take restart of the server. 5 Alter the database on audit_data_dev_02 6 Using sp_addaudittabe to add new table on audit_data_dev_02. 7 See the new table created in sysobjects and take the o/p of sp_helpsegment 8 Repete 7 & 8 for audit_data_dev_02. 9 Now you need to write threshold stored proc. 10 Add thershold stored proc on each and every audit table segment ( 3 in your case) 11 Enable the auditing using sp_configure if not enabled till now

Add audit_data_dev, and audit_log_dev devices in server ----------------- SYBASE Level -------------------------1> disk init name="auditdev",physname="auditdev.dat",size="10M"2> go00:00:00000:00014:2011/08/16 21:29:50.35 kernel Initializing virtual device 15, 'auditdev.dat' with dsync 'off'.

Page 43: Wiki Sybase

00:00:00000:00014:2011/08/16 21:29:50.35 kernel Virtual device 15 started using asynchronous (with DIRECTIO) i/o.00:00:00000:00014:2011/08/16 21:29:50.37 kernel Initializing device auditdev.dat from offset 0 with zeros.00:00:00000:00014:2011/08/16 21:29:51.66 kernel Finished initialization.Warning: Relative path name 'auditdev.dat' used for physical device. Device may become unavailable if the server's current directory changes.1> disk init name="auditlogdev",physname="auditlogdev.dat",size="2M"2> go00:00:00000:00014:2011/08/16 21:30:41.63 kernel Initializing virtual device 16, 'auditlogdev.dat' with dsync 'off'.00:00:00000:00014:2011/08/16 21:30:41.63 kernel Virtual device 16 started using asynchronous (with DIRECTIO) i/o.00:00:00000:00014:2011/08/16 21:30:41.64 kernel Initializing device auditlogdev.dat from offset 0 with zeros.00:00:00000:00014:2011/08/16 21:30:41.86 kernel Finished initialization.Warning: Relative path name 'auditlogdev.dat' used for physical device. Device may become unavailable if the server's current directory changes.

create sybsecurity datababase on audit_data_dev and audit_log_dev 1> create database sybsecurity on auditdev log on auditlogdev2> go00:00:00000:00014:2011/08/16 21:31:43.04 server Timestamp for database 'sybsecurity' is (0x0000, 0x0000142a).CREATE DATABASE: allocating 1536 logical pages (3.0 megabytes) on disk 'auditdev' (1536 logical pages requested).CREATE DATABASE: allocating 1024 logical pages (2.0 megabytes) on disk 'auditlogdev' (1536 logical pages requested).Database 'sybsecurity' is now online.

Install sybsecurity database.--------------------------------- OS Level----------------------------------------------------------------[sybase@localhost install]$ cd $SYBASE/$SYBASE_ASE/scr*[sybase@localhost scripts]$ ls checksvrsuids installdbccdb installmontables installpubs3.out deckanji installdbextend installmsgsvss installsecurity eucjis installhasvss installpcidb installupgrade hs_directload.sql installjsdb installpix2 instmsgs.ebf ins_syn_sql installmaster installpubs2 iso_1 installcommit installmodel installpubs2.out sjisinstalldbccalt installmon installpubs3 uninstmsgs.ebf [sybase@localhost scripts]$ isql -Usa -P -iinstallsecurity -oinstallsecurity.out [sybase@localhost scripts]$ ----------------------------------------------------------------------------------------------Shutdown and Restart Server ------------ SYBASE ----------------------------------------------------------------------- 1>use sybsecurity 2>select name from sysobjects where name like '%aud%' 3> go

Page 44: Wiki Sybase

------------------------------------- sysauditoptions sysaudits_01

Enable the auditing & Take restart of the server.1> sp_configure auditing,12> go00:00:00000:00015:2011/08/16 21:56:47.31 server Configuration file '/home/sybase/SQL/ASE-15_0/PROD_ASE_DS1.cfg' has been written and the previous version has been renamed to '/home/sybase/SQL/ASE-15_0/PROD_ASE_DS1.030'.00:00:00000:00015:2011/08/16 21:56:47.32 server The configuration option 'auditing' has been changed by 'sa' from '0' to '1'.Parameter Name Default Memory Used Config Value Run Value Unit Type ------------------------------------------------------------ ---------------------------------------- ---------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- auditing 0 0 1 1 switch dynamic (1 row affected)Configuration option changed. ASE need not be rebooted since the option is dynamic.Changing the value of 'auditing' to '1' increases the amount of memory ASE uses by 104 K.(return status = 0)==== Add two more devices audit_data_dev_02 and audit_data_dev_03 ====1> disk init name="auditdev_02",physname="auditdev_02.dat",size='10M'2> go1> disk init name="auditdev_02",physname="auditdev_02.dat",size='10M'2> go00:00:00000:00024:2011/08/16 19:56:21.19 kernel Initializing virtual device 13, 'auditdev_02.dat' with dsync 'off'.00:00:00000:00024:2011/08/16 19:56:21.19 kernel Virtual device 13 started using asynchronous (with DIRECTIO) i/o.00:00:00000:00024:2011/08/16 19:56:21.20 kernel Initializing device auditdev_02.dat from offset 0 with zeros.00:00:00000:00024:2011/08/16 19:56:21.44 kernel Finished initialization.Warning: Relative path name 'auditdev_02.dat' used for physical device. Device may become unavailable if the server's current directory changes.

Alter the database on audit_data_dev_021> alter database sybsecurity on auditdev_022> go1> use sybsecurity2> go

Page 45: Wiki Sybase

Using sp_addaudittabe to add new table on audit_data_dev_02. 1> sp_addaudittable auditdev_022> goCreating segment 'aud_seg_02' on 'auditdev_02' device.DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.Segment created.Creating table 'sysaudits_02' on 'aud_seg_02' segment.(return status = 0)

See the new table created in sysobjects and take the o/p of sp_helpsegment 1> sp_helpdb sybsecurity2> go name db_size owner dbid created durability status ---------------------- -------------------------- ---------- ---------- ------------------------ -------------------- ---------------------------- sybsecurity 9.0 MB sa 31517 Aug 04, 2011 full no options set (1 row affected)device_fragments size usage created free kbytes ------------------------------------------------------------ -------------------------- ---------------------------------------- -------------------------------------------------- -------------------------------- auditdev 6.0 MB data only Aug 4 2011 11:39PM 2744 auditlogdev 2.0 MB log only Aug 4 2011 11:39PM not applicable auditdev_02 1.0 MB data only Aug 16 2011 8:01PM 992 ---------------------------------------------------------------------------------------------------------------------------- log only free kbytes = 1984 device segment ---------------------- -------------------- auditdev aud_seg_01 auditdev default auditdev system auditdev_02 aud_seg_02 auditdev_02 default auditdev_02 system auditlogdev logsegment (return status = 0)1> sp_helpsegment aud_seg_022> gosegment name status -------------- -------------------- ------------

Page 46: Wiki Sybase

4 aud_seg_02 0 device size free_pages ---------------------- ---------- -------------------- auditdev_02 1.0MB 248 Objects on segment 'aud_seg_02':table_name index_name indid partition_name ------------------------ ------------------------ ---------- ------------------------------ sysaudits_02 sysaudits_02 0 sysaudits_02_82 Objects currently bound to segment 'aud_seg_02':table_name index_name indid ------------------------ ------------------------ ---------- sysaudits_02 sysaudits_02 0 total_size total_pages free_pages used_pages reserved_pages ---------------------------------- ------------------------------ ------------------------------ ------------------------------ ------------------------------ 1.0MB 256 248 8 0 (return status = 0)

Repete 7 & 8 for audit_data_dev_02. 1> disk init name="auditdev_03",physname="auditdev_03.dat",size='10M'2> go00:00:00000:00024:2011/08/16 19:56:48.10 kernel Initializing virtual device 14, 'auditdev_03.dat' with dsync 'off'.00:00:00000:00024:2011/08/16 19:56:48.10 kernel Virtual device 14 started using asynchronous (with DIRECTIO) i/o.00:00:00000:00024:2011/08/16 19:56:48.11 kernel Initializing device auditdev_03.dat from offset 0 with zeros.00:00:00000:00024:2011/08/16 19:56:48.36 kernel Finished initialization.Warning: Relative path name 'auditdev_03.dat' used for physical device. Device may become unavailable if the server's current directory changes.1> use master2> go1> alter database sybsecurity on auditdev_032> goExtending database by 256 pages (1.0 megabytes) on disk auditdev_031> use sybsecurity2> go1> sp_addaudittable auditdev_032> goCreating segment 'aud_seg_03' on 'auditdev_03' device.DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.Segment created.Creating table 'sysaudits_03' on 'aud_seg_03' segment.(return status = 0)1> use sybsecurity2> go1> sp_addaudittable auditdev_032> go

Page 47: Wiki Sybase

Creating segment 'aud_seg_03' on 'auditdev_03' device.DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.Segment created.Creating table 'sysaudits_03' on 'aud_seg_03' segment.(return status = 0) 1> sp_helpdb sybsecurity 2> goname db_size owner dbid created durability status ---------------------- -------------------------- ---------- ---------- ------------------------ -------------------- ---------------------------- sybsecurity 10.0 MB sa 31517 Aug 04, 2011 full no options set (1 row affected)device_fragments size usage created free kbytes ------------------------------------------------------------ -------------------------- ---------------------------------------- auditdev 6.0 MB data only Aug 4 2011 11:39PM 2744 auditlogdev 2.0 MB log only Aug 4 2011 11:39PM not applicable auditdev_02 1.0 MB data only Aug 16 2011 8:01PM 992 auditdev_03 1.0 MB data only Aug 16 2011 8:18PM 992 ---------------------------------------------------------------------------------------------------------------------------- log only free kbytes = 1980 device segment ---------------------- -------------------- auditdev aud_seg_01 auditdev default auditdev system auditdev_02 aud_seg_02 auditdev_02 default auditdev_02 system auditdev_03 aud_seg_03 auditdev_03 default auditdev_03 system auditlogdev logsegment (return status = 0)1> sp_helpsegment aud_seg_032> gosegment name status -------------- -------------------- ------------ 5 aud_seg_03 0 device size free_pages

Page 48: Wiki Sybase

---------------------- ---------- -------------------- auditdev_03 1.0MB 248 Objects on segment 'aud_seg_03':table_name index_name indid partition_name ------------------------ ------------------------ ---------- ------------------------------ sysaudits_03 sysaudits_03 0 sysaudits_03_83 Objects currently bound to segment 'aud_seg_03':table_name index_name indid ------------------------ ------------------------ ---------- sysaudits_03 sysaudits_03 0 total_size total_pages free_pages used_pages reserved_pages ---------------------------------- ------------------------------ ------------------------------ ------------------------------ 1.0MB 256 248 8 0 (return status = 0)

Now you need to write threshold stored proc. 29> vi[sh:vi /tmp/ctisql_i4xTh5]1> create proc abh1 as2> declare @audit_table_number int3> /*4> ** Select the value of the current audit table5> */6> select @audit_table_number = scc.value7> from master.dbo.syscurconfigs scc, master.dbo.sysconfigures sc8> where sc.config=scc.config and sc.name = "current audit table"9> /*10> ** Set the next audit table to be current.11> ** When the next audit table is specified as 0,12> ** the value is automatically set to the next one.13> */14> exec sp_configure "current audit table", 0, "with truncate"15> /*16> ** Copy the audit records from the audit table17> ** that became full into another table.18> */19> if @audit_table_number = 120> begin21> truncate table sysaudits_0122> end23> else if @audit_table_number = 224> begin25> truncate table sysaudits_0226> end27> return(0)28> 29> go

Add thershold stored proc on each and every audit table segment ( 3 in your case) 1> sp_addthreshold sybsecurity,aud_seg_01,200,abh1

Page 49: Wiki Sybase

2> goAdding threshold for segment 'aud_seg_01' at '200' pages.DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.(return status = 0)1> sp_addthreshold sybsecurity,aud_seg_02,200,abh12> goA threshold at 200 pages for segment 'aud_seg_02' is too close to the maximum size of the database. Because of this, the threshold will not fire more than once per ASE re-boot. Modify the value using sp_modifythreshold to be between 0 and 191 pages.Adding threshold for segment 'aud_seg_02' at '200' pages.DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.(return status = 0)1> sp_addthreshold sybsecurity,aud_seg_03,250,abh12> goA threshold at 250 pages for segment 'aud_seg_03' is too close to the maximum size of the database. Because of this, the threshold will not fire more than once per ASE re-boot. Modify the value using sp_modifythreshold to be between 0 and 191 pages.Adding threshold for segment 'aud_seg_03' at '250' pages.DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.Warning: The specified threshold level is greater than the existing number of free pages on this segment.(return status = 0)

Varyfying(Enabling Threshold)1> sp_helpthreshold2> go segment name free pages last chance? threshold procedure ---------------------------- ------------------------ ---------------------------- ------------------------------------------ aud_seg_01 200 0 abh1 aud_seg_02 200 0 abh1 aud_seg_03 250 0 abh1 logsegment 32 1 sp_thresholdaction (4 rows affected)(return status = 0)

Enable the auditing using sp_configure if not enabled till now 1> sp_audit 'all','sa','all','on'2> goAudit option has been changed and has taken effect immediately.(return status = 0)

Configuring the DBCC DB in Sybase ASE?

Page 50: Wiki Sybase

1. Find out whether DBCCDB has been installed or Not 2. Dropped Already exist dbccdb databases3. Planning of Resources -- During a dbcc checkstorage operation, the workspaces are temporarily bound to a cache which is also used to read the target database. Using a named cache that is dedicated to dbcc minimizes the impact of the database check on other users and improves performance. You can create a separate cache for each dbcc checkstorage operation that will be run concurrently, or you can create one cache that is large enough to fit the total requirements of the concurrent operations. The size required for optimum performance depends on the size of the target database and distributions of data in that database. dbcc checkstorage requires a minimum of 640K of buffers (each buffer is one extent) per worker process in the named cache.-- Configuring named data caches does not divide the default cache into separate cache structures. The named data caches that you create can be used only by databases or database objects that are explicitly bound to them. All objects not explicitly bound to named data caches use the default data cache.-- Two workspaces are required for dbccdb: scan and text. Space requirements for the workspaces depend on the size of the largest database that will be checked. To run concurrent dbcc checkstorage operations, you need to set up additional workspaces.4. Configuring NUMBER OF WORK PROCESSES 5. Determine memory per worker Process6. Disk Initialization7. Create Database8. Installing DBCCDB database9. Cache Cofiguration and Binding it10. Creating Segment in Devices for workspace11. Creating Segment in Devices for workspace


Recommended