Posted in Programming, SQL Server on January 12th, 2008 1 Comment »
Disk space arrangement is something that a database administrator needs to deal with when maintaining large database
archiving historical data. Historical data consume huge amount of disk space. Every database table takes up different amount of disk space and sometimes the indexes of a table consume more disk space then its data. Not every database […]
Posted in Programming, SQL Server on November 17th, 2007 5 Comments »
I encountered a problem at work when I was requested to set up one way transactional replication between two databases. The subscribing database already have the tables of the replication and there were many tables in the subscribing database that have foreign keys referencing the replicating tables. So guess what? The initial push of the […]
Posted in Programming, SQL Server on October 14th, 2007 No Comments »
I was asked about this question at work and since I asked myself this question before I thought there might be a lot of people that would encounter this question. Hopfully I can save you some time if you have this question.
Suppose you have a table called MyTable that has millions of records and […]
I use this Anti Semi Join query at work frequently,
select * from #tableA a where a.ID not in (select ID from #tableB b)
The purpose of the query is to return all the records in temporary table #tableA that their IDs do not appear in temporary table #tableB. This is a typical Anti Semi Join operation. […]
Posted in Programming, SQL Server on March 12th, 2007 2 Comments »
For a long time the only way to send email in your SQL query is to use the system store procedure xp_sendmail. To use this system store procedure you have to enable SQL Mail which relies on MAPI protocol and you will have to create a mail profile on the server. That was prior to […]