'ase' Category

  • Determine size of a raw device in Unix Solaris

    September 8, 2009

    Log on to the server
    $ devinfo -i /dev/md/rdsk/d301
    /dev/md/rdsk/d301 0 0 16384 512 1

  • Dropping IQ DBSPACEs

    August 26, 2009

    It is possible to drop DBSPACEs on an IQ Server, if there is enough space to move all data to other DBSPACEs.
    1. Check DBSPACEs
    The sp_iqdbspace command should be used to list all DBSPACEs and their status.
    (DBA)> sp_iqdbspace
    Execution time: 0.053 seconds
    Name Path [...]

  • Corrupt transaction log - Build a new ASE transaction log

    July 29, 2009

    Corrupt transaction log; Build a new ASE transaction log with dbcc rebuild_log
    In some cases it is necessary to rebuild the ASE transaction log.
    Sybase Technical Support states that this is extremely dangerous. It may cause potential database corruption if the system fails while the timestamp rolls over.

    dump the database first. If “dbcc rebuild_log” corrupts the database [...]

  • Retrieve information from a dump file

    July 23, 2009

    ASE stores important information on databases as part of the backup procedure. This information can be retrieved starting with ASE v12.5.4 using the “with headeronly” feature of “load database”.
    This will not load the database, so it’s safe to use.
     
    1> LOAD DATABASE db_one FROM "/tmp/test_ce_0.bak.gz"
    2> stripe ON "/tmp/test_ce_1.bak.gz"
    3> WITH headeronly
    4> go
     
    Backup Server session id is: [...]

  • Generating an arbitrary number of rows for a test table

    July 23, 2009

    Quick and dirty approach to generate an arbitrary number of rows of test data in two-column table, where one column should not be unique:
     
    1> CREATE TABLE
    <table_name> (id int,whatever varchar(10))
    2> go
    1> INSERT
    <table_name> VALUES (rand() * 1000000, ‘Datarow’)
    2> go 2560
     
    This will insert 2560 rows into the table “table_name” with unique values for the first column.

  • Reset sa password

    July 22, 2009

    If it happens that the ’sa’-password for your ASE is lost, it can reset following the below steps:
    1. As you cannot log in to your server as sa anymore, you will have to shut it down forcefully, using an approbriate operating system command, like ‘kill’ on Unix Solaris.
    2. When it is shut down, modify the [...]

  • across platform ASE load - instructions

    July 22, 2009

    run dbcc checkdb and dbcc checkalloc
    put database in single-user mode
    execute sp_flushstats
    … wait some time (approx. 1 min)
    execute checkpoint
    dump database
    load databases on target db
    execute sp_post_xpload - it ensures, that all indexes are correct
    execute sp_indsuspect - findout corrupted indexes

  • Check for minimally logged transactions

    July 7, 2009

    Check for minimally logged operations in a dataserver:
    The dbinfo memory structure, which each database has, holds information on whether the sequence of the transaction log entries were written consecutively, or if the sequence was broken by minimally logged transactions. The information is stored in sysindexes for object id 8, which is the syslogs table, i.e. [...]

  • Find the virtual device number (vdevno)

    July 7, 2009

    SELECT
    vdevno = low/power(2,24),
    name,
    STATUS
    FROM
    master..sysdevices
    WHERE
    cntrltype = 0
     
    This only works up to ASE v15. Starting with ASE 15, vdevno is a column in sysdevices, which can be queried directly.

  • How to mark/unmark a database suspect

    July 7, 2009

    How to mark a database as suspect
    It might become necessary to drop a database, because it is unaccessible after loading a corrupt dump.
    Please note that you should only follow these steps at your own risk, as you might loose the data in your database. Do not try this on critical databases.
    The task can be done [...]

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org