Posts

Showing posts from January, 2025

๐Ÿ’พ Backing Up and Restoring Databases in Sybase ASE

  Backing up and restoring in Sybase ASE (Adaptive Server Enterprise) uses the dump and load commands. It's straightforward once you're familiar with the basics — here's a practical guide. ๐Ÿ” Why Backups Matter Regular backups protect you from: Data loss (hardware failure, corruption, mistakes) System crashes Application rollbacks or refreshes ๐Ÿงฑ Step 1: Full Database Backup (Dump) To take a full backup , use the dump database command. Here's how:   -- Full backup of the database dump database mydatabase to "/sybase/backups/mydatabase_full.bak"   ๐Ÿ“ Tip: Use meaningful file names, e.g., include dates like mydatabase_2025_05_29.bak . You can also use a tape device or a backup server if you have one configured. ๐Ÿงช Step 2: Transaction Log Backup (Optional) If your database is in full recovery mode, you can also back up the transaction log :   dump transaction mydatabase to "/sybase/backups/mydatabase_log_2025_05_29.trn"   ๐Ÿ’ก Frequen...

Dyslexia & Tech: How I Use Tools Like ChatGPT To Write Without Shame

  Writing used to feel like trying to run a marathon in flip-flops — uphill — during a thunderstorm — with people watching. If you have dyslexia, you probably know that feeling. You’ve got thoughts, ideas, emotions, jokes — entire worlds spinning in your head — but when you try to get them out in writing? It’s like your fingers and brain are trying to speak two completely different languages. I’ve struggled with spelling, grammar, sentence flow… basically, anything that involves written communication. I used to avoid writing anything too long. Even emails felt like minefields. I’d reread them ten times, and still someone would point out a typo or say, “You used the wrong their again.” Cheers, mate. I know . But here’s the twist: I actually love writing. I’ve got stories to tell — about parenting, autism, ADHD, moving around Asia, archaeology, databases, life — you name it. I just never had the confidence. And I always carried that tiny voice in my head saying, “You’re not good...

๐Ÿ”ง How to Create a Database in Sybase (Including Devices)

  If you're used to working with Microsoft SQL Server, creating a database in Sybase ASE (Adaptive Server Enterprise) can feel quite different. One of the key distinctions is that Sybase requires you to explicitly create devices before you can create a database. This guide walks you through the full process: from creating devices to creating the database and setting the correct owner.   ๐Ÿงฑ What Are Devices in Sybase? In Sybase ASE: A device is a physical file (or raw partition) where data is stored. You typically separate your data device (for tables, indexes, etc.) and log device (for transactions). This allows for better performance and recovery management. ๐Ÿ“‚ Step 1: Create the Devices You must first create the data and log devices using disk init .  -- Create a data device (e.g., 100 MB) disk init   name = "datadev1",   physname = "/sybase/data/datadev1.dat",   size = 51200 -- Create a log device (e.g., 50 MB) disk init   name = "l...

Creating a Database in Sybase: A Quick Guide

  If you're coming from a Microsoft SQL Server (MSSQL) background, you'll notice that Sybase ASE handles things a little differently — especially when it comes to storage. Key Differences from MSSQL In Sybase , you must create devices before creating a database. These devices are physical files on disk and are used to store data and transaction logs. Typically, you'll create: A data device (e.g., datadev ) A log device (e.g., logdev ) This separation allows for better performance and easier management. Basic Syntax to Create a Database Here’s a simple example that shows how to create a database in Sybase:   USE master GO -- Create the database using data and log devices CREATE DATABASE mydatabase ON datadev1 = 1000 LOG ON logdev1 = 250 GO -- Extend the database with more space on another data device ALTER DATABASE mydatabase ON datadev2 = 1000 GO -- Add even more space ALTER DATABASE mydatabase ON datadev2 = 348 GO -- Set the database owner to 'sa' fo...