In this issue

Featured Articles

Editorial

Featured Script

 
 advertisement
 
"Brad's Sure Guide to SQL Server Maintenance Plans" Brad McGehee Free eBook and SQL Backup™ trial
Keep your servers in optimal condition with "Brad's Sure Guide to SQL Server Maintenance Plans" eBook, and try SQL Backup for smaller, faster, more robust SQL Server backups. Download your free resources now.
 
SQLDOC Hate explaining your database in meetings?
SQL Doc quickly documents your entire database schema so that you can easily present it to others. "This tool is embarrassingly easy to use." David Hayden, DavidHayden.com. Download a free trial now.

Featured Articles

How to use Database mail feature in SQL Server 2000

This article describes a way by which we could use the feature of database mail in SQL Server 2000 itself which is a lot easier than SQL Mail. More »


Immerse Yourself in Advanced SQL Server Knowledge with Paul S. Randal and Kimberly L. Tripp

A chance to dive deep into SQL Server with Paul Randal and Kimberly Tripp this Spring in Boston. More »


SQL Saturday #39 - New York City

Come to this great one day training event in New York, New York. SQL Saturday comes to the Big Apple and is a great way to get free training on all aspects of SQL Server. More »


Procedural, Semi-Procedural and Declarative Programming in SQL

A lot of the time, the key to making SQL databases perform well is to take a break from the keyboard and rethink the way of approaching the problem; and rethinking in terms of a set-based declarative approach. Joe takes a simple discussion abut a problem with a UDF to illustrate the point that ingrained procedural reflexes can often prevent us from seeing simpler set-based techniques. More »


From the SQLServerCentral Blogs - SSRS – KPIs without Analysis Services

During a recent project I was asked if it was possible to simulate Key Performance Indicator (KPI) images in SQL... More »


Editorial - Working the Door

One of the highlights of my year is hosting a party each opening night at the PASS Community Summit. I've done this for 6 or 7 years and it's been a great time every year. We have tried a few different themes, but have settled on a casino theme that has been a lot of fun for everyone in recent years.

We used to only allow people into the party that used our referral code. That was good for me since it was less work and the PASS staff managed the admission process. However so many people wanted to come that either didn't, or couldn't, use our code (hint, it's SSC2010 for the 2010 Summit), that we decided to sell tickets. So someone had to work the door and handle money.

That fell to me the first year since no one wanted the responsibility, and since then I've continued to greet people at the door, collecting tickets and money as they enter. It reminds me of years past when I used to work the door at various nightclubs. Fortunately I haven't had to stop any fights or ask anyone to leave from the PASS Summit, which is a welcome relief.

This year we are planning on another great party on opening night. Once again it will be a casino theme, and should be another good time for those who want to come. I'll be at the door, and we'll have lots of great prizes, given out randomly to those who attend. Don't worry if you aren't a gambler or don't understand the games, you have as good a chance as everyone else to win.

If you can come to the PASS Summit, and as a SQL Server professional you should, use our SSC2010 code when you register. It gets to $100 off the current price of attendance, and a ticket to our party. If you can't use the code, or you've already registered, we'll sell tickets for $30, which is well worth it. I'm sure any past attendees would testify to that.

» Join the debate, and respond to today's editorial on the forums

PS - If you have suggestions for prizes, drop them in the discussion. We usually give away a lot of DVDs, and last year I added in books, in addition to flash drives, small games, etc. Drop a note for something in the $10-$20 range and I'll see what I can do.


The Voice of the DBA Podcasts

Everyday Jones

The podcast feeds are available at sqlservercentral.mevio.com. Comments are definitely appreciated and wanted, and you can get feeds from there.

You can also follow Steve Jones on Twitter:

Overall RSS Feed: or now on iTunes!

Today's podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com.

» To submit an article, rant or editorial, log in to the Contribution Center


Question of the Day

Today's Question:

From following data, which two queries will return identical results? (select all that apply)

I. SELECT COUNT_BIG(*)

II. SELECT COUNT_BIG(column_2)

III. SELECT COUNT_BIG(ALL column_2)

IV. SELECT COUNT_BIG(DISTINCT column_2)

 

Think you know the answer? Click here, and find out if you are right.

This question is worth 1 point in this category: T-SQL. We keep track of your score to give you bragging rights against your peers.

We'd love to give you credit for your own question and answer. To submit a QOD, simply log in to Contribution Center.

Knight's 24-Hour Trainer: Microsoft SQL Server 2008 Integration Services by Brian Knight, Devin Knight, and Mike Davis. If you need a practical, hands-on introduction to Microsoft SQL Server 2008 Integration Services (SSIS), this book and video package from foremost SSIS authority Brian Knight gets you thoroughly up to speed. Each lesson in the book includes three major components: a thorough description of how each SSIS feature or process works; a tutorial that walks you through the process or technique; and a video lesson that demonstrates it. Grab your copy today from Amazon!


Yesterday's Question of the Day

What is difference between CAST & CONVERT, if any?

Answer: CAST works across all platforms & has less capabilities in SQL Server

Explanation: CAST and CONVERT are the same for most data type conversions. CONVERT has the third parameter "style" which can be used when converting datetime to string

CAST is the more ANSI-standard of the two functions, meaning that while it's more portable (i.e., a function that uses CAST can be used in other database applications more or less as-is)

Ref: CAST and CONVERT - http://msdn.microsoft.com/en-us/library/ms187928.aspx
SQL92 Draft - http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt

» Discuss this question and answer on the forums

Understand how to use the new features of Microsoft SQL Server 2008 for data mining by using the tools in Data Mining with Microsoft SQL Server 2008, which will show you how to use the SQL Server Data Mining Toolset with Office 2007 to mine and analyze data. Explore each of the major data mining algorithms, including naive bayes, decision trees, time series, clustering, association rules, and neural networks. Learn more about topics like mining OLAP databases, data mining with SQL Server Integration Services 2008, and using Microsoft data mining to solve business analysis problems. Grab your copy today from Amazon!


Featured Script

Unused Objects in the Server

This Script is used to List out the objects lying in the box which were un used from the day of the sql server recycled. More »


Database Pros Who Need Your Help!

Here's a few of the new posts today on the forums. To see more, visit the forums.

SQL Server 2005 : Administering

find index fragmentation - Hi, I'm using below query to find index fragmentation. Here why we are selecting [b]index_id > 0? & page_count>1000 [/b] [quote]SELECT database_id,object_id, index_id, index_type_desc,avg_fragmentation_in_percent,...

xp_cmdshell permission in SQL Server Authentication mode - Hallo all together: Here is what I tried to do about xp_cmdshell permission Environment: - MSSQL Server 2005 Express [b]- SQL Server Authentication Mode[/b] -...

XP_CMDSHELL - Hi, I am using XP_CMDSHELL in SQL 2005. If Run the below query then it creates the file in the...

User cannot not see stored procedures - hi guys, i was wondering if you can help me, I have two identical databases in different servers. I have...

Database Users Disabled - Hi, Is there any way that when creating a new SQL login and creating the user for that login that it...

invalid login for user on sql 2000 standard - Hello, Today we moved a production database from our sql 2000 server to a sql 2005 server. all went well. EXCEPT...

Does a development DBA need to learn dot.net language. ? - Dear All, I have a doubt. Does a DBA need to learn dot.net language. ? Thanks.

Effective specification of a new SQL server hardware requirements - Hi again, When asking your support guys for a new SQL box - how do you come to the decisions you do...

Inserting zero in Identity Column - Hi, I have an identity column where the identity seed is 1 and identity increment is 1. When i insert...

SQL Server Agent Job failing while scheduleing LInked server SP - I have read about 50+ post on this website but not able to find the answer that I am looking...

Should memory be increased? - All, I have a machine that I had to limit the max memory setting on all the instances since SQL...

SQL2005 - any experience with query governor cost limit or similar techniques to limit queries? - We want to limiting resource intensive queries on our SQL2005 transactional system - particularly at month end. As documented the only method...

Sql tables for all countries States and Cities - I need Sql tables for all countries States and Cities

SQL Server 2005 : Backups

BACKUP PROBLEM - Hi all i can not take full backup of my database due to this error. The backup of the file or...

sql server restore - Hi All, can anyone pls suggest me how to restore multiple databases.Is there any scripts or scheduling task.I want to copy...

SQL Server 2005 : Business Intelligence

MDX Query Performance Issue - I have a Cube with three dimensions, InventoryItems, InventoryLocations, and ServerTime. When I leave the InventoryLocaions dimension out of my...

(Star or Snowflake) and Snowmelt? - First - I have searched, and haven't come across an answer that makes sense to me, so far. The Setup: I am...

SQL Server 2005 : CLR Integration and Programming.

UDA parallelism issue - I have this simple UDA: using System; using System.Data; using System.Data.SqlClient; using System.Data.SqlTypes; using Microsoft.SqlServer.Server; using System.IO; using System.Text; [Serializable] [Microsoft.SqlServer.Server.SqlUserDefinedAggregate( Format.UserDefined, MaxByteSize = 8000 ) ] public struct MY_AVG : IBinarySerialize { private...

SQL Server 2005 : Data Corruption

Cont: I/O error an dutility isn't helpful yet - Hi, i posted a few days ago in general discussion about a problem i was having with the databases on...

SQL Server 2005 : Development

transactions and locks - Hi all, i need more depth knowledge in sql server transactions and locks.pls give better links for these. thx.

Trigger help - Hey guys, I have an insert trigger which updates a field in another table. The trigger is shown below: [code="plain"] UPDATE ct SET [text]...

Subquery to Joins - Hi How to convert Subquery into Joins Id wise Min Drawtime and Max Drawtime DECLARE @TEMP TABLE (Rid INT IDENTITY,id INT...

Full Text: AND vs. OR - I'm working on a website where I'm trying to implement Full Text (SQL Server 2005) searching capabilities against a few...

SQL Server 2005 : SQL Server 2005 General Discussion

insert null in smalldatetime field - Hello, I have a webform and if user doesn't select any date from the form then it will send null in...

Correlated Subquery with MIN() - I have the following set of data... [code="other"] RowNumber mftp_type symbol type ----------- ---------- ---------- ---------- 1 CL pdsl.a clus 2 CL pdsl.a ulus 3 CL...

Updating Information in a Table with Data from Another - Hello, I hope this is the right place for this post and that the question that now follows will not be...

Need to empty my database? - I Needed a training database. So I copied our main database and renamed it so it won't get confusing. But...

Space is not released after move to other filegroup - I moved some big tables from PRIMARY to SECONDARY filegroup. I did this using 1) DROP INDEX indexname ON tablename...

How to better prevent tempdb log file full - This is not an uncommon topic. After much reading, I manage to read a good one with [url=http://dausman.spaces.live.com/Blog/cns!1pugD9ZQNpvEQDaj87K9usXA!184.entry][/url] The following written...

SQL Server 2005 : SQL Server 2005 Security

How to give a login read-only access to an SQL server? - I would like the ability to give new contractors read-only access to an SQl Server so that they can look...

SQL Server 2005 : SQL Server 2005 Strategies

Question about unique constraint - I've master tables and row as follow, [code="sql"]CREATE TABLE [dbo].[tCompy]( [idx] [smallint] IDENTITY(1,1) NOT NULL, [cd] [varchar](50) NOT NULL, [desn] [varchar](50) NOT NULL, [stat] [bit]...

SQL Server 2005 : SS2K5 Replication

replication issue - If we have a sql server instance that contains potentially 50+ dbs each with replication (used to move data for...

SQL Server 2005 : SQL Server Express

Database Deleted? - Hi. A vender requested I run a script against their database hosed on SQL Express. I connected to the instance...

SQL Express 2005 & Business Contact Manager 2007 - Hi, I have a customer running Outlook 2007 with Business Contact Manager 2007 and SQL Server Express 2005. OS is Windows...

SQL Server 2005 : SQL Server 2005 Performance Tuning

Drop Index - Hi All, i used sql dmv views to check index usage, i found that some indexes are not used at all i.e:...

Adding new field - Hi All, I have a table containing a clustered index , as i know and correct me pls if i am wrong,...

create a maintenance plan for Full Backup that includes the copy backup to the network drive - Guys I need help using Maintainence plan designer, i want to create a maintainence plan that creates Full Backup everyday....

Memory: Pages/Sec does not peak though Memory Utiliz is high - We are facing severe performance probs on one of our prod servers. And we trying to identify the hardware bottleneck....

How to get statistics after executing Procedure - After executing a procedure I have to know the statistics like Reads, Writes, Duration, RowCounts. Can any one tell me how...

Reorganize Index Task - Hi, While running maintenance plan for reoranizing the index for user database we are getting the following error "Failed:(-1073548784) Executing the query...

SQL Server 2005 : SQL Server 2005 Integration Services

ActiveX script to SSIS - Function Main() Dim objFSO 'File System Object Dim outputfile 'Output File Name Dim adoconnection 'ADO Connection Handle Dim rs 'ADO...

Call multiple ssis packages and execute them from master ssis package - Hello I have few SSIS packages located in some folder. They should execute in certain oder one by one. I want...

SSIS Error - export data to sybase db (error code 0xC0047022) - I am trying to create an SSIS package to transfer data from SQL Server to Sybase db. I created a simple...

Input parameter issue in SSIS - Hello, I'm checking wheather the query return data from database. every loop, i pass in a query through a variable to...

Data Flow Destination MySQL - I need to populate a table in MySQL with data from a SQL view. I am trying to figure out...

Issue with Invoking SSIS which reads Excel in 64 bit machine - Hi All, I have a vb.net application written to invoke SSIS Package which reads excel file and populates a temporary DB...

Lookup task with Recordset variable - Hi, I have a recordset in my package populated with the TypeIds of data I want to include. Now I would...

How to use Robocopy within an Execute Process task? - I'm trying to create one SSIS package that I can deploy to all servers to use for backing up databases....

SSIS, "Class Not Registered" error...deployment or permissions issue? - I'm getting an error with an SSIS package that reads from an Access DB on a network share and writes...

SSIS package reacts slow in BIDS - Hello, One of my packages in my SSIS solution is reaction very slow in the BIDS UI. Selecting a task in the...

SSIS Package hangs without any errors - Hello all, The package I've been working on just hangs now without any errors in the execute process window or the...

SQL Server 2005 : T-SQL (SS2K5)

IS package timeout - Hi, We've got a Control-M job which runs an IS package, which times out if one of the queries takes longer...

Using Start and End dates to create a number of months column - Im trying to simplify a stupidly long winded query. the example is below CREATE TABLE Test_Registrations (registration_ID INT, PERSON_ID Int, Start_date_Registration DATETIME, [Registration End...

- Hi, Is there a way to create a Trigger on 2 tables?I want to fire a trigger if tableA (or/and) Table...

Help with TOP clause - Hi, I need some help to accomplish what I thought would be a fairly simple task, but now I'm not so...

first element in sublist - I have a problem. I have table: Group Subgroup 1 11 1 12 1 13 ..... 2 21 2 22 2 23 ...... 3 31 3 32 ...... How to write sql statement...

Get Unique Transaction ID For The Current Transaction - Hi all :) When multiple tables are updated in a single transaction, is there any way to tie those changes together...

SQL Server 2005 : SQL Server Newbies

0 rows output when using SSMS Import/Export Wizard - I've got an ad hoc query that is pulling data from two different databases on the same server. I want...

Join within and across tables - I have Three Tables Table 1 = School Name rollno Result ClassCaptain Student1 001 PASS NULL Student2 002 PASS NULL Student3 003 PASS NULL Student4 004 PASS NULL Student5 005 FAIL NULL Class1 006 PASS 003 Class2 007 FAIL 004 A student may or may not be a apart of class and the relationshsip...

SQL Server 7,2000 : Administration

Problem in data restoration - ;-) Dear Sir, I am in a great trouble, I have taken backup on sql server 2005 and want to restore back...

Email Notification when SQL Server Agent Stops - Is it possible to get an email notification in SQL Server 2000, when an SQL Server Agent Stops?

Unable to start SQL 2000 SP4 - We have a system that was having disk array issues. We replaced a drive and eventually rebuilt the drive arrays. I...

SQL Server 7,2000 : Globalization

Changing server collation - Way back, our server collation was set to Latin1_General_Bin to satisfy the requirement of some software running on that server....

SQL Server 7,2000 : Security

Linkedserver to Remore MS ACCESS FILE - I am trying to create a linked server using below EXEC sp_addlinkedserver @server = N'ACCESS_CUSTOMERS', @provider = N'Microsoft.Jet.OLEDB.4.0', @srvproduct = N'ACCESS', @datasrc = N'\\192.1.1.124\d$\Oasis\honey_be.mdb' GO -- Set up...

SQL Server 7,2000 : SQL Server Newbies

SQL Server 2005 Job email notification alerts - Hi there, I was wondering if somebody could tell me how to configure the notification alerts on a job properties....

SQL Server 7,2000 : Service Packs

Service packs - Hi, Is that necessary/mandatory to install sp4 on sql server 2000 before going Sql 2008 migration with sp1? why am asking this...

SQL Server 7,2000 : Performance Tuning

Is it possible to put a query governor on a specific database user? - Hey guys, first time poster here. I've got a web application that hits my database under a specific user that...

SQL Server 7,2000 : T-SQL

Constraint Enabling - Hi, Want to know the reason behind why the sql server is not validating the existing data once i enable a...

Query to denormalize table rows into single row - I have a situation where a table has - lets say two columns Person name and transaction date. A person can have up...

SQL Server 2008 : SQL Server 2008 - General

Full Text Search - Hi All, I have a problem when i am trying to search some keywords in a particular column in a table....

SQL Server Domain Migration - Hi Champs, I have requirement to Migrate SQL server 2005 from one doamin/forest to another Domain/forest. I have few applications and some...

Query on optimization - hi i have a SQL query having inner join with 8 tables, now i am using stored procedure to get...

Transaction Replication - Hi Everybody, I am new in Replication pls help me. In my environment Transactional replication is already existed [ One publisher and...

SSIS Lookup following OLEDB command always fails - When I receive a particular flat file, I extract some data and insert it into a "master" table. Then, I...

we only need to know if DB is down due to some issue - Hi , i have question , using SQLSERVER2008 STANDARD EDITION 64 BIT. IS THERE ANY SCRIPT FOR THR MONITORING THE SERVER PERFORMANCE , AND...

SSIS Slower for Data Imports?? - I have been told by my manager that SSIS 2008 is slower than Hibernate for data migration, apparently because of...

Microsoft SQLserver 2008 Training Kit Exam (70-432) - Hi All, Just wanted to make sure im not crazy, i have been reading through this book and found information regarding...

Loading Large Files - I am working on an asp.net application where I have to upload 2 excel files which contain millions of rows...

Best settings for MinMemory and MaxMemory - I've got a server with 40GB of RAM that is going to be a dedicated SQL 2008 server. I'm just wondering...

SQL Server 2008 : T-SQL (SS2K8)

Need to take one row with max of id from a table with multiple rows with same data - hi, i have a table with few columns as table source (id,memno,date_trans,name1,name2,x,yz..) after querying on some conditions i get the result in destination table...

Cross Apply, Help me ? - [code="sql"]create table A(A1 int) insert into A(A1)values(1) insert into A(A1)values(2) insert into A(A1)values(3)[/code] [code="sql"]I have a variabe -> @i IF @i = 3 then I...

How do I show items dated 1 day from current date? - Greetings experts, I have strongly very much with this query all day today. I have a fieldname of datetime datatype called FunctionDate. Values...

SQL Server 2008 : SQL Server Newbies

Experiencing a problem when copying my new SQL database to live server - Hi there. Couldn't see how to completely remove my request so taken it out.

Concatenate column rows into one row with a group by - I have this data in a table grp ledger amount 1 A01 5 1 A02 3 1 A03 4 2 A22 8 3 A33 3 3 A36 4 I need to sum the amounts grouping by grp I also need to concatenate...

SQL Server 2008 : Security (SS2K8)

DB security - Hi All, We have a SQL server 2005 db which we are going to deploy on customer's server(will be accessed by...

SQL Server 2008 : SQL Server 2008 High Availability

2008 Clustering Changes - Hi All, I am building a 2 node cluster for BizTalk 2008 and this is my first time for 2008...I am...

Adding an instance to a SQL2008 Cluster - How would one go about adding an instance to a SQL2008 cluster? I am running a Server 2008 Cluster with...

SQL Server 2008 : SQL Server 2008 Administration

Not able to Modify MAintainace Plan - Hi All, I am using SQL Server 2008 STD 64 bit edition with Sp1 with cummulative update 2 on windows server...

Career : Certification

Legit 70-433 Practice Exams - Did some searches for practice exams and found things that looked shady at best. Are there any legitimate Practice exams...

70-433 Exam book - I've decided to study for 70-433, anyone have an opinion on this book? The Real MCTS SQL Server 2008 Exam 70-433...

Career : Employers and Employees

ever take a salary cut to move into a field you wanted experience in? - ive been working with sql server for 4 or so years from a support and admin point of view. im...

SQL Premier Field Engineer. Some questions on this role... - There is a role in my location for a Sql server premier field engineer. Currently i am in application support,...

SQL Developer to DBA - How can someone go from a SQL Developer to a DBA? Is it possible? My biggest question is: If everyone...

SQLServerCentral.com : Anything that is NOT about SQL!

Part time - Are there any decent and legitimate jobs out there that are parttime and let you keep your "day job"? I'd...

Today's Random Word! - HI When you woke up today, or logged-onto Opera Forums, you may have had a dream, a thought, a scene...

Are the posted questions getting worse? - Is it me, or are the posted questions getting worse these days? I just read a post by someone apparently in...

Reporting Services : Reporting Services 2005 Development

passing a value from subreport to main report - Hi, I have not been able to find an answer to this anywhere. I have a report that is trying to assign...

Data Warehousing : Integration Services

string to date conversion using script component/data conversion transformation - Hi All, I am in need of converting string( Eg: "Jun 20 2005 4.00 PM" --- this string is strored in my...

Execute sql task and variable - i am trying to get list of records for a Ano and the query in my execute sql task is...