declare @db sysname
select @db = db_name()
exec sp_helpdb @db
Wednesday, July 14, 2010
View the database size
To view the current database size, execute the following TSQL:
Friday, June 11, 2010
Getting the list of parameter for stored procedure
There are 2 ways to list down the parameters for stored procedure.
(1) In SQL2000 or above, you may do this:
(2) In SQL2005 or above, you may do this:
(1) In SQL2000 or above, you may do this:
select *
from syscolumns
where id = object_id('pr_get_sales_data')
(2) In SQL2005 or above, you may do this:
select *
from information_schema.parameters
where specific_name = 'pr_get_sales_data'
Monday, June 7, 2010
Installing SQL Express silently
Run the following command to install the SQL Express without letting the user to choose the configuration. Please take note that the "checking pre-requisite" window will still appear on the screen.
SQLEXPR.EXE ADDLOCAL=SQL_Engine INSTANCENAME=testsql /qb
Thursday, June 3, 2010
Encrypting database in SQL 2008
SQL 2008 provides a transparent data encryption. No more complicated calls to the encryption function and SQL statement.
http://msdn.microsoft.com/en-us/library/bb934049.aspx
http://msdn.microsoft.com/en-us/library/bb934049.aspx
Maximum Capacity Specifications for SQL Server
Want to know how far MSSQL Server can go? Check this out:
http://msdn.microsoft.com/en-us/library/ms143432.aspx
http://msdn.microsoft.com/en-us/library/ms143432.aspx
Tuesday, June 1, 2010
Query performance
Checklist for Analyzing Slow-Running Queries
http://technet.microsoft.com/en-us/library/ms177500.aspx
Advanced Query Tuning Concepts
http://technet.microsoft.com/en-us/library/ms191426.aspx
http://technet.microsoft.com/en-us/library/ms177500.aspx
Advanced Query Tuning Concepts
http://technet.microsoft.com/en-us/library/ms191426.aspx
SQL analyzer - graphical execution plan icons
There are 2 ways to analyze the query. Either using the "SET SHOWPLAN_TEXT" option or the graphical execution option (available in the SQL Management Studio).
The following URL contains the icons that were used in the graphical execution option.
http://technet.microsoft.com/en-us/library/ms175913.aspx
The following URL contains the icons that were used in the graphical execution option.
http://technet.microsoft.com/en-us/library/ms175913.aspx
Subscribe to:
Posts (Atom)