How to Migrate SQL Server 2000 Database to SQL Server 2019 in MU
Complete step-by-step guide to migrate a MuOnline SQL Server 2000 database to SQL Server 2019 without losing characters, accounts, or items.
Migrating a MU Online database from SQL Server 2000 to SQL Server 2019 requires intermediate steps — there is no direct upgrade path. This guide covers the complete process, from the initial backup to reconnecting the GameServer.
Why an intermediate server is required
SQL Server 2019 does not support restoring backups generated by SQL Server 2000 (compatibility level 80). The mandatory upgrade path is:
SQL Server 2000 → SQL Server 2008 R2 (intermediate) → SQL Server 2019
If your server already runs SQL Server 2008 or 2012, you can skip the first leg and start from the intermediate server step.
Step 1 — Full backup on SQL Server 2000
1.1 Open SQL Server Enterprise Manager (SQL 2000) → expand the server → right-click MuOnline under Databases → All Tasks → Backup Database.
1.2 Configure the backup:
- Backup type: Database - complete
- Destination: add path
C:\Backup\MuOnline_2000.bak - Check Overwrite existing media
1.3 Click OK and wait for completion. Verify the backup file:
-- Run in Query Analyzer to verify integrity
RESTORE VERIFYONLY FROM DISK = 'C:\Backup\MuOnline_2000.bak'
MuOnline_2000.bak to an external drive or another machine before continuing. Having two copies prevents irreversible data loss.Step 2 — Restore on SQL Server 2008 R2 (intermediate server)
2.1 On the server running SQL Server 2008 R2, open SQL Server Management Studio (SSMS).
2.2 Right-click Databases → Restore Database:
- To database:
MuOnline_v2008 - From device: select
C:\Backup\MuOnline_2000.bak - Options tab: check Overwrite the existing database (WITH REPLACE)
2.3 Run the restore. If a physical file error appears (.mdf/.ldf), adjust paths in the Files tab:
RESTORE DATABASE MuOnline_v2008
FROM DISK = 'C:\Backup\MuOnline_2000.bak'
WITH MOVE 'MuOnline_Data' TO 'C:\SQL\Data\MuOnline_v2008.mdf',
MOVE 'MuOnline_Log' TO 'C:\SQL\Log\MuOnline_v2008.ldf',
REPLACE;
2.4 Raise the compatibility level to 100 (SQL 2008):
USE master;
ALTER DATABASE MuOnline_v2008 SET COMPATIBILITY_LEVEL = 100;
GO
2.5 Identify deprecated data types before proceeding:
USE MuOnline_v2008;
GO
SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE DATA_TYPE IN ('text', 'ntext', 'image')
AND TABLE_CATALOG = 'MuOnline_v2008'
ORDER BY TABLE_NAME;
2.6 Convert each flagged column. Example for T_Character:
-- Convert deprecated types to modern equivalents
ALTER TABLE T_Character ALTER COLUMN MemoInfo NVARCHAR(MAX);
ALTER TABLE T_GuildMember ALTER COLUMN GuildMasterMemo NVARCHAR(MAX);
-- Repeat for every row returned by the query above
READTEXT or WRITETEXT must be rewritten to standard SELECT/UPDATE statements after converting these column types.Step 3 — Generate a clean backup on SQL 2008 R2
3.1 With the database fixed, generate a clean backup:
BACKUP DATABASE MuOnline_v2008
TO DISK = 'C:\Backup\MuOnline_2008.bak'
WITH FORMAT, COMPRESSION, STATS = 10;
3.2 Verify backup integrity:
RESTORE VERIFYONLY FROM DISK = 'C:\Backup\MuOnline_2008.bak';
Step 4 — Restore on SQL Server 2019
4.1 Copy MuOnline_2008.bak to the server running SQL Server 2019.
4.2 In SSMS connected to SQL 2019, run:
RESTORE DATABASE MuOnline
FROM DISK = 'C:\Backup\MuOnline_2008.bak'
WITH MOVE 'MuOnline_Data' TO 'C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\MuOnline.mdf',
MOVE 'MuOnline_Log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\MuOnline_log.ldf',
REPLACE, STATS = 5;
GO
4.3 Raise compatibility to SQL 2019:
ALTER DATABASE MuOnline SET COMPATIBILITY_LEVEL = 150;
GO
4.4 Enable recommended performance options:
ALTER DATABASE MuOnline SET RECOVERY SIMPLE;
ALTER DATABASE MuOnline SET AUTO_UPDATE_STATISTICS ON;
ALTER DATABASE MuOnline SET PAGE_VERIFY CHECKSUM;
GO
Step 5 — Recreate SQL login and permissions
SQL 2000 logins are not automatically transferred to SQL 2019.
5.1 Create the login used by GameServer (e.g., muonline):
USE master;
CREATE LOGIN muonline WITH PASSWORD = 'YourStrongPassword123!',
DEFAULT_DATABASE = MuOnline,
CHECK_EXPIRATION = OFF,
CHECK_POLICY = OFF;
GO
5.2 Map the login to the database and grant permissions:
USE MuOnline;
CREATE USER muonline FOR LOGIN muonline;
ALTER ROLE db_owner ADD MEMBER muonline;
GO
db_owner in production if you want separation of concerns. Create a custom role with permissions scoped only to the tables the GameServer needs (T_Account, T_Character, T_Item, etc.).Step 6 — Reconfigure ODBC and GameServer.ini
6.1 On the game server Windows machine, open the 64-bit ODBC manager: C:\Windows\System32\odbcad32.exe
6.2 Go to System DSN tab → Add → select ODBC Driver 17 for SQL Server (download from https://aka.ms/downloadmsodbcsql if not installed).
6.3 Configure:
- Name:
GameServer(or whatever name already appears in the ini) - Server:
127.0.0.1or the SQL 2019 server IP - SQL Authentication: login
muonlineand password
6.4 Edit GameServer/GameServer.ini:
[ServerInfo]
DBAddr = 127.0.0.1
DBPort = 1433
DBID = muonline
DBPwd = YourStrongPassword123!
DBName = MuOnline
DataServer/DataServer.ini for the connection string. Check both files and update as needed.Step 7 — Post-migration verification
7.1 Verify row counts on key tables to confirm data integrity:
USE MuOnline;
SELECT 'T_Account' AS TableName, COUNT(*) AS Total FROM T_Account
UNION ALL
SELECT 'T_Character', COUNT(*) FROM T_Character
UNION ALL
SELECT 'T_Item', COUNT(*) FROM T_Item
UNION ALL
SELECT 'T_Guild', COUNT(*) FROM T_Guild;
7.2 Start DataServer.exe and check the log at DataServer/Log/DataServer_YYYYMMDD.log — no connection errors should appear.
7.3 Start GameServer.exe and ConnectServer.exe. Test login with a GM account.
7.4 Confirm character stats, positions, and items are intact:
SELECT Name, Class, Level, Strength, Dexterity, Vitality, Energy
FROM T_Character
WHERE Name = 'YourCharacterName';
Common troubleshooting
| Error | Cause | Solution |
|---|---|---|
Database cannot be opened. It is in the middle of a restore | Incomplete restore | Run RESTORE DATABASE MuOnline WITH RECOVERY; |
Login failed for user 'muonline' | Login not mapped to database | Repeat Step 5 — check sys.syslogins |
Named Pipes Provider, error 40 | SQL not accepting TCP connections | Enable TCP/IP in SQL Server Configuration Manager |
| GameServer won't connect after migration | ODBC DSN pointing to old instance | Recreate the System DSN as described in Step 6 |
Arithmetic overflow in stored procedures | Compatibility level still at 80 | Confirm SELECT compatibility_level FROM sys.databases WHERE name = 'MuOnline' — should return 150 |
syscolumns, sysobjects, or other SQL 2000 catalog views, they still work in SQL 2019 through compatibility mode. Long-term, migrate them to sys.columns, sys.objects, and the rest of the modern catalog views.Perguntas frequentes
Can I migrate directly from SQL 2000 to SQL 2019 without an intermediate server?
No. SQL Server 2019 cannot restore backups (.bak) created by SQL Server 2000 directly. You must use an intermediate SQL Server (2008 R2 or 2012) to first raise the compatibility level from 80 to 100, generate a new .bak, and only then restore on SQL 2019.
Are there MuOnline tables that break during migration?
Yes. Columns of type 'text', 'ntext', and 'image' used in older MuServer editions (e.g., T_Account, T_Character) can generate warnings or errors. Run SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE DATA_TYPE IN ('text','ntext','image') AND TABLE_CATALOG='MuOnline' to identify them and convert to VARCHAR(MAX), NVARCHAR(MAX), and VARBINARY(MAX) before migrating.
After migration the GameServer connects but characters don't load. What to check?
Verify the ODBC DSN configured in GameServer/GameServer.ini (entries DBAddr, DBPort, DBID, DBPwd). On SQL 2019 the ODBC driver changes — use 'ODBC Driver 17 for SQL Server' instead of the legacy 'SQL Server' driver. Recreate the DSN in the 64-bit ODBC panel (C:/Windows/System32/odbcad32.exe).
Do I need to change the compatibility level after restoring on SQL 2019?
Yes. Run: ALTER DATABASE MuOnline SET COMPATIBILITY_LEVEL = 150; for SQL 2019. Compatibility level 80 (SQL 2000) blocks modern functions and can cause errors in stored procedures from newer MuServer builds.