print versionprint version  
Last updated: 02 December 2007
So... you want to be Sybase ASE DBA?
 
There's quite some demand for Sybase ASE DBAs, and I frequently get questions from interested-but-new-to-Sybase folks to please 'explain how Sybase works' (or, when they're really new, 'explain how the Sy Base works' -- sorry for poking fun).
Now, that happens to be somewhat too big a question for a short email reply, but it made me realize some guidance for potential new DBAs could be useful, if only to make it easier to give these folks a useful answer. The information below is an attempt in that direction.

Contents


What is a DBA?
That's indeed a pretty good first question.
The answer differs from organisation to organisation, but I'd assert that, irrespective of the organisation, application or database brand, a DBA is generally seen as the person who watches over the health of a database system on a regular, if not continuous, basis. Here, 'health' includes things like ensuring the database server is running and serving application queries, which in turn means keeping an eye on the transaction logs or data segments not being full, absence of lock contention, monitoring the database log file for error messages for etc. Essential is also ensuring that backups are made and other housekeeping jobs are taken care of.
Then, there are life-cycle tasks like added/removing users and changing passwords, installing new/changed applications (i.e. stored procedures/triggers), performing software upgrades.
DBA duties may also include performance monitoring and -tuning, participation in development projects, systems design, maintain contact with the DB vendor's technical support, and pretty much any other aspects of IT activity around a database system.
Ideally, everything is working just fine and DBAs have plenty of time to check out the latest blogs and stay current on the technology. In reality however, a DBA's schedule often appears to be interrupt-driven, as he/she needs to respond to calls for assistence for users, system designers or management.
(DBA is short for DataBase Administrator, in case you were wondering)

Why should an organization need a DBA in the first place?
The answer is that a database is not just a stand-alone piece of software, but a complex, dynamic product which sits as a spider in the web of applications. Because the database is the place where the data is stored, it tends to be of crucial importance for many applications. Each of these applications may use the database for different purposes, with different access patterns, different workload levels, and different expectations around response times and availability. Databases tend to respond dynamically to the workload they're being given.
In other words, the database is the place where many threads (as in: non-technical; figure of speech) of an organisation's IT system come together, meaning it is also the place where many interests, design decisions, politics or technology limitations converge -- or collide. This all means that a database system needs to be managed, rather than left alone, in order to guarantee applications keep working as they are expected to.
To put it differently: if the database stopped responding, how much trouble would that cause to your organisation? Well, that's why you need a DBA.

What experience do I need to become a DBA?
Anyone can be a DBA, but I'd say that some amount of IT training is required. However, as everywhere in IT you'll find DBAs with greatly varying backgrounds (one of my highly respected former collegues at Sybase started her career as a social worker).
However, a more important requirement than your original professional training is to have some practical experience in IT. In general, your first job in IT will rarely be that of a DBA.
Because, as described above, many interests converge around the database, a problem can seldom be considered in total isolation, and when something happens, it generally needs to be addressed urgently. Having practical IT experience will be greatly useful to deal with the challenges faced by DBAs.
In general, having some hard-technical IT experience (programming, for example, irrespective of the programming language) will be very useful for becoming a DBA; having some project-level experience is definitely useful too.
Since experienced IT personnel is in short supply, the same applies to DBAs -- especially good ones. I'd define a 'good' DBA as one that can manage all the technical, organisational and political aspects, while staying current with the technological developments, without losing his health or sanity.

How does Sybase ASE differ from other databases?
All of today's major relational database brands are -roughly speaking- based on the same underlying technology (keywords: relational database theory; entity-relationship diagrams; SQL; Codd & Date; referential integrity). Consequently, there are many similarities between various brands of databases. However, that does not mean that when you know one database, you also know the others: databases are complex pieces of software with many features and optimizations, and each database vendor has gone its own way in these areas.
This is especially true for DBA tasks. Although the concepts of a DBA's task are broadly similar for any database, the actual syntax and details to perform a similar type of task may require vastly different commands in different databases.
As for Sybase ASE, it should be noted this is a database for mission-critical, enterprise-level applications. In short: ASE can support thousands of concurrently active users, run on the heaviest hardware available (e.g. Sun E25000, HP Superdome, etc.) while being highly scalable (ASE has proven scalability to more than 100 CPUs) and managing terabytes of data with guaranteed sub-second response times. Moreover, should the power drop or a hardware failure occur, the database's integrity should never be compromised, and any committed application transactions should never be lost.
(to avoid misunderstandings: ASE also runs extremely well on smaller systems like 1/2/4-CPU Linux boxes; currently this is in fact a rather successful area for ASE)
It is the ability to fulfill this sort of requirement that makes the difference between an enterprise-level database like Sybase ASE, and some of the open-source databases that entered the market in recent years; the latter tend to be distinctly less robust, reliable or scalable than ASE.
Among the enterprise databases, Sybase ASE stands out because it is lot easier to manage (compared with Oracle and DB2 for example), because it runs on all platforms (unlike MS-SQL Server -- which, since it runs only on Windows, is indeed sometimes questioned whether to qualify as an enterprise DB), delivers more performance from the same hardware (compared to Oracle and DB2).
Because Sybase ASE requires significantly less DBA effort than other databases, ASE is very well suited for smaller systems too (where less DBA capacity may be available).

What are good places to find a job as a Sybase DBA?
Sybase ASE is especially strong in the financial industry, i.e. banking and insurance. Consequently, high concentrations of Sybase DBAs are found around the major stock exchanges including (but by no means limited to) Tokyo, Hong Kong, Frankfurt, London, New York.
Large Sybase customers typically run mission-critical systems on ASE (more than 50% of all Wall St. trades are still done on ASE-based systems). Investment banks tend to have securities trading systems in all major stock exchanges, and these systems are often connected through Sybase Replication Server. Such customers often have 24/7 DBA requirements and sometimes employ hundreds of DBAs around the world. DBA salaries can be very good for such positions.
Apart from the financial industry, ASE is used in literally every line of business, government or industry. As such, you may find opportunites for ASE DBAs anywhere. My Sybase books are used in at least 70 countries (that I know of) varying from Zambia to Alaska, and from French Polynesia to the Cayman Islands -- and literally anywhere in between.
It should be noted that DBA recruitment (either permanent or contract) is often done informally -- you don't tend to see many ads these days. Instead, employers and recruiters google around (sometimes I get the impression that's the only thing recruiters do), so having an online CV somewhere will greatly help your chances of being spotted. Of course, connecting with ISUG or with a local Sybase User Group will be useful for your network anyway.
Because many ASE systems are used for mission-critical, revenue-generating systems, salaries or contract rates for Sybase DBAs are generally quite good when comparing with DBA jobs for other databases. Knowledge of, and experience with, ASE performance tuning and/or Replication Server definitely get you higher rates.

Becoming a Sybase DBA: Some easy first steps to start...
In order to get started as Sybase ASE DBA, you will need to put in some effort. This means: get hands-on experience with ASE, and learn how to create a server, create databases, administrate logins, etc. The steps below are aimed to get you started and guide you in the right direction; by no means does this constitute a ful DBA course or training.
The good news is that you can do this on your own PC at home, without having to buy any software licenses first -- you will need a broadband connection to do some downloading however.
Playing with an ASE test server will of course not get you real-life DBA experience, but it does allow you to get some product experience which is a necessary first step.
I'll go through the first few steps in detail, especially for those who are new to ASE.
  • First, get yourself a free copy of Sybase ASE. These are available for Windows, Linux and Solaris x86 in the form of either the free-for-production ASE Express Edition or the also-free-but-not-for-production Developer's Edition. Go here for pointers where to download these.
  • What you've downloaded is the ASE software product, which you must install on your system first before you can do anything with it. Follow the instructions -- it's pretty simple and takes no more than 5-10 minutes. If given a choice, install the 'Full' product.
    There may be two things to install -- the Sybase server and the 'PC client'. You definitely need the server as this contains the ASE software; the PC Client contains a GUI tool ('Sybase Central') and various drivers (OLEDB, ODBC) which you don't immediately need at this stage. Feel free to install the PC Client anyway since it won't harm. Note that the PC Client is for Windows only.
  • Once installed, you should have a Sybase directory tree on your disk. The actual pathname depends on what you specified during the installation dialog, for example C:\sybase (Windows) or /opt/sybase (Linux). Check you have these.
    On Windows, open a new DOS box and check there's environment variables %SYBASE% and %SYBASE_ASE% now (as well as a few others). On Linux, make sure your shell has $SYBASE, $SYBASE_ASE etc. defined -- look for scripts named SYBASE.sh or SYBASE.csh in the top-level installation directory. Make sure to call these before doing anything with ASE.
  • Now that you have installed the software, yopu can finally create a Sybase ASE server. Follow the instructions that come with the downloaded software, or pick up some documentation from sybase.com -- go here for pointers.
  • When you have created your ASE server, make sure it is started (check the docs). Now comes the proof of the pudding: run a query.
    For this, you need to run the isql client tool in a DOS box or shell session (remember that ASE has a client-server architecture, and you can only talk to the server through a client program).
    With isql, run the following on the command line:
     isql -U sa -P -Sxxxx 
    (xxxx is the name of the server specified while created it)

    When successfully connected to the ASE server, you will see this prompt:
     1> 
    Type the following at this prompt:
     select 'Hello World!' 
    ... then hit <ENTER>, type 'go' (without the quotes) and hit <ENTER> again. The result should look like this:
    1> select 'Hello World!'
    2> go
    
     ------------
     Hello World!
    
    (1 row affected)
    
    What's happened is that you've sent a SQL 'select' statement to the ASE server, which echoes the string 'Hello World!' back to the client.

    When you've come this far: congrats! You've cleared the first hurdles and you're well on your way to getting acquainted with Sybase ASE.

    Instead of running a query with the command-line tool isql, you may also use a GUI tool, if you installed the PC client. This may be called 'Interactive SQL' or 'SQL Advantage' and can be found under the Start->Programs->Sybase. There's actually also a Java-based GUI tool in the Linux distribution: look for $SYBASE/DBISQL/bin/dbisql or $SYBASE/jutils-2_0/jisql/jisql.
    However, as a Sybase ASE DBA, you will need to be able to work primarily with the ASCII-interface of isql, so make sure you're able to do that.
  • Now that you're able to run SQL queries, you'll need to find your way around the ASE server and understand its structure (an ASE server contains various databases). Play with the following SQL commands, and look up their meaning in the documentation (either online or downloaded):
    sp_who  -- all current sessions in the ASE server
    go
    
    select @@spid -- this is your session
    go
    
    select suser_name() -- the username you're logged in with
    go
    
    select getdate() -- what's the time?
    go
    
    select convert(varchar,getdate(),109)  -- what's the time precisely?
    go
    
    sp_helpdb  -- list of databases in this server
    go
    
    sp_helpdevice  -- list of the disk files used by this ASE server
    go
    
    Also run these queries non-interactively, i.e. put them in a file (including the 'go' on a separate line) and run them with the -i yourfilename option of isql. Also use the -o option of isql to redirect the query results to a file.
  • Create your own database to mess around (never create tables etc. in the 'master' database):
    create database mydb
    go
    
    use mydb
    go
    
    select db_name()  -- this should return 'mydb' 
    go
    
    create table mytab (mycol int, mystring varchar(40), when_added datetime)
    go
    
    sp_help
    go
    
    sp_help mytab
    go
    
    select * from sysobjects where name = 'mytab'
    go
    
    insert mytab values (1, 'my first row', getdate())
    go
    insert mytab values (2, 'my second row', getdate())
    go
    insert mytab values (3, 'my third -- getting boring now', getdate())
    go
    
    select * from mytab
    go
    
  • Create another login:
    use master
    go
    
    sp_addlogin yourname, yoursecretpassword
    go
    
    use mydb
    go
    
    sp_adduser yourname  -- needed to get access to database 'mydb'
    go
    
    
    Now log out (or start a new isql session) and log in with the new account:
     isql -U yourname -P yoursecretpassword -Sxxxx 
    (xxxx is your server's name)
    Now do the following:
    sp_who  -- all current sessions in the ASE server
    go
    
    select @@spid -- this is your session
    go
    
    select suser_name() -- the username you're logged in with
    go
    
    use mydb
    go
    
    select * from mytab
    go    
    
    insert mytab values (4, 'my 4th row....', getdate())
    go
    
    select * from mytab
    go    
    
    Note that your new account does not have the same priviliges as the all-mighty 'sa' login you started off with -- which is why this last insert above will fail. Granting priviliges is a topic for later.
    As a DBA, you'll typically be working under the 'sa' login, which has all priviliges out-of-the-box. Do the following things as 'sa' again:
  • Let's get rid of that login again (make sure you're logged in as 'sa' when doing this, or it will fail):
    select name from master..syslogins  --show all existing logins
    go
    
    sp_displaylogin yourname
    go
    
    use mydb
    go
    
    sp_dropuser yourname  -- remove yourself from this database
    go
    
    use master
    go
    
    sp_droplogin yourname  -- drop the login
    go
    


Some further steps...
By now, you should have some appreciation of what it is like to work with Sybase ASE. The next steps are to figure out how to perform some basic DBA tasks, like those below. When you've managed to do all that (googling the Sybase newsgroups will often give you some answers), then you've made some major steps towards becoming a Sybase ASE DBA.
These are some common things a Sybase DBA should be able to do:
  • Start & stop a server
  • Start the 'Backup Server', and make a database dump (= a backup of a database)
  • Load this database dump again (i.e. restore the backup)
  • Locate the ASE errorlog and look what's in it
  • Write a SQL query to determine the names of all tables in a database, and use this to generate and execute 'update statistics' commands for all those tables
  • Create 'cron' jobs (Unix) or scheduled Windows jobs to run 'update statistics' on all tables and to make database dumps of all user databases (plus the 'master' database)

From here, there's still a lot more to learn. Some suggested follow-ups: I guess this should keep you busy for a while. Enjoy!
 
 This document is located at www.sypron.nl/dba.html