There are two ways of listing the available database names in SQL Server, using T-SQL
select name from master..sysdatabases EXEC sp_msForEachDB 'PRINT ''?''';
Posted by cavemansblog on September 1, 2009
Ole Automation in SQL Server 2008 by default is turned off for security reasons. When OLE Automation Procedures are enabled, a call to sp_OACreate will start the OLE shared execution environment.
Executing the following script will enable Ole Automation
sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'Ole Automation Procedures', 1; GO RECONFIGURE; GO
Posted in Sql Server | Tagged: Ole Automation, SQL Server 2008 | Leave a Comment »
Posted by cavemansblog on July 15, 2009
Data dictionary creator [1] is a simple-to-use free tool that helped me immensely with a SQL Server database documentation. It stores all the information in Extended Properties, so it’s easier to keep the documentation in sync with the database as it changes. I was able to generate a data dictionary with a couple of of mouse clicks after I have entered the connection string. The dictionary can be exported to various formats: Excel, XML, Word and HTML. Click on the reference [1] for a step by step tutorial on the usage of this utility. (The current version does not seem to support SQL Server 2008). This can be download from codeplex.
Reference:
1. Data Dictionary Creator
Posted in Sql Server, Tools | Tagged: data dictionary | Leave a Comment »
Posted by cavemansblog on July 7, 2009
One of the following two SQL queries could be used to determine the current version of the Microsoft SQL Server [2] that you are working on. I like the first method, for the simplicity of its usage.
SELECT @@version
--OUTPUT
--Microsoft SQL Server 2005 - 9.00.XXXX.00
--Nov XX 200X 16:17:31
--Copyright (c) 1988-2005 Microsoft Corporation
--XXXXXX Edition on Windows NT 5.2 (Build XXXX: Service Pack X)
-------
--OR--
-------
SELECT SERVERPROPERTY('productversion') productversion,
SERVERPROPERTY ('productlevel') Product Level,
SERVERPROPERTY ('edition')
--OUTPUT
--Product Version Product Level Edition
----------------- -------------- --------------
--9.00.XXXX.00 SPX XXXXX Edition
Following are the product versions and their corresponding names.
8.0 stands for SQL Server 2000
9.0 stands for SQL Server 2005
10.0 stands for SQL Server 2008
Tip: You can run select @@servername in management studio query editor to find the SQL Server name.
References:
Posted in Sql Server, Sudheer Reddy Battula | Tagged: sql server 2000/2005, version | 1 Comment »