Meditech NPR Reports / NPR Report Writing / NPR Report Writer / Meditech NPR / Non-Procedural Report / Meditech Consulting / Meditech Reports Relational Database Programming: March 2006

Monday, March 27, 2006

MS Access Db Repair

When MS Access Compact and Repair utilities fail and you can open the database:

1) create a new MS Access database
2) export all database objects (tables, queries, forms, etc...) to the new database

This can restore data, structure and code to the new database.

MS Access Db Size Limit

MS Access file size is limited to 2 GB. Exceeding this file size will only spell corruption in the database.

SQL Server Data Files

The following statement returns the database files for the databases on the server.

SELECT name,filename
FROM master.dbo.sysdatabases

Saturday, March 25, 2006

SQL Server File Types

MDF: Main Data File
NDF: Tertiary Data File
LDF: Log Data File

Shrink SQL Server Databases

The following DBCC (Database Consistency Checker) command shrinks all database files to their minimum size.

/*
USE ADP1SQL
GO
DBCC SHRINKDATABASE (ADP1SQL,0,TRUNCATEONLY)
GO
*/

Meditech NPR Reports / NPR Report Writing / NPR Report Writer / Meditech NPR / Non-Procedural Report / Meditech Consulting / Meditech Reports