In this issue

Featured Articles

Editorial

Featured Script

advertisement
Exchange Server Free ebook on the 'Best of Exchange Server 2007' published by Sybex
A book for Exchange SysAdmins who, amongst other things, make sure your email works! 350 pages on getting the most from Exchange Server. Download a free copy.
SQL Prompt Want to write your queries faster?
Some developers write SQL amazingly fast. Do you want to know their secret? It's SQL Prompt. "This is a must-have tool for all T-SQL developers." Brian Brewder, Brian Online. Try it out for yourself now.

Featured Articles

SSIS 101: Object Variables, ResultSets, and Foreach Loop Containers

SQL Server MVP and SSIS guru, Andy Leonard, discusses Integration Services and some of the tasks and containers that he uses quite often.More »


Reading Lift Charts - SQL School Video

This video covers lift charts, an advanced data mining feature in SQL Server 2008. MVP Brian Knight walks through a data mining example that tests a model with a lift chart.More »


SQL Server Service Broker: Maintaining Identity Uniqueness Across Database Copies

A technical paper from the SQLCAT team on moving databases with service broker applications.More »


Intrinsic Member Properties: The MEMBER_UNIQUE_NAME Property

Join MSAS Architect Bill Pearson in hands-on exercises, where we gain exposure to the use of the MEMBER_UNIQUE_NAME property in generating simple lists, as well as datasets to support report parameter picklists.More »


Editorial - The Brainstorm Zone

A quick note that this editorial loses a bit if you don't watch the podcast, so I'd highly recommend one of those to get the full effect :)

Awhile back we ran a guest editorial from Tim Mitchell about "The Zone," which provoked some great responses. It talked about the way we can focus so intently, so completely that we zone out, are intensely productive and even lose track of time. It's a feeling that I hope most people, especially developers can achieve and it's something I've really enjoyed during long runs or bike rides as well.

However there are lots of times when we don't want to concentrate so intently, or it's not beneficial. I'm sure most of you have run across a problem or series of problems and you are not sure how to solve them. You struggle to come up with a good solution, and it's like the next line in a song you can't remember; it's just out of the grasp of your mind.

So what do you do? I know lots of developers, a younger version of myself included, would just start coding. Try some different solutions and see if you could come up with one that works. That's not necessarily a bad solution, but it might not be the best way to tackle a tough problem. After all, with that approach you're trying things out and whichever one works first is likely the one you'll choose, whether or not it's the best solution.

I don't think that is the best approach and as I get older and struggle with problems, I've found that getting away and doing something else actually improves my solutions. My mind knows there's a problem and I'll keep thinking about it, but that distracted, half-thinking approach, the unconsciously brainstorming approach, lets me twist the problem, think about it a different way, and come up with solutions that I am forced to examine in my mind. Without anything on the screen in front of me, I somehow am freed from the bond of committing something to paper, or as we often do today, to bits.

When I'm writing, this is the approach I'll take when I'm stuck. Often a little manual labor out in the yard helps me think about things in a new way. As I think back to a few of the DBA jobs I've had, I realized that some of the most productive and creative solutions I, and the people I worked with, built came about during games of ping pong, darts, or some other distraction. Often one of us would stand up, need a break, and ask if anyone wanted to walk outside and throw a football around or play a game. We'd spend 10 or 15 minutes chatting, inevitably working our way back to work, and often getting an inspiration from the back and forth, give and take, with another person.

This backwoods architecture has served me well in End to End Training as well. Andy Warren and I will chat about ideas, debate and discuss the merits, in between and around catching up on other topics. It's a collaborative effort that may or may not be focused, but it always lets us learn something from the constant interaction.

Many people have dismissed the idea of game tables at work, or unfocused collaboration time as a perk designed to attract younger people and keep them at work. I'd argue that it's a great way to get people to interact and inspire creativity, especially when it's away from the computer. To me, it's used the same way that many people in the previous generation used golf: a way of getting business done.

Steve Jones

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


The Voice of the DBA Podcasts

Everyday Jones

The podcast feeds are now available at sqlservercentral.podshow.com to get better bandwidth and maybe a little more exposure :). Comments are definitely appreciated and wanted, and you can get feeds from there.

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.

I really appreciate and value feedback on the podcasts. Let us know what you like, don't like, or even send in ideas for the show. If you'd like to comment, post something here. The boss will be sure to read it.

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


Question of the Day

Today's Question:

In which Page does the BootPage of the Database reside?

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

This question is worth 1 point in this category: Architecture. 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.

Professional SQL Server 2005 Integration Services by Brian Knight, Allan Mitchell, and more will help you get past the initial learning curve quickly so that you can get started using SSIS to transform data, create a workflow, or maintain your SQL Server. Offering you hands-on guidance, you'll learn a new world of integration possibilities and be able to move away from scripting complex logic to programming tasks using a full-featured language. Grab your copy today from Amazon!


Yesterday's Question of the Day

An undocumented hash routine in SQL Server is pwdencrypt. What is the name of the function to check the hash?

Answer: pwdcompare

Explanation: The function that should be used is PWDCOMPARE as shown in this sample code:

Select 
  (pwdcompare('mypassword',CONVERT(varbinary(255), pwdencrypt('mypassword')))) as checker

Ref: SQL Server undocumented password hashing builtins: pwdcompare and pwdencrypt - http://blogs.msdn.com/lcris/archive/2007/10/31/sql-server-undocumented-password-hashing-builtins-pwdcompare-and-pwdencrypt.aspx

» Discuss this question and answer on the forums

Professional SQL Server 2005 Integration Services by Brian Knight, Allan Mitchell, and more will help you get past the initial learning curve quickly so that you can get started using SSIS to transform data, create a workflow, or maintain your SQL Server. Offering you hands-on guidance, you'll learn a new world of integration possibilities and be able to move away from scripting complex logic to programming tasks using a full-featured language. Grab your copy today from Amazon!


Featured Script

sp_import_errorlog

To import the SQL Server error log into a table, so that it can be queried Written by: Anand Mahendra Tested on: SQL Server 2000 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

SQL Job failing because of Job owner - I have several jobs that have my ad account as job owner that fails because Could not obtain information about...

approle - Hi all, My client would like to have the sp_setapprole implemented on the application, so the users can have full...

SAN Training - Hello Room, I read the “Should you buy a SAN?” article by Andy Warren posted 2003/03/28. Can anyone advise on the training...

Re: High CPU Utilization Troubleshooting - I'm running SQL Server 2005 on dual-xeon quad core processors with 8 gb of ram. Every once in a while,...

Need help deleting a second log file. - Hi All, I aquired a SQL Server database from another department and somehow someone had a second log file attached to...

Whole servers in single user mode after build install - We had SQL Server 2k5 sp2 on our 2 cluster servers. After installing build 3257, these servers are now in...

Linked Server Pros/Cons over Seperate DB's - I'm trying to figure out why someone would use a linked server over just having another database on the same...

My 3rd party softwares uses tons of cursors. - Hello, As said in my subject and description, our (new) 3rd party product uses cursors, many cursors, tons of cursors. They're...

SQL Job Properties - Why is it that when I am on my desktop client and click on sql job properties, I get a...

Creating A Linked Server To Dbase 5.0 Database - I have an application that uses SQL Server 2005 stored procedures as part of the business logic. I'd like to...

Problem setting up log-shipping - I'm trying to set up log shipping between 2 SQL Server 2005 servers. I have restored a full backup to...

sqllib error: sysdatabases in SQL server instance is empty - We are recieving this error in the application log of our sql server server. What does it mean? Nothing when I google...

SQL Server 2005 : Backups

BACK UP ERROR - Hi guys what might be the reason for this error before that i need to say this back up file we...

NetBackup & Maintenance Plan Backups - I have setup our SQL Cluster to perform Full Backups every day with T-Log backups every 2 hours, which works...

Why to backup on seperate folders? - Hi all, Can anyone tell me why we need to take the Full and Differential backups on separate instead of...

SQL Server 2005 : Business Intelligence

Why We Use ODS ? / What are its Advantage ? - Hi All, Can u please help me to find solution for question Why We Use ODS ? / What are its Advantage ? Is...

Reporting Services Login Box always prompting when deploying my report - Hi to all, I have a problem in deploying my report in BIDS because there's a Reporting Services Login box...

SQL Server 2005 : CLR Integration and Programming.

Creating CLR assemblies with VS 2008 - I am trying to write a C# function that I can call via the CLR from my stored proc to...

SQL Server 2005 : Development

creating calculation scripts - hi i have a table which look like this: ID Depreciation 51004 0 54796 0 58585 -19079.347 62466 -113.57 66291 -113.57 70143 -113.57 74025 -113.57 77933 -113.57 81849 -113.57 on my script i need to calculate a Accummulative Depreciation on...

Trigger on COLUMN rename - I have some views that need to be refresh every time any of the tables changes. That work beauryfully using...

Interesting but Stupid Question - create table #Like_Test( Col1 varchar(5) )go insert #Like_Test values('_Cus') insert #Like_Test values('Cus_') insert #Like_Test values('C_us') insert #Like_Test values('Cus') insert #Like_Test values('Cu_s') --select * from #Like_Test select * from...

List out SP's Columns into a Table - Hi All I want to list out columns name of SP into a table. They can be dynamic. Thank in advance sonny

Debugger For SQL - Wouldnt it be nice if we have a debugger in Management Studio to debug SQL Commands Just like we debug...

How to use stored procedure instead of cursors? - Hi i am new to SQL SERVER, please any one help me. thanks vijay

SQL Server 2005 : SQL Server 2005 Compact Edition

How to increase SQL CE db file? - I tried inserting about 500,000 records into the sql ce db and it failed when it ran out of space...

SQL Server 2005 : SQL Server 2005 General Discussion

Any OLAP training recommendations? - Hi there~ I'm hoping for some recommendations on books, resources, etc. for learning OLAP. I've worked with SQL Server for several years...

How to determine the latest version of MDAC? - We are running Windows Server 2003 R2.l Thanks, Kevin

Optional BEGIN...END keywords when creating procs - Hi all, As per MSDN the syntax of stored proc is... [code] CREATE { PROC | PROCEDURE } [schema_name.] procedure_name [ ; number ] [ { @parameter [ type_schema_name. ] data_type } [ VARYING...

new instance question - Hi all, I had SQL server 2005 installed on my machine by my company. They install stuff via ZEN so the...

What kind of license? - Hello everyone, I have tried to obtain information from the Microsoft site, but without success ..... So I try to describe my...

Query Results to File - HI, I have 2 environments. one is 2k and other is 2k5. I have a table xyz on a database on 2k....

Best design/startegy to implemnt real-time data availability from DB "A" to DB "B" - Hi, I am importing data by joining many tables from Database "A" to DB "B". And then use the data from 2...

Loading text file to SQL Server 2005 using bulk insert - Hello, I am trying to load text files (comma delimited) into a table in SQL Server 2005 management studio using bulk...

BCP with special characters - Hi, I am trying to upload file having special characters (Turkish). The column contains data like -> asagidaki When I run bcp, it...

SQL service terminates. - The SQL service is terminating on the server, not so frequently though. Error logged is : Event Type: Error Event Source: Service Control...

"Buffer provided to read column value is too small." error after moving to SQL2k5 - Hi, We just installed 64-bit SQL Server 2005 on our new Server having Windows Server 2003 x64 Enterprise Edition and having...

SQL Server 2005 : SQL Server 2005 Security

Global ##TempTable - how do permissions work? - I was just wondering about this... how do permissions work for global ##temp_tables? When created it is global, to the entire...

SQL Server 2005 : SQL Server 2005 Strategies

active/active clustered design - Hello everyone, before I post my question, let me simply descript my situation. out computer bought a series of new hardware...

many blank fields vs many linked tables - The database I am designing will be accessed by multiple users via a dot net application written in C#. I...

Self referencing tables - I was doing a delete on a record by a field that was always populated. It took about 30 seconds....

SQL Server 2005 : SS2K5 Replication

Real time replication to datawarehouse - not sure where to start but my company has kicked off a new project for reporting against our data.. the...

Alert not working. - Has any one successfully setup alerts for transactional replication latency? I have selected "Warn if latency exceeds the threshold" and threshold...

how to transfer new table during Replication - Hi, Can any one tell me how to transfer a new table during replication when we have all ready configured for...

Replication Vs Mirroring - Whats the difference between Replication & Database Mirroring? When to use which? Thanks, Usman

Replication between SQL 2000 and 2005 - All I want to do is to replicate a couple of tables between one server running SQl 2000 and another...

SQL Server 2005 : SQL Server 2005 Performance Tuning

Querying a Partitioned table is Super Slow - I have a large table that is partitioned by yearmonth. When I query on this table by the partition using...

How to get all activities on SQL server without using Profiler. - Hi All, How to get all activities on SQL server without using Profiler. I want to know is there any alternative for...

SQL Server 2005 : SQL Server 2005 Integration Services

data conversion - hi, I have two columns with data type unicode text stream [DT_NTEXT] in excel. in database i have varchar data type...

Insert / Deletes - I am working with a sequential file that is supposed to have all deletes at the top of each section...

SSIS Excel - I am reading from an excel spreadsheet into a SQL server table and this is working fine locally however when...

How to Change Connection String in Connection Manager permanently - Hello everyone, my problem is the follow, I need migrate a package between the Development server to the production server,...

TXT file for each table - i need to output all the tables but 2 from the database to a TXT file using SSIS? how can...

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...

File watcher task question - Installed File watcher task, then created a new SSIS package by adding the file watcher task in the control flow,...

SQL Server 2005 : T-SQL (SS2K5)

Why so many reads? - This code, when profiled in profiler does 22099883 Reads and 152173 Writes. Kind wondering, Why so many reads? [code] IF (SELECT count(*) FROM...

CAST.... - Hello Am running this query: SELECT T_ShipmentLines.ShipmentLineID, T_ShipmentLines.OrderID, T_OrderHeader.OrderTotal, T_OrderHeader.OrderDate, T_ShipmentLines.ShippedDate, T_ShipmentLines.ShippedValue, CAST(T_ICPAudit.Amount AS INT) AS Charge, T_ShipmentLines.ShippedValue - T_ICPAudit.Amount AS [Difference] FROM T_ShipmentLines...

Error when creating SQL Trigger - Hi all, I am a newbie in SQL scripts, appreciate if anyone can help. I have a table "SALEITEM", which has 4...

Dynamic SQL, conversion problem between varchar and money datatypes - create table mytable (fee1 money, fee2 money, fee3 money) create table mytotals (feetotal money) insert into mytable values (32, 11, 24) insert into...

Generate random number - Dear all I need your help on this ..How to generate 4 digit random number without using rand(),newid() funtion.. one...

Please help me in writing a query to retreive data from three tables - Hi, i'm trying to retrieve data from 3 tables. They are Table1: Station Sample Data : StationCode StationDescription 1 A 2 B 3...

SQL Server 2005 : SQL Server Newbies

How to Refer to A Computed Column in Access-SQL Database Query - I have several Queries which need to do calulations on calculated columns of data, however every time I attempt to...

Updating a field - Hello all, I am using SQL Server 2000 and I have what I think is a fairly simple question but I...

SQL Server 7,2000 : Administration

View User Permissions on Tables - I am looking for a script to run to list users and their permissions on tables. I see I can...

Backup Problem in sql server 2000 - Hi, my company is having sqlserver 2000 sp3a and we have windows 2003 sp1. I have been taking a back up...

Skip n rows while importing from Excel Sheet... - Hi! I want to skip first few rows from spread sheet while importing into table, as the & column header is @row#...

Error 1722 - (The RPC server is unavailable) occurred while... - I'm trying to see if it's possible to create an Alias for a named instance in order to avoid the...

SQL Server 7,2000 : Backups

Restore of 2005 mode 80 database - If I have a database running on 2005 that is in mode 80, can I restore a backup of this...

SQL Server 7,2000 : General

Syntax error converting the varchar value... - I am trying to pass a long text string in ado to a text parameter in a usp. When executing the...

select query - Hello, Briefly, I have 3 params(@col1, @col2 & @col3) in a sp. and i have a table say, table1 columns [col1, col2,...

SQL Server 7,2000 : SQL Server Newbies

How to create excel from stored procedure - Hi, I want to create an excel file from stored procedure through sql server. Any suggestions please? Thanks, Madhuri

Beginning Administration - The first in a series on basic administration of SQL Server servers and databases. http://www.sqlservercentral.com/columnists/sjones/beginningsqlserver2000administrationpart1.asp  

SQL Server 7,2000 : Performance Tuning

Disk Speed - Hi, Will faster disks improve query performance? Thanks.

SQL Server 7,2000 : Replication

Log reader agent faliure in 2000 - Hi, We are using 2000 SP4 on Win 2003 Standard edition. We are facing issues with the logreader agent intermittently. Log...

The process could not deliver the snapshot to the Subscriber. - Hi. SQL Gurus Please help me.  I have problem with merge Replication in sql server 2000. I have two servers which are located in different locations....

SQL Server 7,2000 : T-SQL

3 or more purchases over a 12 month period - Can this be done in T-SQL? I have a table with the following information: RowId CustomerNumber InvoiceDate TotalPurchased 1 13021 2001-07-03 00:00:00.000 1 2 13021 2004-07-21 00:00:00.000 1 3...

How to autoincrement a column by group using group by (sql server 2000) - [font="Courier New"]Is there a way to autoincrement a column by group using group by function under sql server 2000? Something like: SELECT storeid, storename, requirement, SUM(last_total), SUM(actual_total), SUM(daily_average), ????...

Commas within text to export to csv - Here's my situation. For some insane reason, my power user for an application set up his students with usernames comprised...

Index question - Can I build a index on a temporary table in a stored procedure?

GOTO vs WHILE - I'm looking into some coding of SP's in a database and see this construction several times: DECLARE @counter as int SET @counter...

Instead of Using Cursor? Other Ways? - Hi, all My SP runs slowly. I checked the source codes and found it is because of using the following...

MAX() Function Call from Application - Hi All, The following statement is called from the front end application. SELECT MAX(DOC_RECEIVED_DATE) from DC_DETAILS Total No of Records in that Table...

BEGIN and END in stored procedure - Is there any advantage/disadvantage to including the BEGIN and END block in a [b]simple [/b]stored proc, i.e. CREATE PROC MyProc AS BEGIN select...

Career : Employers and Employees

DBA as commodity in future - I had an interesting talk with my manager about future DBA career. He said he believe that in future DBA...

Programming : Connecting

SQL Server 2005 - how so I create a linked server to Access 2007 - Hi Folks - I am trying to create a linked server to an Access 2007 database, but, I can't seem to...

SQLServerCentral.com : Anything that is NOT about SQL!

No longer receiving emails from SSC about topic replies - As of a week or so ago, I no longer receive emails from SSC when a topic of mine receives...

SQLServerCentral.com : Suggestions

Most recent Scripts and Articles - As a regular reader of this site, i.e. every day, it would be useful to see the most recently added...

FireFox 3 not remembering login - Is it just me, or does the latest version of FireFox 'forget' about keeping me logged in here? I'm also having...

Points Suggestion - The points system is good as far as it goes, as it gives you a guide as to the degree...

SQLServerCentral.com : Podcast Feedback

Someone get this man some Hand Restraints - Great content, but harness them hands dude. They're flying all over the place.

Reporting Services : Reporting Services

export to excel 2007 - Hello gyus! is there some way to export the output of report to excel 2007? i am using reporting services in SQL...

text align properties in details of table set depending on value - I have asked this on another forum and can not get an answer. I want specifically to have the text in...

Adding two tables to report - I need to have two tables that get their data from a stored proc. Here's what I'm trying to accomplish: One...

Multiple Lines - Page Break - I have a report created only with TEXT datatype fields of SQL-Server The fields can have multiple lines and when the...

Reporting Services : Report Development

Dashboard report - Can you please tell me how to create dashboard report by using SSRS??? Advance Thanks:)

editable dropdown parameters ? - Is it possible to have an editable dropdown list parameter in SSRS? i.e. User should be able to type in the...

Remove/Suppress line/row if blank - In VFP there is a value called 'remove line if blank' which eliminates blank space. How it could be done...

Data Warehousing : Data Transformation Services (DTS)

Logging in DTS - Hi, I have a DTS where I have one Execute SQL Task. I need to log the number of rows affected by...

How to export sql server data into multiple excel sheets ? - [b]How to export sql server data into multiple excel sheets ? [/b] I don't want to do this from DTS or SSIS....

Microsoft Access : Microsoft Access

Syntax error converting the varchar value... - I am trying to pass a long text string in ado to a text parameter in a usp. When executing the...

Run SQL Stored Proc from access - Can anyone enlighten me? I am in the process of migrating a database from Access to SQL. I have put all...