Friday, February 25, 2011

SQL Server (Denali)-CTP1

I downloaded the SQL Server Denali CTP1 version fro MSDN and began the installation process. The first thing i came across was that my OS was not up to the required level. I found out based on the requirements that if one has vista then SP2 needs to be applied. Once the SP2 was accomplished went through the setup process. It was very similar to the setup of sql server 2008 R2 version. On completion of the setup launched the Management studio, in the splash screen it displayed Powered by Visual Studio at the right hand corner. It gave an indication that the UI of SSMS is going to be more tied in with visual studio 2010. I have just begun to play around with queries in Denali,one of features that has been enhanced is Intellisense, there are more options in the Intellisense menu. I will planning to provide more updates as i explore the features of Denali. I also installed the BIDS, Integration services and reporting services components of denali.

Tuesday, February 22, 2011

Tutorial Articles...SQL Server

One of the sql server community sites which i read and visit frequently is http://www.sqlservercentral.com. There are lots of articles and tutorials on different aspects of sql server written by SQL Server Experts and SQL Server MVP's. I have learnt a lot about SQL Server from sqlservercentral.com. One of the interesting and helpful series put together recently has been the Kalen Delaney's SQL Server Stairways series, here is the link: http://www.sqlservercentral.com/stairway/.  The series helps to keep up to date with all the technologies in SQL Server, the DBA or developer who wants to stay ahead is faced with the struggle of constant learning.

Wednesday, February 16, 2011

SSRS-Report Portal...

I recently installed SQL Server 2008 on my laptop which included SSAS,SSIS and SSRS. I installed SSRS in the native mode configuration. I had to work on developing reports in SSRS and deploy the reports. I developed the Reports in BIDS and was ready to deploy the reports on my localhost report portal. When I tried to deploy the reports i got an error saying my account did not have access to the portal. I launched Internet Explorer as an Administrator and I was able to get to my localhost report portal. Once i got to the site, there were two tabs contents and properties. I clicked on the properties tab and added my account as a Content manager and saved the settings. Once this was complete, I went back to BIDS and deployed the report, the report was successfully deployed to my report portal.

Tuesday, February 8, 2011

Error Handling...

One of the aspects in T-SQL development, especially with writing stored procedures is Error Handling. It is important to trap errors, log the errors and provide a proper exit from a stored procedure. One of concepts which was introduced in the .NET framework, has been incorporated into T-SQL. It is the BEGIN TRY..END TRY and BEGIN CATCH..END CATCH block. this feature allows one to keep the code blocks within the stored procedure modular. Here is an example of the use of TRY CATCH block within the stored procedure.
BEGIN TRY
      INSERT INTO tablea
      (col1,col2,col3)
      SELECT col1,col2,col3 FROM testtable
END TRY
BEGIN CATCH
      INSERT INTO table_error_log
      ErrorNumber,ErrorSeverity,ErrorState,ErrorProcedure,ErrorLine,ErrorMessage)
     SELECT ERROR_NUMBER() AS ErrorNumber,
      ERROR_SEVERITY() AS ErrorSeverity,
      ERROR_STATE() as ErrorState,
      ERROR_LINE () as ErrorLine,
      ERROR_PROCEDURE() as ErrorProcedure,
      ERROR_MESSAGE() as ErrorMessage
END CATCH

One of the neat things while using the CATCH block is the availability certain standard functions which provides the Error Procedure and Error Message. These functions can provide valueable information about the Error.