For one of the projects I am working on right now, I had to create Linked servers in my development and QA environments. The requirement was that the remote servers were different in Dev and QA but the name of the linked server had to be the same name in Dev and QA environments. When one adds a linked server where the remote server is sql server, there are two options for server type. The first server type is SQL Server, the second option is Other data Source. In the first option one has to put in the remote server name( this is the actual sql server name), then click on Security in the Linked Server properties window. In the Security screen, one needs to enter the security context: this screen defines how one is going to login to the remote server. Once this done and you click OK, the linked server will be created, at the same time it also tests the connection to the remote server.
In the second option Other data Source, one has to choose the type of remote server ( sql server, oracle etc...) and then provide the Product Name,Data Source and Provider String. In this option one can give a user friendly name for the name of the linked server. This is the option i followed to kep the name of the linked servers consistent across all the Dev and QA servers.
Thursday, April 7, 2011
Tuesday, March 29, 2011
Best Practices...
Recently we we had to move our sql servers from the business unit to the technology unit so that the sql servers could follow certain guidelines and best practices. When the move happened and I was ready to test sql scripts on the new sql servers which follow certain guidelines to handle security,user access and what is allowed/not allowed with respect to database objects. While I was performing the tests I ran into some errors and noticed that i was missing some scalar functions, on further inspection the functions were supposed to be available on the master database. I raised a flag here and noted that custom user defined functions and stored procedures had been created on the master database on the older sql server's. When database development was done on these servers obviously certain guidelines and standards were not followed. Lack of adhering to standards ended up creating a clean up project which involved moving the custom user defined database/stored procedures from the master database to the user defined database. Based on what i have read/listened to in sql server classes, one should avoid creating custom user defined functions and stored procedures on the system databases of sql server such as master,msdb and tempdb. It is always a good idea to follow/enforce certain guidelines while working on database development projects.
Monday, March 7, 2011
Mobile BI...
The paradigm of computing keeps changing, in the last couple of years there were new platform which have made in roads and are in process of becoming firmly established. Platforms like cloud computing, mobile frameworks such as smartphones,tablets are continuing to grow, given this perspective it seems like BI is moving into mobile space. Microstrategy has come out in a big way by making BI available on the ipad at the same time direction from Microsoft in this space is not very clear. It is kind of interesting because Microsoft is now pushing windows phone 7. There are other vendors who have come out with BI offerings for the mobile platform. Here are a couple of vendors which i have researching and going through the offerings.
RoamBI: http://www.roambi.com/, the second vendor i am looking at is: http://www.pushbi.com/. I am looking to attend some free webcasts to get an idea of the products. I also questions in mind as to how much value can BI on mobile platform can offer to the Business user.
RoamBI: http://www.roambi.com/, the second vendor i am looking at is: http://www.pushbi.com/. I am looking to attend some free webcasts to get an idea of the products. I also questions in mind as to how much value can BI on mobile platform can offer to the Business user.
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.
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.
Subscribe to:
Posts (Atom)
