It feels good when you find a hidden gem on www. Through a link trail which I cannot remember now I somehow landed up on SQL Server 2008 Jumpstart site. Here you can access training material which is categorised into four tracks.
Database Infrastructure Track Business Intelligence Track Developer Track Application Compatibility & Upgrade [...]
In SQL Server 2008 you can find if a database is online of offline by querying databases system view. A simple query such as this one gives me a list of all databases on my server and the second column shows if the database is online or offline.
SELECT Name, state_desc FROM sys.databases
[...]
SQL Server by default follows Windows password policy requirements for SQL Server Login accounts. This forces you to follow the same policy for SQL Server logins as you would for windows logins and this is a good thing. But sometimes you want to bypass that validation maybe to get a test login in place. You [...]
If you are creating a SQL Server login using a script then it is advisable to check if the login you are creating already exists. If you do not do this then SQL Server will throw an error. For example if I execute this statement when a login with name test_user already exists, I will [...]
Database Mail configuration settings can be retrieved using sysmail_help_configure_sp stored procedure. Like other database mail object, this stored procedure also resides in msdb database. Running the stored procedure on my machine gives the following results.
sysmail_help_configure_sp
You can easily get information on how much space a table is using by executing sp_spaceused stored procedure. Executing the following query on AdventureWorks database shows me how much space Person.Contact table is using. Information presented is detailed which includes the number of rows, reserved space, index size, space used by data and any unused [...]
There are times when we want to return empty strings for column(s) which have NULL values. T-SQL makes this easy with ISNULL function. Two parameters for this function are:
The column in question Replacement value
Here is an example query for Customers table in Northwind database. This query will select Region column from [...]
SQL Server provides with a stored procedure which can be used to get a list of all OLEDB providers on a machine.
Stored procedure:
xp_enum_oledb_providers
Executing this stored procedure which is in master database with the following statement
EXEC master..xp_enum_oledb_providers
gives a list of all available OLEDB providers on my machine.
As per Beta Exams blog Exam 71-433 TS: Microsoft SQL Server 2008, Database Development is now open to all. you can find more details about it here.
This is so hot of the press. SQL Server 2008 has gone RTM just few hours ago. I am heading over to MSDN Subscribers area for a delightful download.
Technorati Tags: SQL Server






