Download Free E-Book: Introducing SQL Server 2008

by mosessaur 4/10/2008 11:47:00 AM

In Introducing SQL Server 2008by Peter DeBetta (ISBN: 9780735625587), you’ll learn about major new features in SQL Server 2008, including security, administration, and performance. Downloading the book require registration.

This initial installment of the book is very small; it is devided into 11 chapters and about 33 PDF pages. I guess it is a good focused book on the new features of SQL Server 2008. Myself didn't read it yet.

I also recommend to visit SQL Server 2008 Learning Portalthere you'll find free e-learning offers such as  Collection 6187: What's New in Microsoft SQL Server 2008 (includes three free clinics).

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Bookmark | SQL Server

SQL Server, Clean your Database Records and reset Identity Columns, The Shortest Path

by mosessaur 12/9/2007 7:13:00 AM

Well, I had a small issue regarding writing a script to clean a database we have and reset its identity columns in all tables. Although the database wasn't huge one (less than 100 tables) I had to trace relations to be able to delete child table's records before parent's ones because of the foreign key constraints. The solution is disable the foreign keys and delete records with no fear of any errors then enables the constraints again.
Well, I found a solution to disable all constraints without the need to go on each table and disable it manually. and I was happy to know that I can use this solution in deleting all records from all tables. Not only this I was able to use the same solution to reset identity columns in all tables.
The solution was to use this built in stored procedure sp_MSforeachtable. For help about this proc search for it in Books online or use this sp_helptext sp_MSForeachtable.
Now back to my 6 lines, bellow is how I re-zeroed my Database:

   1: /*Disable Constraints & Triggers*/
   2: exec sp_MSforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'
   3: exec sp_MSforeachtable 'ALTER TABLE ? DISABLE TRIGGER ALL'
   4:  
   5: /*Perform delete operation on all table for cleanup*/
   6: exec sp_MSforeachtable 'DELETE ?'
   7:  
   8: /*Enable Constraints & Triggers again*/
   9: exec sp_MSforeachtable 'ALTER TABLE ? CHECK CONSTRAINT ALL'
  10: exec sp_MSforeachtable 'ALTER TABLE ? ENABLE TRIGGER ALL'
  11:  
  12: /*Reset Identity on tables with identity column*/
  13: exec sp_MSforeachtable 'IF OBJECTPROPERTY(OBJECT_ID(''?''), ''TableHasIdentity'') = 1 BEGIN DBCC CHECKIDENT (''?'',RESEED,0) END'
kick it on DotNetKicks.com

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

SQL Server | Tips

Expose Stored Procedures to ASP.NET through HTTP Endpoints

by mosessaur 6/18/2007 7:14:00 AM

Yesterday DotNetSlackers.com posted a new article authored by Ahmad Mosa. It is about How to Expose Stored Procedures to ASP.NET through HTTP Endpoints. The article shows how to use HTTP endpoints of SQL Server 2005 to publish internal reports to your organization without using IIS Web Server and regardless of heterogeneous systems. Hope you'll like the article.

Ahmad Mosa is an MCT since 2005. He has MCSD.NET for both C# & VB.NET, MCDBA for SQL Server 2000 and MCPD for Enterprise application development (chartered member). Ahmad has been working in the training field for about 5 years and he has attended several overseas training in deferent locations.

kick it on DotNetKicks.com

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Article | Bookmark | SQL Server

Powered by BlogEngine.NET 1.4.0.0
Theme by Mads Kristensen

About the author

Name of author
mosesofegypt logo
Muhammad M. Mosa Soliman
Software Engineer.
MCT, MCSD.NET,
MCTS: .Net 2.0 Web, Windows, Distributed Applications
MCTS: WSS 3.0, MOSS 2007 Configuration & App Dev
MCPD: Enterprise Application Developer

E-mail me Send mail | Live Space My Live Space


Calendar

<<  July 2008  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar

Recent Comments

Comment RSS

Community Credit

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008