:::: MENU ::::

Posts Categorized / Documentation

  • Oct 17 / 2008
  • 0
DBA best practices, dbDigger, Documentation

Documenting the SQL Server Environment

Documentation is indispensable in IT environment. In case of SQL Server with more than one DBA in organization, documentation is best way to avoid confusions and mistakes. At broad level following information may be documented related to SQL Server environment.

  • Server name
  • Physical location
  • Disk Drives and configuration
  • Installed memory
  • Used network ports
  • Base server Operating system version and service pack level
  • SQL Server version and service pack level
  • Database names
  • Configured Maintenance plans
  • Configured DTS packages
  • A list of users and their permissions for databases
  • A list of users and their permissions for OS

Above info may vary in organization to organization, you may modify it according to your specific IT environment and requirement. It will be valuable and helpful.

  • Sep 17 / 2008
  • 0
DBA best practices, DBA thoughts, dbDigger, Documentation, T-SQL Scripts

Naming cionventions for SQL Srever user objects

database objects Naming conventions

Following SQL Server objects naming conventions may be used primarily to standardize the DB objects naming structure. Conventions will be applied to Tables, Views, Stored Procedures, Functions and Triggers.

Tables

  • Table name should be descriptive of its content e.g staff, staff_education.
  • No space should be used; under score may be used where necessary.
  • Adding tbl as a prefix should be avoided.
  • Domain of functionally may be reflected in name as for Inventory Management System related tables, we may name as IMS_Wing, IMS_Vendor, IMS_Issue.

Views

  • View name should have VW as prefix. E.g vw_staff_posting, vw_sancstrength
  • View name may also contain names of its base table/tables. E.g vw_staff_staffeducation

Stored Procedure

  • Name of user stored procedure should be suffixed with USP.
  • Stored Procedure name should reflect application to which it belongs. For example for any AD Hoc reporting application we may use USP_AdHoc_GetSummary

User Defined Functions

  • Name of user defined function should have UDF as a prefix.
  • UDF name should reflect the application to which it belongs. For example for any AD Hoc reporting application we may use UDP_AdHoc_calculateSummary

Triggers

  • Trigger name should always have T as prefix.
  • Next to T it should have I, D or U to reflect insert, delete or update event on which it will be invoked. E.g TI_staffLog, TU_staffLog, TD_StaffLog.
Consult us to explore the Databases. Contact us