Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Page History: Environment - SQL Server

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: Mon, Jun 28, 2010, 3:24 PM


The following SQL will return the environment (SQL Server Instance + Database Name) in which it runs.

{copytext|div1}
select
     Environment    = '[' + convert(varchar(300), serverproperty('servername')) 
                                + '].[' + db_name() + ']'

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.