Thursday, January 3, 2013

Free Online UML Diagrams Builder Sites


Generally while making a design document of a process, we use some UML Diagrams (e.g. Process Flow diagram, Class Diagram, Event Sequence Diagram etc.) to explain the functionality the system.

With Microsoft Visio, we can draw any kind of UML Diagrams. A 60 days trial version Microsoft Visio can be downloaded at:

http://visio.microsoft.com/en-us/TryBuy/TryVisio2010forFree/Pages/Try_Visio_2010_for_Free.aspx

But what is the alternative of Visio if you don't want to buy. There are some good UML diagram builder sites available that let you design freely your Class Diagram, UML Diagram, Event Sequence diagram etc. and let you also to download those diagrams on your local system after finishing your drawing.

Check the following sites:

For UML Diagram: http://creately.com/Draw-UML-and-Class-Diagrams-Online

For Event Sequence Diagram: http://www.websequencediagrams.com/

Wednesday, January 2, 2013

Thursday, December 6, 2012

Checking a Stored Procedure exists or not in database


When we keep all our stored procedures creation script in a file and want to run that whole script. It always complains about already existing stored procedure having same name.
It is better before running your Stored Proc creation script, your creation script should be smart enough that always checks the presence of same name stored procedure before.
 
Following piece of SQL Script checks the stored procedure presence. If it finds, it delets the old one and create a new one having same name (of course most of the time, the new one would be modified)
When we keep all our stored procedures creation script in a file and want to run that whole script. It always complains about already existing stored procedure having same name.

It is better before running your Stored Proc creation script, your creation script should be smart enough that always checks the presence of same name stored procedure before.

Following piece of SQL Script checks the stored procedure presence. If it finds, it delets the old one and create a new one having same name (of course most of the time, the new one would be modified)

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[StoredProcedureName]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[ StoredProcedureName]
GO

Thanks,
Hemant