27 September 2011

Delete all Stored Procedure or SP in Sql Server


Delete all Stored Procedure or SP in Sql Server

DECLARE @procedureName varchar(500)
DECLARE cur CURSOR
      FOR SELECT [name] FROM sys.objects WHERE type = 'p'
      OPEN cur

      FETCH NEXT FROM cur INTO @procedureName
      WHILE @@fetch_status = 0
      BEGIN
            EXEC('DROP PROCEDURE ' + @procedureName)
            FETCH NEXT FROM cur INTO @procedureName
      END
      CLOSE cur
      DEALLOCATE cur

6 September 2011

Sql Server Queries - Disabled all Constrains,Drop all table,Enable all Constraints in Sql Server

--Disabled all constrains in sql server
EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all"

--Drop all table in Database
EXEC sp_MSforeachtable @command1 = "DROP TABLE ?"


--Enable all constrains in sql server
exec sp_msforeachtable @command1="print '?'", @command2="ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all"

Disable and Enable Foreign key references in Sql Server 2008

Disable and Enable Foreign key references in Sql Server 2008

-- Disable all table constraints

ALTER TABLE MyTable NOCHECK CONSTRAINT ALL

-- Enable all table constraints

ALTER TABLE MyTable CHECK CONSTRAINT ALL

-- Disable single constraint

ALTER TABLE MyTable NOCHECK CONSTRAINT MyConstraint

-- Enable single constraint

ALTER TABLE MyTable CHECK CONSTRAINT MyConstraint

5 September 2011

Redefine your image with these tips - Personality development

Apart from being strong in academics, honing your manners, etiquette and body language is also important. Rummy Sharma shares a few tips on the same. Read on. -Thanks yahoo India Education


Packaging, they say is the mantra for success these days. How you present yourself and tackle various situations goes a long way to set your image in the company of friends or in an organization. So if you are a school student entering college or a graduate taking a plunge in corporate world you, we suggest you get your soft skills right. Apart from academics, look at honing your manners, etiquette and body language, to have that extra edge over others.
In Y! Campus’s one hour chat with etiquette guru, Rummy Sharma we got some amazing tips for. Here are excerpts of the chat.
Q: Please suggest me some etiquette or way of behaving during personal interview during admission process for MBA which can impress the people on the panel. – Zohra
RS: Do these things: 1. Dress formally. 2. Check your tone of voice. 3. Watch your behavior. 4. Be aware of your visual communication. Prepare well not only with subject, but with your presentation of self.
Q: Sir, tell me the best way to shake hands while meeting anyone officially. - Arpana
RS: Hi Arpana, there are handshakes and more handshakes. One must stand straight, offer a firm hand, three pumps on a first official introduction, twice for subsequent meetings and one when leaving others. It is always the right of the lady to decide whether she wants to offer a handshake to a man or not and a very important rule is that, the host is the one who has to initiate the handshake.
Q: How loud a voice is considered etiquette for public meeting /conferences? - Jaya
RS: Hi Jaya, one doesn't need a loud voice these days to be a good public speaker. What with the audio equipment that is provided. Just speak as if you are talking to a group of six people around you. That should be fine.
Q: What kind of table manners should be followed when out for lunch with clients? – Reema
RS: Hi Reema, Dining table is the place where one can demonstrate their etiquette. Learn how to use the cutlery and crockery, their usage and a very important rule, you go to a restaurant not to eat but to show off your skill of western dining. Also ensure that you know the placement of crockery, cutlery, don't make mouth noises, practice cutting food and bringing it to the mouth. All your liquids will be on your right and solids on your left.
Q: How can I improve my impression and how can I be that kind of a person whom people like to help. What are the points I should keep in my mind? - Sanjeev
RS: Usually we say give and take respect. We believe that when we are helpful others will do the same to us. But sometimes we need to be assertive. Don't just go around doing good. You need to make it clear that you expect them to help you too and ask for it when needed.
Q: Please tell me the attitude, manners and personality traits which I should develop, which would be useful for me to face any sort of administrative/political-problems/solution or any complicated circumstances I come across in my future. N.Praveen Devaraaja
RS: Whether you will be a success or not depends on the first impressions you make on others. It just takes seven seconds time for somebody to come to form a first impression about you. So you need to be careful of how you are perceived by others. Also be natural in your presentation. To be successful, you need to analyze every situation and take a decision that is logical and serves the purpose.
Q: What is the best way to teach etiquette to the age group of 4 - 6 year old kids? - Kavita
RS: I say, kids have only eyes and no ears. They see what you do and how you practice what you preach. So teach the kids etiquette by practicing it.
Q: I’ve recently joined a MNC. I often don’t bother about what people think about me. I only concentrate on my business. Because of this my colleagues feel I have a bad attitude and they don’t interact with me as they would do with the other people. So give me some ideas that I could implement to get their attention and how to maintain the attitude, personality, manners in front of them. - Mohan C
RS: People are always observing us and come to conclusions about us by how we interact with them. If you really want to grow, you cannot do it on your own. You need to be a team player. So start smiling at them to start with and join the coffee machine conversations. Slowly, you will be accepted in to the team. Offer help and ask for help too occasionally.
Q: I wanted to know what should be my thoughts, my body language and my attitude. And how can I come out from my shyness and speak in front of a crowd. - Mohit Mudgal
RS: It is not only your problem but of millions of others. Practice talking in front of a mirror to start with. Practice with friends who would help you. Make a start.
Q: I'm from a village and have come to Mumbai. In first impression I look professional but when I start to speak with anyone they understand from my language that I’m from the village and they start to underestimate me. Then it creates problems for me to communicate in proper way. - Ram
RS: Your written communication is good. Improve your accent, and overcome your mother tongue influence. It will take time. But since you are already aware of your problem, you can overcome it.
Q: I want to know the right postures for a job interview. - Arpan
RS: Hi Arpan, sit with your back erect, arms on the armrest, hands on the lap. Do move your hands, head occasionally. Don't allow your elbows to creep on to the table in front of you. It is not yours.
Q: Is eye contact with the audience an essential factor while delivering a speech? – Nandini
RS: Hi Nandini, in the western culture which we are trying to imitate, eye contact is a must. Otherwise, people think we are not being honest. If you have a problem making constant eye contact, look between the eyes of the people. It will make you, and the other person comfortable.
Mr Rummy Sharma specializes in international business etiquette, soft skills and training for HR and non-HR professionals. He has come out with India’s first training video called ‘Manners Matter’. He has trained children as well as business etiquette to CEOs.

4 September 2011

Session Vs Caching in asp.net

Session Vs Caching in asp.net


1.Session is user specific and Caching is not user specific.

2. By using Cache, we can store it in memory, and directly bind the data. the memory of the machine/server from which the source code is running from.By using Cache, we can store it in memory, and directly bind the data.

3.But Session  is defined as a period of time that is shared between the web application and the user.It is only for particular user.

4.Caching is used to increase the performance of the application, and data is not frequently changing.

5.Session is used to store user specific values, and the data may or may not be frequently changing and it should be a small value.[For Performance].

6. If system is low on memory, asp.net will remove entries from Cache to free up memory.

7. Session is per user basis, so if you store a value in session, for each user different memory will be allocated. However flexibility is that you can keep different value for different user.

8. In cache value remains the same for all users and it is a memory efficient solution when you want to share a common value between different users.




Configuration system failed to initialize in C# Windows application

Configuration system failed to initialize in C# Windows application

This error is due to wrong settings in app.config.

15 July 2011

Difference between Temporary tables and Global Temporary Tables in Sql Server 2008

Difference between Temporary tables and Global Temporary Tables in Sql Server 2008

Temporary tables and Global Temporary tables in Sql Server 2008

-Temporary tables and Globale Temporary tables used to copy data to a sort of virtual table (or a records set) so that you can change the values with and not affect the actual data in the actual table. And then return the results of the virtual table
Difference between Temporary tables and Global Temporary Tables
-Global temporary tables are visible to all SQL Server connections but Temporary tables only accessed or used by particular user in the session .



Implementing OAuth validation in a Web API

 I mplementing OAuth validation in a Web API Implementing OAuth validation in a Web API using C# typically involves several key steps to sec...