Vous êtes sur la page 1sur 51

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 sp_passwordpolicy sp_passwordpolicy sp_passwordpolicy "expire "expire "expire "expire role passwords", "[rolename | wildcard]" login passwords", "[login_name | wildcard]" stale role passwords", "datetime" 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 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:

Option allow password downgrade

Description 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. Value of 1 turns this option on, and a value of 0 turns it off. Indicates the minimum number of digits to be allowed in a password. Indicates the minimum number of alphabetic characters in a password.

disallow simple passwords min digits in password min alpha in password

min special char Indicates the minimum number of special characters allowed in a password. in password min upper char in password min lower char in password systemwide password expiration password exp warn interval Indicates the minimum number of upper-case characters allowed in a password Indicates the minimum number of lower case characters allowed in a password. Indicates the system-wide password expiration in days.

Indicates the password expiration warning interval in days.

Sets the minimum length of the password. minimum password length maximum failed Sets the maximum number of failed logins allowed in a session before the account is locked. logins 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

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.

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: min alpha in password: min digits in password: min upper char in password: min lower char in password: 8 2 2 2 2

To validate these options, enter:


sp_passwordpolicy 'validate password options' Validation Step Pass/Fail/NA -------------------------min alpha in password Fail 'min 'min minimum password length - 1 'min special 'min alpha in Pass Validation Test ----------------------------'min alpha in password' > = upper char in password + lower char in password' 'minimum password length' > = digits in password' + 'min char in password' + password'

minimum password length - 2 'min special 'min upper 'min lower maximum password length - 1 'min 'min 'min maximum password length 2 'min special upper lower password exp warn interval = (6 rows affected) (return status = 1)

Pass

'minimum password length' > = digits in password' + min char in password' + char in password' + char in password' 'max password length' > = digits in password' + special char in password' + alpha in password' 'max password length' > = digits in password' + 'min char in password' + 'min char in password' + 'min char in password' 'password exp warn interval' < 'systemwide password expiration'

Pass

Pass

NA

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: 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 --------------min alpha in password upper lower Pass/Fail/NA -----------Pass Validation Test ----------------------------'min alpha in password' > = 'min char in password' + 'min char in password' 'minimum password length' > = digits in password' + 'min char in password' + 'min password' 'minimum password length' > = digits in password' + 'min char in password' + 'min char in password' + 'min char in password'

minimum password length-1 'min special alpha in minimum password length-2 'min special upper lower

Fail

Fail

maximum password length-1 'min special alpha in maximum password length2 'min 'min 'min 'min password exp warn interval = (6 rows affected) (return status = 1)

Pass

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

Pass

NA

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: min alpha in password: min digits in password: min upper char in password: min lower char in password: 8 2 2 2 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 'min 'min special + 'min alpha in Pass 'minimum password length' > = digits in password' + char in password' password'

minimum password length - 2 'min special 'min upper 'min lower maximum password length - 1 'min 'min + 'min maximum password length 2 'min 'min special + 'min upper + 'min lower password exp warn interval = expiration' (6 rows affected) (return status = 1)

Pass

'minimum password length' > = digits in password' + min char in password' + char in password' + char in password' 'max password length' > = digits in password' + special char in password' alpha in password' 'max password length' > = digits in password' + char in password' char in password' char in password' 'password exp warn interval' < 'systemwide password

Pass

Pass

NA

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 'min 'min special password' + 'min alpha in minimum password length-2 'min 'min special password' + 'min upper Fail 'minimum password length' > = digits in password' + char in password' Fail 'minimum password length' > = digits in password' + char in char

in password' + 'min lower maximum password length-1 'min 'min special password' + 'min alpha in maximum password length2 'min 'min password' + 'min in password' + 'min char in password' password exp warn interval = expiration' (6 rows affected) (return status = 1) Pass

char in password' 'max password length' > = digits in password' + char in password' Pass 'max password length' > = digits in password' + special char in upper char lower

NA

'password exp warn interval' < 'systemwide password

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: min digits in password: min special char in password: min alpha in password: min upper char in password: min lower char in password: 8 11 11 11 1 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 'min 'min Fail 'minimum password length' > = digits in password' + special char in

password' + 'min password' minimum password length-2 'min 'min special password' + 'min upper in password' + 'min lower in password' maximum password length-1 'min 'min special password' + 'min alpha in maximum password length2 'min 'min special + 'min upper password' + 'min lower password' password exp warn interval = expiration' (6 rows affected) (return status = 1) Fail

alpha in

'minimum password length' > = digits in password' + char in char char

Fail

'max password length' > = digits in password' + char in password'

Pass

'max password length' > = digits in password' + char in password' char in char in

NA

'password exp warn interval' < 'systemwide password

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 ----------------------------min alpha in password Pass password' > = 'min char in password' + 'min

Validation Test --------------------------'min alpha in upper lower char in password'

minimum password length-1 = + 'min password' + password' minimum password length-2 = + 'min password' + in password' + char in password' maximum password length-1 'min 'min password' + 'min in password' maximum password length2 'min 'min password' + 'min in password' + 'min char in password' password exp warn interval < = expiration' (6 rows affected) (return status = 0)

Pass

'minimum password length' > 'min digits in password' special char in 'min alpha in

Pass

'minimum password length' > 'min digits in password' special char in 'min upper char 'min lower

Pass

'max password length' > = digits in password' + special char in 'min alpha

Pass

'max password length' > = digits in password' + special char in upper char lower

NA

'password exp warn interval' 'systemwide password

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?


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 definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # 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.

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 @@maxpagesize 2> 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_Serverfile Step 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. 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 server 1> shutdown 2> go Example : Shutting down with nowait 1> shutdown with nowait 2> 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 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. 2. 3. 4. System databases Optional databases Sample databases User defined databases

1. System Database

There are five required system databases in Sybase ASE :


1. 2. 3. 4. 5.

master DB model DB temp DB sybsystemprocs DB 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. 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 Name


How 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 @@servername go

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

Top ten table usage wise in a database?


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.p df

How to check the Version of Sybase Server Running?


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 doesnt 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 doesnt need

this.

ASE 15 Cluster Edition, a high-availability version of ASE similar to Oracles 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.

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

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 15s smart query optimizer bypasses partitions that dont 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 15s 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

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 -d -e -i -s -z : : : : : : Configration file Information Master device Information Information of ErrorLog Information of Interfaces file Name of Serevr 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 ?

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 password: root

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.conf net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 kernel.shmmax = 77108864 /*It is varied , here it should be 64 MB*/ [root@localhost etc]# sysctl -a |grep shmmax kernel.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,ASEThirdPartyLegal.pdf,setup.bin,ase155esd2_linuxx86.tgz,sample_response.txt,sys am_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 you want 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_ASE ENTER 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- Typical 2- Full 3- 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 Suite 2- Install Free Developer Edition of Sybase Adaptive Server Enterprise Suite 3- Install Express Edition of Sybase Adaptive Server Enterprise Suite 4- Evaluate Sybase Adaptive Server Enterprise Suite Enter one of the options above: 2 End-user license agreement -------------------------1) All regions Please enter the number of the location you are installing. (1-1) (DEFAULT: 1): IMPORTANT - READ CAREFULLY BEFORE USING THE ACCOMPANYING SOFTWARE SYBASE(R) ADAPTIVE SERVER(R) ENTERPRISE DEVELOPER'S EDITION v15.5.x LICENSE AGREEMENT NOTICE 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 BEFORE Press 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): Y

Pre-Installation Summary -----------------------Please Review the Following Before Continuing: Product Name: Sybase Adaptive Server Enterprise Suite Install Folder: /home/sybase/SYBASE_ASE Product 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, ASE Agent Plug-in, ASE ODBC Driver Disk Space Information (for Installation Target): Required: 1,141,741,287 bytes Available: 2,447,298,560 bytes Ready To Install ---------------InstallAnywhere is now ready to install Sybase Adaptive Server Enterprise Suite onto your system at the following location: /home/sybase/SYBASE_ASE PRESS <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- Enable 2- Disable Enter 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 will be 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 Agent To 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 [X] 6 - Enable Self Management [X] 7 - Configure Web Services [X] 8 - Configure Unified Agent To 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 Agent To 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 Agent To 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 Agent To 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 Agent To select an item enter its number, or 0 when you are finished: (DEFAULT: 0) : ============================================================================= == Configure New Adaptive Server ----------------------------Adaptive Server Name (DEFAULT: LOCALHOST): ASE1 Port 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.log Application Type ->1- Mixed (OLTP/DSS) 2- Online Transaction Proccessing (OLTP) 3- Decision Support Systems (DSS) Select an application type: 1 Page Size 1- 2k ->2- 4k 3- 8k 4- 16k Select a page size: 2 Warning: You have selected 4k as the logical page size for the Adaptive Server. If you plan to load dump from another database, make sure this logical page size matches the size of the source database. The default logical page size in previous Adaptive Server versions 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- No 2- Yes Do you want to configure PCI/JAVA?: Optimize ASE Configuration ->1- No 2- Yes Do 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 Server Adaptive Server Name ASE1 Port Number 5000 Application Type Mixed (OLTP/DSS) Page Size 4k Error Log /home/sybase/SYBASE_ASE/ASE15_0/install/ASE1.log Master Device /home/sybase/SYBASE_ASE/data/master.dat Master Device Size (MB) 60 Master Database Size (MB) 26 System Procedure Device /home/sybase/SYBASE_ASE/data/sysprocs.dat System Procedure Device Size (MB) 152 System Procedure Database Size (MB) 152 System Device /home/sybase/SYBASE_ASE/data/sybsysdb.dat System Device Size (MB) 6 System Database Size (MB) 6 Tempdb Device /home/sybase/SYBASE_ASE/data/tempdbdev.dat Tempdb Device Size (MB) 100 Tempdb Database Size (MB) 100 Backup Server Backup Server Name ASE1_BS Port Number 5001 Error Log /home/sybase/SYBASE_ASE/ASE15_0/install/ASE1_BS.log Do you want to continue? (DEFAULT: yes): ============================================================================= == Configure New Adaptive Server ----------------------------Warning: You have selected '4k' as the logical page size for the Adaptive Server. If you plan to load dump from another database, make sure this logical page size matches the size of the source database. The default logical page size 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. ============================================================================= == 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 obtain the Sybase software licenses. PRESS <ENTER> TO EXIT THE INSTALLER: [sybase@localhost t]$ showserver F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 0 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_BS 0 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/ASE15_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/ASE15_0/bin/dataserver -sASE1 d/home/sybase/SYBASE_ASE/data/master.dat -e/home/sybase/SYBASE_ASE/ASE15_0/install/ASE1.log c/home/sybase/SYBASE_ASE/ASE-15_0/ASE1.cfg -M/home/sybase/SYBASE_ASE/ASE-15_0 sybase 9730 20657 0 14:36 pts/1 00:00:00 grep datas [sybase@localhost t]$ isql -Usa -SASE1 Password: 1> select @@servername /*Confirming Name of Server */ 2> go -----------------------------------------------------------ASE1 (1 row affected) 1> select getdate() 2> go -------------------------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 password: root

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.conf net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 kernel.shmmax = 77108864 /*It is varied , here it should be 64 MB*/ [root@localhost etc]# sysctl -a |grep shmmax kernel.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,ASEThirdPartyLegal.pdf,setup.bin,ase155esd2_linuxx86.tgz,sample_response.txt,sys am_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 you want 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_ASE ENTER 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- Typical 2- Full 3- 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 Suite 2- Install Free Developer Edition of Sybase Adaptive Server Enterprise Suite 3- Install Express Edition of Sybase Adaptive Server Enterprise Suite 4- Evaluate Sybase Adaptive Server Enterprise Suite Enter one of the options above: 2 End-user license agreement -------------------------1) All regions Please enter the number of the location you are installing. (1-1) (DEFAULT: 1): IMPORTANT - READ CAREFULLY BEFORE USING THE ACCOMPANYING SOFTWARE SYBASE(R) ADAPTIVE SERVER(R) ENTERPRISE DEVELOPER'S EDITION v15.5.x LICENSE AGREEMENT NOTICE 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 BEFORE Press 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): Y Pre-Installation Summary -----------------------Please Review the Following Before Continuing: Product Name: Sybase Adaptive Server Enterprise Suite Install Folder: /home/sybase/SYBASE_ASE Product 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, ASE Agent Plug-in, ASE ODBC Driver Disk Space Information (for Installation Target): Required: 1,141,741,287 bytes Available: 2,447,298,560 bytes Ready To Install ---------------InstallAnywhere is now ready to install Sybase Adaptive Server Enterprise Suite onto your system at the following location: /home/sybase/SYBASE_ASE PRESS <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- Enable 2- Disable Enter 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 will be 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 Agent To 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 [X] 6 - Enable Self Management [X] 7 - Configure Web Services [X] 8 - Configure Unified Agent To 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 Agent To 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 Agent To 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 Agent To 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 Agent To select an item enter its number, or 0 when you are finished: (DEFAULT: 0) : ============================================================================= == Configure New Adaptive Server ----------------------------Adaptive Server Name (DEFAULT: LOCALHOST): ASE1 Port 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.log Application Type ->1- Mixed (OLTP/DSS) 2- Online Transaction Proccessing (OLTP) 3- Decision Support Systems (DSS) Select an application type: 1 Page Size 1- 2k ->2- 4k 3- 8k 4- 16k Select a page size: 2 Warning: You have selected 4k as the logical page size for the Adaptive Server. If you plan to load dump from another database, make sure this logical page size matches the size of the source database. The default logical page size in previous Adaptive Server versions 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- No 2- Yes Do you want to configure PCI/JAVA?: Optimize ASE Configuration

->1- No 2- Yes Do 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 Server Adaptive Server Name ASE1 Port Number 5000 Application Type Mixed (OLTP/DSS) Page Size 4k Error Log /home/sybase/SYBASE_ASE/ASE15_0/install/ASE1.log Master Device /home/sybase/SYBASE_ASE/data/master.dat Master Device Size (MB) 60 Master Database Size (MB) 26 System Procedure Device /home/sybase/SYBASE_ASE/data/sysprocs.dat System Procedure Device Size (MB) 152 System Procedure Database Size (MB) 152 System Device /home/sybase/SYBASE_ASE/data/sybsysdb.dat System Device Size (MB) 6 System Database Size (MB) 6 Tempdb Device /home/sybase/SYBASE_ASE/data/tempdbdev.dat Tempdb Device Size (MB) 100 Tempdb Database Size (MB) 100 Backup Server Backup Server Name ASE1_BS Port Number 5001 Error Log /home/sybase/SYBASE_ASE/ASE15_0/install/ASE1_BS.log Do you want to continue? (DEFAULT: yes): ============================================================================= == Configure New Adaptive Server ----------------------------Warning: You have selected '4k' as the logical page size for the Adaptive Server. If you plan to load dump from another database, make sure this logical page size matches the size of the source database. The default logical page size 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. ============================================================================= == 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 obtain the Sybase software licenses. PRESS <ENTER> TO EXIT THE INSTALLER: [sybase@localhost t]$ showserver F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 0 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_BS

0 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/ASE15_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/ASE15_0/bin/dataserver -sASE1 d/home/sybase/SYBASE_ASE/data/master.dat -e/home/sybase/SYBASE_ASE/ASE15_0/install/ASE1.log c/home/sybase/SYBASE_ASE/ASE-15_0/ASE1.cfg -M/home/sybase/SYBASE_ASE/ASE-15_0 sybase 9730 20657 0 14:36 pts/1 00:00:00 grep datas [sybase@localhost t]$ isql -Usa -SASE1 Password: 1> select @@servername /*Confirming Name of Server */ 2> go -----------------------------------------------------------ASE1 (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]]

Including environment variable


[sybase@localhost ~]$cd sybase [sybase@localhost ~]$ls -ltr drwxrwxr-x 8 sybase sybase 4096 drwxr-xr-x 4 sybase sybase 4096 drwxr-xr-x 2 sybase sybase 4096 drwxrwxr-x 3 sybase sybase 4096 drwxrwxr-x 59 sybase sybase 4096 drwxrwxr-x 4 sybase sybase 4096 drwxrwxr-x 4 sybase sybase 4096 drwxrwxr-x 9 sybase sybase 4096 drwxrwxr-x 3 sybase sybase 4096 drwxrwxr-x 9 sybase sybase 4096 drwxrwxr-x 12 sybase sybase 4096 Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar 23 23 23 23 23 23 23 23 23 23 23 23:43 23:43 23:43 23:43 23:43 23:43 23:45 23:45 23:45 23:45 23:45 jre32 sybuninstall Sybase_Install_Registry collate charsets locales jutils-2_0 jConnect-6_0 jutils-3_0 jConnect-7_0 OCS-15_0

drwxrwxr-x 2 sybase sybase 4096 drwxrwxr-x 3 sybase sybase 4096 drwxrwxr-x 8 sybase sybase 4096 drwxrwxr-x 5 sybase sybase 4096 drwxrwxr-x 6 sybase sybase 4096 drwxrwxr-x 6 sybase sybase 4096 drwxrwxr-x 13 sybase sybase 4096 drwxrwxr-x 5 sybase sybase 4096 drwxrwxr-x 8 sybase sybase 4096 -rwxr-xr-x 1 sybase sybase 1390 -rwxr-xr-x 1 sybase sybase 1764 -rw-r--r-1 sybase sybase 936 drwxr-xr-x 2 sybase sybase 4096 -rw-rw-r-1 sybase sybase 76 -rw-rw-r-1 sybase sybase 155 drwxrwxr-x 19 sybase sybase 4096 drwxrwxr-x 2 sybase sybase 4096 [sybase@localhost ~]$. SYBASE.sh

Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Apr Apr

23 23 23 23 23 23 23 23 23 23 23 23 23 31 31 15 15

23:45 23:47 23:47 23:47 23:48 23:48 23:48 23:49 23:50 23:50 23:50 23:50 23:54 12:15 12:23 13:38 14:59

config DataAccess shared DBISQL SYSAM-2_0 AMCP UAF-2_5 ASEP WS-15_0 SYBASE.sh SYBASE.csh SYBASE.env log interf.old interfaces ASE-15_0 data

Loacting sample_resousce_file folde


[sybase@localhost ~]$cd $SYBASE/$SYBASE_ASE/init/sample_resource_files [sybase@localhost sample_resource_files]$ ls -ltr total 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

Viewing resource Server file information (Before Editing)


[sybase@localhost sample_resource_files]$ cat srvbuild.adaptive_server.rs_DEV1 sybinit.release_directory: USE_DEFAULT sybinit.product: sqlsrv sqlsrv.server_name: PUT_YOUR_SERVER_NAME_HERE sqlsrv.new_config: yes sqlsrv.do_add_server: yes sqlsrv.network_protocol_list: tcp sqlsrv.network_hostname_list: PUT_YOUR_HOSTNAME_HERE sqlsrv.network_port_list: PUT_YOUR_PORT_NUMBER_HERE sqlsrv.application_type: USE_DEFAULT sqlsrv.server_page_size: USE_DEFAULT sqlsrv.force_buildmaster: no

sqlsrv.master_device_physical_name: PUT_THE_PATH_OF_YOUR_MASTER_DEVICE_HERE sqlsrv.master_device_size: USE_DEFAULT sqlsrv.master_database_size: USE_DEFAULT sqlsrv.errorlog: USE_DEFAULT sqlsrv.do_upgrade: no sqlsrv.sybsystemprocs_device_physical_name: PUT_THE_PATH_OF_YOUR_SYBSYSTEMPROCS_DEVICE_HERE sqlsrv.sybsystemprocs_device_size: USE_DEFAULT sqlsrv.sybsystemprocs_database_size: USE_DEFAULT sqlsrv.sybsystemdb_device_physical_name: PUT_THE_PATH_OF_YOUR_SYBSYSTEMDB_DEVICE_HERE_OR_REMOVE_THIS_LINE sqlsrv.sybsystemdb_device_size: USE_DEFAULT sqlsrv.sybsystemdb_database_size: USE_DEFAULT sqlsrv.tempdb_device_physical_name: PUT_THE_PATH_OF_YOUR_TEMPDB_DEVICE_HERE_OR_REMOVE_THIS_LINE sqlsrv.tempdb_device_size: USE_DEFAULT sqlsrv.tempdb_database_size: USE_DEFAULT sqlsrv.default_backup_server: PUT_YOUR_BACKUP_SERVER_NAME_HERE #sqlsrv.addl_cmdline_parameters: PUT_ANY_ADDITIONAL_COMMAND_LINE_PARAMETERS_HERE sqlsrv.do_configure_pci: no sqlsrv.sybpcidb_device_physical_name: PUT_THE_PATH_OF_YOUR_SYBPCIDB_DATA_DEVICE_HERE sqlsrv.sybpcidb_device_size: USE_DEFAULT sqlsrv.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: no sqlsrv.avail_physical_memory: PUT_THE_AVAILABLE_PHYSICAL_MEMORY_FOR_ASE_IN_OPTIMIZATION sqlsrv.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_DEV1 sybinit.release_directory: /opt/sybase/15 sybinit.product: sqlsrv sqlsrv.server_name: DEV1 sqlsrv.new_config: yes sqlsrv.do_add_server: yes sqlsrv.network_protocol_list: tcp sqlsrv.network_hostname_list: localhost sqlsrv.network_port_list: 8000 sqlsrv.application_type: USE_DEFAULT sqlsrv.server_page_size: USE_DEFAULT sqlsrv.force_buildmaster: no sqlsrv.master_device_physical_name: /opt/sybase/ASE/data/master_DEV1.dev sqlsrv.master_device_size: USE_DEFAULT sqlsrv.master_database_size: USE_DEFAULT sqlsrv.errorlog: USE_DEFAULT sqlsrv.do_upgrade: no sqlsrv.sybsystemprocs_device_physical_name: /opt/sybase/ASE/data/sysprocdev_DEV1.dev sqlsrv.sybsystemprocs_device_size: USE_DEFAULT sqlsrv.sybsystemprocs_database_size: USE_DEFAULT sqlsrv.default_backup_server: PROD_ASE_BS1 sqlsrv.do_configure_pci: no

sqlsrv.do_optimize_config: no

Checkout srvbuildres command version


[sybase@localhost sample_resource_files]$ srvbuildres -v srvbuildres/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 2010 Confidential property of Sybase, Inc. Copyright 1997 - 2010 Sybase, Inc. All rights reserved. Unpublished rights reserved under U.S. copyright laws. This software contains confidential and trade secret information of Sybase, Inc. Use, duplication or disclosure of the software and documentation by the U.S. Government is subject to restrictions set forth in a license agreement between the Government and Sybase, Inc. or other written agreement specifying the rights of the Government to use the software and 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_DEV1 Building 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. 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]$ showserver F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY CMD 0 S sybase 7960 7959 16 75 0 - 44840 21:31 ? /opt/sybase/15/ASE-15_0/bin/dataserver -sDEV1 d/opt/sybase/15/ASE/data/master_Dev1.dev -e/opt/sybase/15/ASE15_0/install/DEV1.log -c/opt/sybase/15/ASE-15_0/DEV1.cfg M/opt/sybase/15/ASE-15_0 TIME 00:00:02

Log-in to new created server


[sybase@localhost sample_resource_files]$ isql -Usa -SDEV1 Password: 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. 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> go 00:00:00000:00014:2011/08/16 21:29:50.35 kernel Initializing virtual device 15, 'auditdev.dat' with dsync 'off'. 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> go 00: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 auditlogdev 2> go 00: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 sjis installdbccalt 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 ------------------------------------sysauditoptions sysaudits_01

Enable the auditing & Take restart of the server.


1> sp_configure auditing,1 2> go 00: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/ASE15_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> go 1> disk init name="auditdev_02",physname="auditdev_02.dat",size='10M' 2> go 00: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_02


1> 2> 1> 2> alter database sybsecurity on auditdev_02 go use sybsecurity go

Using sp_addaudittabe to add new table on audit_data_dev_02.


1> sp_addaudittable auditdev_02 2> go Creating 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 sybsecurity 2> go name db_size created durability status owner dbid

---------------------- -------------------------- ---------- ---------- ----------------------- ----------------------------------------------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_02 2> go segment name status -------------- -------------------- -----------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> go 00: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 master 2> go 1> alter database sybsecurity on auditdev_03 2> go Extending database by 256 pages (1.0 megabytes) on disk auditdev_03 1> use sybsecurity 2> go 1> sp_addaudittable auditdev_03 2> go 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> use sybsecurity 2> go 1> sp_addaudittable auditdev_03 2> go 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> go name 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_03 2> go segment name status -------------- -------------------- -----------5 aud_seg_03 0 device size free_pages ---------------------- ---------- -------------------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 8 0 (return status = 0)

256

248

Now you need to write threshold stored proc.


29> vi [sh:vi /tmp/ctisql_i4xTh5] 1> create proc abh1 as 2> declare @audit_table_number int 3> /* 4> ** Select the value of the current audit table 5> */ 6> select @audit_table_number = scc.value 7> from master.dbo.syscurconfigs scc, master.dbo.sysconfigures sc 8> 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 table 17> ** that became full into another table. 18> */ 19> if @audit_table_number = 1 20> begin 21> truncate table sysaudits_01 22> end 23> else if @audit_table_number = 2 24> begin 25> truncate table sysaudits_02 26> end 27> 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 2> go Adding 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,abh1 2> go A 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,abh1

2> go A 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_helpthreshold 2> 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> go Audit option has been changed and has taken effect immediately. (return status = 0)

Configuring the DBCC DB in Sybase ASE?


1. Find out whether DBCCDB has been installed or Not 2. Dropped Already exist dbccdb databases 3. 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 Process 6. Disk Initialization 7. Create Database 8. Installing DBCCDB database 9. Cache Cofiguration and Binding it 10. Creating Segment in Devices for workspace 11. Creating Segment in Devices for workspace

Vous aimerez peut-être aussi