I will say ...

I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.

Wednesday, December 16, 2009

Overview of SQL Server Stored Procedure.

When you need to store or retrieve data that is accessing and manipulating data within a database is a rather straightforward operation in SQL server database, and so we will go for T-SQL with four simple commands – SELECT, INSERT, DELETE, and UPDATE, and perform all the required tasks. The skill in working with databases lies in being able to not just work with these commands, but also complete each unit of work efficiently.

We will cover the different types of stored procedures used in SQL Server and their usage. We will also examine the working of stored procedures, the potentially tricky areas, and how to avoid them.

To increase performances, every developer should consider a number……….

Click to view the article.

How Do I Protect My Stored Procedure Code.

Every developer is exceptionally concerned about how she/he can formulate the best security of her/his SQL code object like a view / storedProcedure as well. For this reason, we will go for encryption. Encryption is a good but not utterly tenable process. In this article, I would like to show you some best practices to protect SQL server code object.

Click to view the article.

Get List of Extended storedProcedures that are Allowed to you for Common Use.

How many extended storedProcedures do you have the permission to use as public in your own SQL queries / storedProcedure as well? This simple article will show you all the extended storedProcedures allowed to you for common use.

Click to view the article.

Procedure to Shrink the Database Transaction Log.

Occasionally, you might need to conduct database maintenance whether you have the pre-packaged MSDE or the full version of SQL Server. This maintenance should be conducted after you have deleted large amounts of data from the database (Example.mdf and Example_log.ldf). Usually this occurs if you delete a large number of events from the event log. Even after data is removed, the .mdf and .ldf files need to be compacted (similar to an Outlook *.pst file after deleting emails) in order to recover disk space and increase efficiency, and also to reduce seek time.

This article will demonstrate the procedure to shrink the database transaction log.

Click to view the article.

How To Read File Attributes using OLE Object with SQL Server.

It is not necessary that developers must use a .NET class library for getting file attributes information when the application is completely based on DBMS. It is always better to use the standard techniques provided by SQL Server where possible. SQL Server provides several “standard” techniques for file manipulation based on the use of the FileSystem Object (FSO).

This article will demonstrate how we can read file attributes using OLE Object with SQL Server. Here are a number of T-SQL Stored Procedures, based on the use of the FileSystem Object (FSO) that may just get you out of a tight corner.

Click to view the article.

How Many Records Are There in your Database?

How many records are there in your database? You might be thinking that you need to write a gigantic SQL statement for that. This article will demonstrate to you, how easily you can do it.

Isn’t it interesting?

Click to view the article.

Get SQL Database Table Information.

Couple of days ago one of my friends asked me that, why we always use ADO.Net class library to get any SQL Tables information runtime! SQL Server provides several “standard” techniques for it. So I decided to try it and I found it’s really cool and I believe that it is always better to use the standard techniques provided by SQL Server where possible.

This is easy enough to do with cursors and dynamic SQL, but after looking at how “sp_ spaceused” worked and how SMO gets the same information, I decided that I could write it without either.

Even better, once I wrote it though, I realized that it could easily be rewritten as a StoredProcedure, now I could reuse it by joining it with other tables and views in new queries or procedures whenever I wanted.

This article will demonstrate how we can view the Table information of SQL server database.

Click to view the article.