Sybase ADDICT

Sybase tips, howto and technical informations – All in a blog !
  • Home
  • Sybase Downloads
  • Sybase Related Links
  • Sybase Jobs


  
  • Find out all “Defined Rules” in a Sybase ASE database

    January 10th, 2010 @ 3:02 PM by Jean-Francois LEBON | Be the 1st to comment

    The following transact-sql code will help you to find all defined rules in a Sybase ASE database.

    select sysobjects.name as "rule name",
    object_name(syscolumns.id) as "table name",
    syscolumns.name as "column name"
    from sysobjects, syscolumns
    where object_name(syscolumns.domain)=sysobjects.name
    and sysobjects.type = 'R'
    go
    

    The output displays the table and column to which the rules are bound.


    Tags: ase, howto, sql, sybase, Sybase Adaptive Server Enterprise, tips, transact-sql

    Bookmark this on Delicious
    Digg This
    Reddit This
    Bookmark this on Technorati
    Share on Facebook
    Buzz This
    Stumble Now!
    Share on LinkedIn
    Post on Twitter
  • Find tables with identity columns

    May 23rd, 2009 @ 9:28 PM by Jean-Francois LEBON | 1 Comment

    Quickly find out the database’s tables having identity columns:

    select object_name(id) as "tablename",name as "column_name"
    from syscolumns where status =128
    go

    Enjoy ;-)


    Tags: ase, howto, sql, sybase, Sybase Adaptive Server Enterprise, tips, transact-sql

    Bookmark this on Delicious
    Digg This
    Reddit This
    Bookmark this on Technorati
    Share on Facebook
    Buzz This
    Stumble Now!
    Share on LinkedIn
    Post on Twitter
  • Find out the Sybase ASE dataserver’s page size

    January 7th, 2009 @ 1:18 AM by Jean-Francois LEBON | Be the 1st to comment

    Find out the dataserver’s page size without using global variables like @@pagesize or @@maxpagesize.

    When you work with heterogeneous versions of Sybase Ase (12.0.x and 12.5.x or 15.x), this query can help you while coding your dba stored procedures…

    declare @page_size int
    select  @page_size = low /1024 from master.dbo.spt_values
    where type = 'E' and number = 1
    go

    It will produce the result in Kb. This works with Sybase ASE from version 11.x to 15.x.


    Tags: ase, howto, sql, sybase, Sybase Adaptive Server Enterprise, tips, transact-sql

    Bookmark this on Delicious
    Digg This
    Reddit This
    Bookmark this on Technorati
    Share on Facebook
    Buzz This
    Stumble Now!
    Share on LinkedIn
    Post on Twitter
  • Find text/image columns in a database

    January 6th, 2009 @ 12:52 AM by Jean-Francois LEBON | Be the 1st to comment

    Might be a good idea to share some usefull code snippet. Let’s start with a simple query to find out text/image columns in a database. This one will build a list of columns using text/image columns for each tables:

    select user_name(o.uid) as "owner",
    o.name as "table",
    c.name as "column"
    from   sysobjects o, syscolumns c
    where  o.type = "U"
    and    o.id = c.id
    and    c.type in (34,35)
    order  by 1,2,3
    go

    Enjoy ;-)


    Tags: ase, howto, sql, sybase, Sybase Adaptive Server Enterprise, tips, transact-sql

    Bookmark this on Delicious
    Digg This
    Reddit This
    Bookmark this on Technorati
    Share on Facebook
    Buzz This
    Stumble Now!
    Share on LinkedIn
    Post on Twitter
  • List Server Reserved Words

    September 6th, 2008 @ 2:55 PM by Jean-Francois LEBON | 1 Comment

    You just have to run a simple query in isql to find all the reserved words for Adaptive Server Enterprise and Sybase SQL Server. To list all reserved words for Adaptive Server Enterprise, log in to isql and run this query:

    select name from master..spt_values where type = "W"
    go

    The spt_values table is a look-up table in the master database that stores system values used by other server processes.


    Tags: ase, howto, sql, sybase, Sybase Adaptive Server Enterprise, tips, transact-sql

    Bookmark this on Delicious
    Digg This
    Reddit This
    Bookmark this on Technorati
    Share on Facebook
    Buzz This
    Stumble Now!
    Share on LinkedIn
    Post on Twitter
« Previous Entries

Categories:

  • Review
  • Sybase Adaptive Server Enterprise
  • Sybase Adaptive Server IQ
  • Sybase Articles
  • Sybase HowTo
  • Sybase News
    • End of Life Notice
    • General News
  • Sybase Replication Server
  • Sybase Tips & Tricks
  • Sybase Transact-SQL Code
  • Videos/Podcasts/Webcasts

Quick Links:

  • Sybase quick refence
  • Sybase Bookmarks
  • Sybase Team Forums
  • Sybase Inc
  • International Sybase User Group
  • CodeXchange
  • SQL Anywhere question and answer
  • Sybase Jobs [US]

Archives:

  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • September 2009
  • July 2009
  • May 2009
  • April 2009
  • January 2009
  • December 2008
  • October 2008
  • September 2008
  • May 2008

Sybase ADDICT:

  • Register
  • Log in
  • RSS Feed

See my Resume:

  • View Jean-Francois LEBON's profile on LinkedIn

Calendar:

    March 2010
    M T W T F S S
    « Feb    
    1234567
    891011121314
    15161718192021
    22232425262728
    293031  
© Sybase-ADDICT.com - All Rights Reserved. Entries RSS Comments RSS Login sybase addict