Results 1 to 13 of 13

Thread: Sybase 10 AIX

  1. #1
    Join Date
    Feb 2005
    Posts
    15

    Unanswered: Sybase 10 AIX

    I have used Sybase with Powerbuilder in the past, so I got tagged to fix a problem I know nothing about. I have Sybase 10 running in AIX on a risc box that appears to need to the transaction log dumped. Can someone please give me some idea of what to do. I have command line capabilities on the box and have found the database in question. It has held hostage the development environment due to the errors with inserts because of the trans log.

    TIA,
    cami

  2. #2
    Join Date
    Sep 2002
    Location
    Sydney, Australia
    Posts
    255

    Log Suspend

    First and foremost, RTFM, so that you understand the options when dumping the log, and also how to avoid this occuring in future.

    NB. you are running a very out-of-date version of Sybase, end-of-lifed AFAIK, you need to get updated asap, so that you are (a) supported (b) have known problems fixed (c) have more functionality/options if and when problems occur (d) enjoy better performance, etc, etc.

    But, to get you out of a bind (absolutely not recommended as normal practice), here goes:
    First, terminate all connections to that db on the server from the client end, especially the offending task (with the inserts). Then:
    Code:
    checkpoint
    go
    dump tran <db_name> with truncate_only
    go
    
    -- if that does not work ...
    
    checkpoint
    go
    dump tran <db_name> with no_log
    go
    checkpoint
    go
    
    -- you are now not recoverable, so ...
    
    dump database <db_name> to {"<disk_file>"|"<tape_device>"|<dump_device>}
    go
    -- find out where the usual backup (dump) is directed
    -- many options, refer manual
    If you are still hung and you have server admin responsibility, then warn all users and shutdown the server. If, and only if, absolutely necessary, use the nowait option (and expect longer boot time when you restart it).
    Last edited by DerekA; 02-02-05 at 13:18.
    Derek Asirvadem
    Senior Sybase DBA/Information Architect derekATsoftwaregemsDOTcomDOTau
    Anything worth doing is worth doing Right The First Time
    Spend your money on standards-compliant development or spend 10 times more fixing it

  3. #3
    Join Date
    Feb 2005
    Posts
    15

    Sybase 10 AIX

    I just happened to be in the wrong place at the wrong time. This is a legacy development environment that I don't have any control over at this point, just need to get out of the hole. I appreciate the help and we'll give it a try to see if this alleviates the programmer's development problems for now.

    Thanks,
    cami

  4. #4
    Join Date
    Feb 2005
    Posts
    15

    Unhappy Sybase 10 AIX

    Well, this is going so good. I have to physically go to the box and do the work and therefore can't cut and paste. But when I try to access the database it gives me some kind of error that my syntax is incorrect to access the database as the dba. Can someone give me the basic sign on to the database so I can go see if that works. It has been 10 years since I worked on a machine like this and I just need to get this over with. I greatly appreciate any help I can get at this point.

    thanks,
    cami

  5. #5
    Join Date
    Sep 2002
    Location
    Sydney, Australia
    Posts
    255

    Oh Dear

    At the unix prompt, enter:
    Code:
    isql -Usa -P<sa_password> -S<server>
    If you do not get a ">" prompt (indicating that isql is now running and you can enter the above T-SQL command batches), you will get an error msg re login failure, password or whatever, which you will have to resolve.

    You cannot do anything unless you have at least a privileged login (eg. "sa" or an operator or the dbo) and the password for it.
    Derek Asirvadem
    Senior Sybase DBA/Information Architect derekATsoftwaregemsDOTcomDOTau
    Anything worth doing is worth doing Right The First Time
    Spend your money on standards-compliant development or spend 10 times more fixing it

  6. #6
    Join Date
    Feb 2005
    Posts
    15

    Sybase 10 AIX

    Okay,

    I got in the machine, tried the dump and when the programmer tries to insert or update a table they get the following error:

    Can't allocate space for object 'PINC_TABLE' in database 'sisdev'
    because the 'default' segment is full. If you ran out of space in
    syslog , dump the transaction log. Otherwise, use ALTER DATABASE

    Any suggestions what to do next?

    TIA,
    cami

  7. #7
    Join Date
    Feb 2005
    Posts
    15

    Sybase 10 AIX

    Okay,

    What is the command to see what space is already allocated for the database?

    This machine has been here for 15 years and the person that babysat it before left about 5 years ago. The documentation is no where to be found. I'm doing the best I can at this point.

    After that I believe I can do an ALTER DATABASE <database>=## to increase the size, right?

    thanks,
    cami

  8. #8
    Join Date
    Sep 2002
    Location
    Sydney, Australia
    Posts
    255
    1. At the rate this is progressing, you will be there for weeks, so:
    a. Get manuals or get them online (refer "Sticky: Useful Sybase ASE Topics" at the top of the listed threads in this forum)
    b. get Rob Vershoor's Quick Ref Guide.
    c. Or get a visual DBA tool connected to the server (SQLAdvantage, DBArtisan, plus dozens more)

    2. To continue at this slow pace:
    Code:
    use <db>
    go
    sp_helpdb <db>
    go
    
    sp_helpdevice
    go
    ... and then [right] you will have to ALTER DATABASE.

    At the AIX level, you can look for files/links owner by 'sybase' or the user that the Sybase server executes as.

    But really, you will have to fiddle due to 'default' being used (possibly all devices are full); create new devices, etc. hence the manuals are important.
    Last edited by DerekA; 02-05-05 at 11:25.
    Derek Asirvadem
    Senior Sybase DBA/Information Architect derekATsoftwaregemsDOTcomDOTau
    Anything worth doing is worth doing Right The First Time
    Spend your money on standards-compliant development or spend 10 times more fixing it

  9. #9
    Join Date
    Feb 2005
    Posts
    15

    Sybase 10 AIX

    I have truly appreciated all the help on this one. Somehow ownership became mine when I was volunteered for this old as garbage system. They were cleaning up the server and deleted too many files. Now I need to recover the stupid database. Any suggestions on how to recover the database would be greatly appreciated. Reading the documentation is not an option at this point because the rest of my day is spent doing my real job.

    Once I recover the database I can at least try to get it altered to increase the size.

    This has become my priority for the day, not that I didn't have anything else to do.

    TIA
    cami

  10. #10
    Join Date
    Dec 2004
    Posts
    25
    What do you mean when you say they deleted too many files ? Did they delete Sybase installation files or have they deleted the devices for a database ? (They could have only deleted the devices when sybase was down) And I hope you have backups of the database.

    If Sybase installation files have been deleted and Sybase is not starting up, then you may have to reinstall Sybase.

    If the devices are deleted you will first need to drop the affected database. This may be quite tricky and may need some tinkering with the system tables in the master databases viz. sysdatabases,sysusages,sysdevices.
    Then create the database again (check syntax for CREATE DATABASE)
    Load the database from the backup (check syntax for LOAD DATABASE)

  11. #11
    Join Date
    Feb 2005
    Posts
    15

    Sybase 10 AIX

    Well, they had deleted some of the Sybase files but once those were restored from tape the sybase starts and shutsdown fine. It appears that one of the virtual devices used by the database is corrupt or something. If I try to reinit it says it already exists, but I can't see it and the database says it causes that specific database to be suspect when sybase starts up. When I read the error log from the startserver it says it can't find the file. That is true, I can't see it in the /dev directory, but like i said, when I try to init or reinit it says it already exists.

    So, I'm looking for the backups of the database. Or a way to restore the database from a copy on tape.

    cami

  12. #12
    Join Date
    Dec 2004
    Posts
    25

  13. #13
    Join Date
    Feb 2005
    Posts
    15

    Sybase 10 AIX

    This looks like a great piece of information but how do I fix the device that won't work. It initializes it when startserver is run but when it tries to open it, it says there is no such file or directory. So it is virtually there, just not physically viewable.

    thanks,
    cami

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •