If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > Useful Sybase ASE Topics

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-02-01, 22:42
MattR MattR is offline
Registered User
 
Join Date: Mar 2001
Location: Lexington, KY
Posts: 606
Thumbs up Useful Sybase ASE Topics

Hi and welcome to the Sybase forum here at DBForums! I'm mostly an ASE guy (and those are most of the queries we get) so these are mostly ASE-related links/tips (with some exceptions).

Some important links:
Offical Sybase Documentation -- this is your one-stop-shop for everything ASE. If you have a question, I'm more then sure you'll find it here.

Sybase Tools and Documentation by Rob Verschoor -- contains the Complete Sybase ASE Quick Reference Guide. Between this pocket manual (which I own) and the Sybase online documentation there isn't a question you can't find an answer to!

Sybase.com Downloads -- Pick up an evaluation copy of ASE here!

International Sybase Users' Group -- discounts, discussion lists, and more!

ISUG Presentations -- Ranging from PowerBuilder to RepServer to ASE, a lot of good papers/presentations are here for you to read!

Sybase Database Administration Tasks -- List of things that you can do to help keep your ASE instance running smooth as silk!

Sybase FAQ -- This FAQ is courtesy of the International Sybase Users Group (ISUG).

Ed Barlow's Sybase Shareware -- some useful tools.

DBA Devil.com -- French site with optional tools for ASE.

ASE on Linux FAQ -- answers some common questions for installing and running ASE on Linux.

Dell Introduction and Installation Guide for ASE -- useful info from Dell although somewhat dated (only covers up to ASE11.9.2).

Essential DBA Tasks (courtesy of the Complete Sybase ASE Quick Reference Guide)
  • Perform database and transaction log dumps (daily/hourly)
  • Run dbcc checkstorage for all database and follow up on any problems found (weekly)
  • Run update index statistics on user tables (weekly/as needed)
  • Regular preventative stop and restart of ASE server (they suggest monthly but in my experience, other than applying EBFs you don’t ever need to take down the server)
  • Monitor server errorlog for anomalies (daily)
  • Troubleshoot unforeseen emergences (ad-hoc read: daily )
  • Attend to (end) user / developer needs (whenever)
Additional/Optional DBA Tasks (also courtesy of the Complete Sybase ASE Quick Reference Guide)

Monitor growth of data volume and log space usage (daily/weekly)
Defragment tables (reorg or (re)build clustered index) (monthly/quarterly)
Monitor/tune server resource usage with sp_sysmon (when possible)
Report problems to Sybase Technical Support (when necessary)
Install EBFs or upgrades for ASE (when necessary)
Set up the dbccdb database for dbcc checkstorage (once)
Set up the sybsyntax database (once)

Whew!

Again, welcome to the site and the world of Sybase!
__________________
Thanks,

Matt

Last edited by MattR; 04-18-05 at 11:54.
Reply With Quote
  #2 (permalink)  
Old 06-02-01, 23:03
MattR MattR is offline
Registered User
 
Join Date: Mar 2001
Location: Lexington, KY
Posts: 606
Having problems with queries? Are they running slow and you don't know why?

Chances are they are either not using indexes or you don't have the correct indexes created for the query.

In both of these cases the command
SET SHOWPLAN ON
is your greatest ally!

I also like to run
SET NOEXEC ON
so that the server doesn’t execute the query. Usefull when you want to benchmark UPDATE or DELETE commands and not accidentally change any data!

(Remember to run SET NOEXEC ON last because if you run it first the SET SHOWPLAN ON statement will, of course, not be run!)

As an example:
Code:
1> SET SHOWPLAN ON
2> SET NOEXEC ON
3> GO

1> SELECT * 
2>   FROM post, 
3>        users      
4>  WHERE post.userid = users.userid
5> GO

QUERY PLAN FOR STATEMENT 1 (at line 1).


    STEP 1
        The type of query is SELECT.

        FROM TABLE
            users
        Nested iteration.
        Table Scan.
        Forward scan.
        Positioning at start of table.
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.

        FROM TABLE
            post
        Nested iteration.
        Table Scan.
        Forward scan.
        Positioning at start of table.
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.
As you can see from the output we have a table scan on BOTH tables! YIKES! This will cause some problems as your tables start to fill up with information.

To fix this problem, create an index on users.userid like this:
Code:
1>	CREATE INDEX userid ON users( userid )
2>	GO

1> SELECT * 
2>   FROM post, 
3>        users      
4>  WHERE post.userid = users.userid
5> GO

QUERY PLAN FOR STATEMENT 1 (at line 1).

    STEP 1
        The type of query is SELECT.

        FROM TABLE
            post
        Nested iteration.
        Table Scan.
        Forward scan.
        Positioning at start of table.
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.

        FROM TABLE
            users
        Nested iteration.
        Index : userid
        Forward scan.
        Positioning by key.
        Keys are:
            userid  ASC
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.
As you can see, the users table is now using the index your created. The reason why post is a table scan is because you are selecting all rows so an index won’t help you at all. A more complex WHERE clause which uses more columns from post would require an index to avoid the table scan.

To turn off NOEXEC And SHOWPLAN simply reverse the first command:
Code:
1> SET NOEXEC OFF
2> SET SHOWPLAN OFF
3> GO

QUERY PLAN FOR STATEMENT 1 (at line 1).


    STEP 1
        The type of query is SET OPTION OFF.


QUERY PLAN FOR STATEMENT 2 (at line 2).


    STEP 1
        The type of query is SET OPTION OFF.

1>
__________________
Thanks,

Matt

Last edited by MattR; 06-02-01 at 23:05.
Reply With Quote
  #3 (permalink)  
Old 06-22-02, 13:40
MattR MattR is offline
Registered User
 
Join Date: Mar 2001
Location: Lexington, KY
Posts: 606
To enable stored procedure showplans:

Code:
DBCC TRACEON( 3604, 302 )
SET SHOWPLAN ON
SET FMTONLY ON
GO

EXEC sp_something
GO
__________________
Thanks,

Matt
Reply With Quote
  #4 (permalink)  
Old 04-12-04, 11:07
mkalsi mkalsi is offline
Senior Member
 
Join Date: Nov 2002
Posts: 207
To check what exactly is executed at the server level when frontend user kicks of a report or any application module, use:

dbcc traceon(11201,11202,11203,11204,11205,11206)

It produces huge output in errorlog. Make sure to turn it off when the job is done.
Reply With Quote
  #5 (permalink)  
Old 12-16-05, 02:52
vsnreddi vsnreddi is offline
Registered User
 
Join Date: Dec 2005
Posts: 6
Thanks

Thanks a lot..It is very useful to sybase developers/DBA's
Reply With Quote
  #6 (permalink)  
Old 03-17-06, 10:59
ponsenniah ponsenniah is offline
Registered User
 
Join Date: Mar 2006
Posts: 2
what aspects are used in AS/400 from sybase
Reply With Quote
  #7 (permalink)  
Old 04-02-07, 08:32
jainabhaykumar jainabhaykumar is offline
Registered User
 
Join Date: Apr 2007
Posts: 2
How to identify which process is slow
Reply With Quote
  #8 (permalink)  
Old 06-27-07, 07:25
LakshmiAlagappan LakshmiAlagappan is offline
Registered User
 
Join Date: Jun 2007
Posts: 2
Hi,
can anyone help me out in finding a purticular table size in a sybase db. and i'm using sqlanywhere10-interactive sql tool.
sp_spaceused is nomore supported. any alternative or any scripts that i can have to finf the table size?
Reply With Quote
  #9 (permalink)  
Old 08-21-07, 22:51
suu suu is offline
Registered User
 
Join Date: Aug 2007
Posts: 2
Red face ASE-ASE Replication database using Sybase Central

hello frens..

i've problems to replicate database in 2 machines that already have sybase ASE 12.5.2. I try to configure ASE Replicator using this document
http://manuals.sybase.com/onlinebook...1250e/rl125ug.
but the following error appear when i run the aserep command.
ASE Replicator requesting Java Virtual Machine exit with message: ASE Replicator
initialization error in component <DDBAdmin>. Component message: Error encounte
red checking environement: S0022: Invalid column name 'network_name'.

ASE Replicator initialization error in component <DDBAdmin>. Component message:
Error encountered checking environement: S0022: Invalid column name 'network_nam
e'.

I didn't find any document on this topic that use GUI Sybase Central to configure replication.Can anyone help me on this topic?TQ
Reply With Quote
  #10 (permalink)  
Old 10-01-07, 11:09
taimor2010 taimor2010 is offline
Registered User
 
Join Date: Oct 2007
Posts: 9
really very useful

thx alot for your great help
Reply With Quote
  #11 (permalink)  
Old 08-18-08, 18:08
TBOY7 TBOY7 is offline
Registered User
 
Join Date: May 2007
Posts: 5
Problems Installing Syabase 12.5

Hi,
l'm wondering if someone can help me, l'm a sqlserver person and just started dabbling into sybase, l decided to start with version 12.5 and purchased jeffery garbus book, it's dosen't explain much on the process of installation and l'm finding it increasing difficult to uninstall sybase ase 12.5 as it's not showing in add/remove programs and the uninstall option in the programs folder is giving me a "unable to launch application".Also, l can't see ase service in the service applet, l've spent the whole day on this and am not too happy, please help, no documentation on uninstalling ase 12.5 on windows 2000 server.
Reply With Quote
  #12 (permalink)  
Old 07-26-09, 21:53
betonz betonz is offline
Registered User
 
Join Date: Jul 2009
Posts: 4
Is it advisable to create a temporary index in a query for a table with 5Million or more records?

Last edited by betonz; 07-27-09 at 08:41.
Reply With Quote
  #13 (permalink)  
Old 08-18-10, 07:51
spragg70 spragg70 is offline
Registered User
 
Join Date: Aug 2010
Posts: 1
Thanks a lot..It is very useful to sybase developers/DBA's
Reply With Quote
  #14 (permalink)  
Old 09-02-10, 14:12
arnmaverick arnmaverick is offline
Registered User
 
Join Date: Sep 2010
Posts: 1
Very useful information. I've been struggling a lot with this stuff. I felt like I was working in a foreign language. But I'm just now starting to get it. Thanks so much
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On