August 26, 2009 12:50 PM
Posted by: Denny Cherry
sys.tables,
T/SQLWriting release scripts for a database is easy. What ever new objects you want you create you create, and what ever objects you need to change you change. Piece of cake. Rollback scripts however are a bit trickier since you need to know what everything should look like after the script is...
July 20, 2009 11:00 AM
Posted by: Denny Cherry
Permissions,
SQL Server 2005,
SQL Server 2008,
T/SQL,
TablesWhen a user that doesn't have sysadmin rights creates objects by default they will be created in the schema that is the users default schema. Now the catch to this is that if you grant the user rights into the database via a domain group that domain group then the user doesn't have a default...
July 16, 2009 11:00 AM
Posted by: Denny Cherry
Enterprise Manager,
SQL Server 2000,
T/SQL,
TablesWhen using SQL Server 2000 and the user doesn't have sysadmin rights, and their login isn't mapped to the dbo user within the database all objects created will be, by default created under the user schema.
This is the normal behavior of SQL Server 2000. In order to allow users who are not...
May 4, 2009 11:00 AM
Posted by: Denny Cherry
CTE,
DELETE statement,
SQL Server 2005,
SQL Server 2008,
T/SQLAll to often we end up with duplicate rows in a table. The best way to keep duplicate rows out of the database is to not let them in. But assume that they are there. This bit of sample code shows how to delete those duplicate rows quickly and easily in a single statement. No temp tables...
December 15, 2008 9:00 AM
Posted by: Denny Cherry
Back To Basics,
T/SQL,
XMLOne of the most popular ways to get data multiple pieces of data in a single parameter from one stored procedure to another, or from a client application to the database is to use XML. This can be done in SQL Server 2000 by using the NTEXT (or TEXT) datatype, and in SQL 2005 using the XML...
December 8, 2008 1:06 PM
Posted by: Denny Cherry
CREATE PROCEDURE,
SQL Server 2008,
T/SQL,
Table VariablesI would have to say, that one of the coolest new features of SQL Server 2008 is the ability to pass a table as a single parameter to a stored procedure.
While we have been able to do this in the past, by using XML to pass more than one value in, then break it apart. But this is just such a...
November 27, 2008 12:15 PM
Posted by: Denny Cherry
Back To Basics,
CREATE INDEX,
SELECT statementAfter you have created your tables, and stored procedures you will have a basic idea of what queries are going to be running against your database. If you haven't already done so, its now time to start adding indexes to your database. The catch with index is that there is such a thing as to...
November 3, 2008 11:00 AM
Posted by: Denny Cherry
END CONVERSATION,
RECEIVE,
Remus Rusanu,
SEND,
Service Broker,
SQL Server 2005,
SQL Server 2008,
T/SQLA while back I was talking to a Microsoft Support Engineer and he had mentioned that in a high load Service Broker environment such as ours there can be some impressive performance improvement can be achieved by reusing the service broker sessions.
The cost of creating and closing a new...