adsense

Monday, January 14, 2013

Developing a SQL Server Backup Strategy

As a DBA it is important that you have developed a proper backup strategy. Following article describes concepts to consider when developing a backup strategy.

http://www.databasejournal.com/features/mssql/developing-a-sql-server-backup-strategy.html

Cheers
samitha

Monday, January 7, 2013

Unable to read the project file 'project.' The Web Application Project proj1 is configured to use IIS

If you ever com up with the error "Unable to read the project file 'project.' The Web Application Project proj1 is configured to use IIS"  edit the .csproj with notepad and change this line :

<WebProjectProperties>
          <UseIIS>True</UseIIS>

To :
<WebProjectProperties>
          <UseIIS>False</UseIIS>

Cheers
Samitha

Thursday, January 3, 2013

SQL Server convert string to datetime

If you have used any of the fields in a table as a varchar to store date when querying the table will not return the expected result.
E.g
SELECT * from ISSUES where CREATED_DATE
  between '08/16/2012' AND '01/27/2013
Here CREATED_DATE field has been defined as string. To resolve this you;ll have to use SQL's convert funciton as follows
SELECT * from ISSUES where CONVERT(datetime,CREATED_DATE,120)
  between '08/16/2012' AND '01/27/2013'

For more date time formatting options check link below
http://msdn.microsoft.com/en-us/library/ms187928.aspx

Cheers
Samitha