In this issue

Featured Contents

Editorial

Featured Script

 
 advertisement
 
SQL Monitor Once in a while you come across a tool you just can't live without
…I can't imagine managing a large SQL environment any other way - Aaron Kolysko, Monsoon Commerce. Get started with SQL Monitor today - download a free trial
 
Red Gate Cloud Services “Thanks for building such a useful and simple-to-use service”
- Steve Harshbarger, CTO, 10th Magnitude. Get started with Red Gate Cloud Services and back up your SQL Azure databases to Azure Blob storage or Amazon S3 – download a free trial today.
 
SQL Server Connections 2012 SQL Server Connections Fall 2012
SQL Server Connections will feature SQLServerCentral.com speakers Steve Jones and Grant Fritchey on October 30, 2012 in Las Vegas, NV at the fabulous Bellagio. Register now.

In This Issue

Stairway to SQL PowerShell Level 1: SQL PowerShell Basics

What are PowerShell and SQL PowerShell and how do you use them? Level 1 of this Stairway will help you answer these questions, and start to show you why you might want to use this great tool. More »


The 2012 SQLServerCentral/Exceptional DBA Awards Party at the PASS Summit

The 2012 SQLServerCentral party at the PASS Summit is on and will once again include the awards ceremony for the Exceptional DBA of 2012. Get your tickets now. More »


SQL Saturday #164 - Cleveland

A free day of training in Cleveland, OH. Come see MVPs Allen White and others talking about all aspects of SQL Server. For free. More »


Working with SSIS Data Types

In order to be able to take data from a variety of sources, manipulate it, and then export it to one of several destinations, SSIS has to use its own data types. If you hit problems, then you may need to intervene to ensure an appropriate conversion. More »


From the SQLServerCentral Blogs - Startup Jobs

Are there things you need to make sure are running when your SQL Agent starts? Did you know that you... More »


Editorial - Wiggle Room

This editorial was originally published on Nov 9, 2007. It is being republished as Steve is on vacation.

I was talking with a friend the other day about the consulting business. We knew someone that was running a small consulting business and got an offer for a job. He had someone available that knew something about the project, but wasn't what most of us would call a guru. However the plan was to send this person because they were available and could probably do the job.

My friend and I debated a bit about the ethics here. We've both done consulting and know many people who have as well, sometimes getting themselves in over their heads on assignment. So for the Friday poll, I'm looking to see what others think?

How much leeway should consultants have?

It used to be that consultants were people that had spent decades learning some trade and then moved on as paid experts in the particular area in which they'd spent most of their career. Somehow in the IT world, maybe with our accelerated cycles, we've gotten to the point where someone graduating from college can be a "consultant", billed out to companies at very high rates.

I'm not sure of the ethics here. If you take the assignment and do a good job, learning as you go, does it matter? If you can't answer all the questions from the client and need to research, should the client get a break? Or are you mis-representing yourself?

I'll say that I've applied for jobs that may have been a little beyond my skills, and learned them as I went, but the employer usually knows this and it's a full time job, they should expect to train me, etc. But for consultants, you are usually paying "expert" rates, so you should get expert service. I know I've billed people lower amounts or even skipped billing them if I haven't performed well.

I have friends that just go out there, expect to get paid, know they don't know everything and kind of adopt a "caveat emptor" attitude. I have others that wouldn't take a consulting gig if they didn't know the material very well and thought the job was well within their skill set.

I think this is one area where our industry could use some maturity, but I'm wondering what you think. Let us know.


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.

The 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 like it, tell the boss!

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

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


Question of the Day

Today's Question:

What is the output of following command:

SELECT ISNULL(1,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.

Microsoft SQL Server 2012 Reporting Services

Create, deploy, and manage business intelligence reports using the expert tips and best practices in this hands-on resource. Written by a member of the original Reporting Services development team, Microsoft SQL Server 2012 Reporting Services, Fourth Edition covers the complete process of building and distributing reports and explains how to maximize all of the powerful, integrated SSRS capabilities, including the new and enhanced features. A detailed case study and sample reports are included in this practical reference.

Get your copy from Amazon today.


Yesterday's Question of the Day

How many rows should the four execute Queries return?

Answer: error,error,error,error

Explanation: The declared temporary table should not have the scope in the execute statements, so all statements should error out.

Ref: Scope of Temp tables in Dynamic SQL - http://social.msdn.microsoft.com/forums/en-us/transactsql/thread/FBADE138-E95E-4EC6-AA52-ED78B87752CC

» Discuss this question and answer on the forums

SQL Server 2012 Query Performance Tuning

SQL Server 2012 Query Performance Tuning leads you through understanding the causes of poor performance, how to identify them, and how to fix them. You’ll learn to be proactive in establishing performance baselines using tools like Performance Monitor and Extended Events. You’ll learn to recognize bottlenecks and defuse them before the phone rings. You’ll learn some quick solutions too, but emphasis is on designing for performance and getting it right, and upon heading off trouble before it occurs. Delight your users. Silence that ringing phone. Put the principles and lessons from SQL Server 2012 Query Performance Tuning into practice today.

Get your copy from Amazon today.


Featured Script

Calculate alphabetic sequence

This simple function allows to calculate a code sequence of letters. AAA, AAB, AAAC, ADF, .... AAZ, ABA, ABC, ... ZZZ 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 2008 Audit - I want to create a audit log of all my databases including the logins etc. is thier any script to...

data recover - Hi someone has deleted some records from a table and has also deleted the corresponding record from the audit log. It...

No blocking, queries running slowly, what to check next? - Background: Database developer trying to fill in for an actual dba on a contract. Environment: Web app with very poor data...

Health Check script for sql server 2005 - Hi Experts, need a small help as i want to do health check on my sql server 2005, i was wondering...

SQL Server 2005 : Backups

sql 2005 and logshipping - hi, I have a basic question since years ago now, I did not find any solution. One database on one server name...

SQL Server 2005 : Business Intelligence

Anything out there better than SSRS - Hi All Beginning to look around for other BI tools. Don't have a vast amount of knowledge in this area, but...

SQL Server 2005 : Development

Fragmentation of Clustered Primary Key - I have a table which has a clustered primary key on one int column, which is an identity (1, 1)....

How to get current week as 0 for any year using week - Hi, I need to display current week as 0 for any year in the report......using week column in week table. I have...

SQL Server 2005 : SQL Server 2005 General Discussion

DB Growth and Production DB Log FIle - can any one give suggestion below issues... 1) can any one give sql script for to get the how DB Size...

Error with DBCC CHECKDB - I am getting error while executing DBCC CHECKDB on one database that shows [b]CHECKDB found 0 allocation errors and 1...

SQL Server 2005 : SQL Server 2005 Security

I cannot take full backup of sql server 2005 database because there are permission - I have sql server 2005 connected to dynamic navision i try to take full backup today from sql but it...

SQL Server 2005 : SS2K5 Replication

Creating Alert and Notifications for Replication Issues on SQL Server 2005!!! - Hi All, I have been assigned a Task to set up Alert and Notifications for all the Issues arising in Replication...

Database Mirroring - Hi Gurus, Due to some network glitch mirroring connection is disable. Is it possible establish the connection automatically once network connected...

SQL Server 2005 : SQL Server Express

bcp error: Unable to open BCP host data-file - I get this error message: SQLState = HY000, NativeError = 0 Error = [Microsoft][SQL Native Client]Unable to open BCP host data-file if I try to run...

SQL Server 2005 : SQL Server 2005 Integration Services

switch to unicode - I have about ten SSIS packages that use varchar and char columns in tables. Most are built from the wizard. Is...

How to read data in a pdf file in SSIS - I was wondering if any body had a situation where data needs to be extracted from pdf files and exported...

SQL Server 2005 : T-SQL (SS2K5)

hierachy with miltiple parent - Childid Childname Parentid pid 100 Bingo 200 1 101 Pingo 201 1 102 Zingo 201 1 100 Bingo 201 2 101 Pingo 200 2 102 Zingo 201 2 100 Bingo 201 3 101 Pingo 201 3 102 Zingo 200 3 100 ...

Remove redundant data from address column - Hi, Consider the folllwing two records: [code="sql"]if object_id('test') > 0 drop table dbo.test create table dbo.test ( master_id int, Title varchar(20), Forename varchar(50), Surname varchar(50), Address1 varchar(200), Address2 varchar(200), Address3 varchar(200), Address4 varchar(200), Town varchar(100), County varchar(100), Postcode varchar

Trigger permissions - A customer's database loses data from one specific table when a particular user logs on to the Application. I have...

Use Variable as SQL column Name in query - Hi all, Is it poosible to use a variable as a column name in SQL? EXAMPLE: [code="sql"] DECLARE @ColumnName VARCHAR(100) set @ColumnName= 'Date Received '+ GETDATE()...

SQL Server 2005 : SQL Server Newbies

Default dates? - Hi, I am trying to update @start and @end date in my report with the coding logic below at [u]report...

SQL Server 7,2000 : Administration

SMTP Mail - Need xpsmtp80.dll - Hi, I'm trying to set up SMTP mail, and I can't find the required DLL, all the posts I found...

SQL Server 2008 : SQL Server 2008 - General

Log in Issue - Hi All, I installed SQL SERVER 2008R2 on my Desktop. When i installing SQL SERVER RUN as ADMINISTRATOR because my...

Roll Up Function - HI Guys, [code="sql"] CREATE TABLE My_Table ( Work_Id VARCHAR(100), Project_name VARCHAR(100),country VARCHAR(100),region VARCHAR(200), Current_Actual_Saving FLOAT,Current_Forecast FLOAT,Current_Metric FLOAT, Prior_Actual_Saving FLOAT,Prior_Forecast FLOAT,Prior_Metric FLOAT,Prior_2_Actual_Forecast FLOAT, Prior_2_Forecst FLOAT,Prior_2_Metric FLOAT)

understanding actual mechanism of data encryption sql - I am aware of method of encrypting data but I want to understand the actual mechanism of encrypting data using keys and...

Can a table have two primary keys? - Can a table have two primary keys

session limiting for a particular user or for all users - how to limit a session for a user for 30 minutes after which he automatically gets disconnected and has to...

Import data from SQLite database into SQL server 2008 Database. - Hi I have to Import/Export data between SQLite and SQL server 2008 databases OR I want to convert SQL Sever 2008...

SQL SERVICE - I have 3 instances on SQL 2008 , when i tried to restart one of the sql service of an instance...

Backup SQL Server file to remote Hard disk - Sir, I Want to backup sql server file in remote hard disk directly.But sql server takes only internal drives as...

IN Clause Question - The top part of this works. I'm trying to pass to an "IN" list on the bottom. What is the...

How to display date in format of dd-MON-yyyy? - I have textbox for Date which displays Subscription_date field of dataset1 in format dd-mm-yyyy. Now i want this format to...

Request a lock before performing an action - Is there a way in SQL 2008+ to request a lock on a SQL object before attempting to modify it?...

lables in ssrs - How i can display two values in same label.but i want to show second value in bracket().i am using this...

Seeking advice on database maintenance and transation log - We have database maintenance procedures which, in addition to performing backups, remove records older than a user-specified time limit in...

Memory Consumption -- CACHESTORE_SQLCP and MEMORYCLERK_SQLBUFFERPOOL - We have SQL Server 2008 box with 16GB physical memory. Maximum server memory in SQL Server has been set to...

Downgrading from Ent to Std - Hi all I was wondering if there was any decent articles on downgrading a SQL server from Ent to Std and...

Master-detail reporting question - Requirement: A product line can have 1 or many products. When a product line has all its products out of stock,...

Traces running with NULL FileName,MaxSize values - On one of our servers we can see 3 traces running with NULL FileName, NULL MaxSize. When geting the data...

How to do sql DB compare and sync in automated - HI How to do sql DB compare and sync among two database from different server and it will be automated...

Replication Issue. Inserting through a Trigger. - Hi All, I just setup the replication in my environment. Table structure. CREATE TABLE [dbo].[pwallet_tran]( [TId] [int] IDENTITY(1,1) NOT FOR REPLICATION...

Suggestion on how to implement a custom rollback - Hello Experts, I am trying to come up with a better solution for our intranet web application (running on SQL Server)....

List of all numbers between low and high - What is the best way to get a list of all numbers between low and high numbers? Thanks. Actually >= low,...

procedure started taking longer time to retrieve data in last two days - Hello, I was running a procedure to retrieve data which usually took 14-20 seconds but in last two days it started...

SQL 2008 R2 - peer to peer replication - Hi, We are setting up a POC of SQL replication between two indentical SQL server (including hardware). The concurrent updates (same...

How to display current week as 0 for each year - Hi, I have a report requirement where I need to display current week as 0 for any season year user selects....like...

can any one plz give some idea about SQL Server Integration Services (SSIS)? - here i am having two database and i want to mapp the data related to that tables

common table expressions - Hi I have used recursive common table expressions which i really like. is there such thing as a non recursive CTE? how...

devArt SQLComplete vs RedGate SqlPrompt - I wanted to get other's opinions as well as share my own. I just came across a pretty good product from...

Query to see what components or features are installed - I've been trying to find a simple way to query to see what components and features are installed on my...

SQL Server 2008 : T-SQL (SS2K8)

Select from a cte - Hi I have a CTE statement i want to select from, I know there is the option of using multiple CTEs...

SELECT INTO SQL2K8 from SQL2K - Hello; the below sql statement was executed in the 2008r2 server under SA credentials [code="sql"]SELECT * INTO TEST1 FROM SQL2KServer.DB1.dbo.Table1 [/code] the object was creates...

URGENT HELP PLEASE - I have this select statement: select a.active from sys_scd_profile a inner join sys_scd_profile_activation b on (a.id = b.profile_id) where a.active = 1 and b.date_deactivated is...

What is the performance bottleneck here? - [b]DISCLAIMER[/b] I did [i]not[/i] this code Assume that #InstitutionChild is just a temp lookup table filed with about 95,000 int values Ex:...

View Help - Hey guys, So I have this view, and in creating this view, I want to pull all these invoices that were...

Group the common word - Hey, Can you please provide some on idea on group the common word? Example: Code Desc A1 AAAA BBBB CCCC A1.1 AAAA BBBB...

Date Format Problem - Hi, I have a little problem where my Database stores Dates in 'yy/mm/dd' format. I want to retrieve Date in 'dd/mm/yy' Format. I...

Partitioned Table performance Question. - I've been having a look at a project that is underperforming when selecting from a view, and noticed that in...

0 is equal to zero length string. Can someone explain how this can be? - --I know this has to do with an implicit conversion of the varchar to int, --but why does the zero...

Pivot And Unpivot Table - Hi, I am a newbie in sql server.I have came across various article on internet which shows how to implement pivot...

Addition Of Digits - Hi, This was the question ask to one of my friend during an interview. He was ask to perform the addition...

rolling monthly analysis - Hi All, I'd like to perform a rolling monthly analysis. Let's say I have a sales table and if a client has...

Query Help- Cursor change into FOR WHILE LOOP, TEMP TABLE - I have created a STORED PROCEDURE, which includes 5 different CURSORs. The company I am working for has just informed...

SQL Server 2008 : Working with Oracle

Receive Data from Oracle Internet Directory - Hi all... I have to create a view that shows data from a OID (Oracle Internet Directory). I created a linked server,...

SQL Server 2008 : SQL Server Newbies

SQL installation error - Dear All, Im trying to install MS SQL server in my local desktop which is using 'Windows 7' operating system(64 bit)...

Landing The First SQL Job.... - Hello All! I currently am a plumber by trade, been in that industry courtesy of my father in law since graduating...

A need to be exposed - career wise that is! - Morning all, I was lucky enough to be promoted at the beginning of this year and am now the sole...

Enlisted or Drafted? Share your experience. - Some people ask to be a SQL Server DBA, some are drafted or rather are a "DBA by default". I...

SQL Server 2008 : Security (SS2K8)

Security - Owned Schemas - Hi All I'm trying to understand something regarding SQL Server security If I have a SQL Login and that Login is also...

How to add NTFS computer account permissions - I'm having an issue with a SQL 2008 R2 cluster. Recently I had to move the system databases off a...

Open port? - Almost all our SQL servers are behind firewall. We have in house developed applications using these SQL servers. but I...

SQL Agent database role and xps - Hello, I recently performed a server migration and I'm left with some SQL Agent issues. I restored an msdb from one...

Permissions on Service Account - I was under the impression that when you specify the SQL Service Account during install of SQL Server, ALL rights...

SQL Server 2008 : SQL Server 2008 Administration

Downgrading SQL question - Hi all - I am wanting to downgrade an instance of SQL but need to ensure we are not using any...

Errors in automated restore job, but this worked in 2005 - Hi - I have some very simple code that kills all the user pids, then switches the db to single use...

copy maintenance plan - We have quite a few SQL servers in our enviroment. And we setup standard maintenance plan with 5 subplans like...

Tempdb log file location and Filegroup optimizations - I've been reading articles about tempdb optimizations and I already understand a lot better the different ways to archive it....

Delete data in tables/performance issues - Hello, I need an advice, I need to get data daily from one server to another, pretty much I will truncate...

Rolling back Service packs (SP2 to SP1) for SQL Server 2008 - Can anyone please suggest me any method to rolling back "SQL Server 2008 SP2" to "SQL Server 2008 SP1". I...

Hash Partitioning - Hi All, I am in situation where I am not sure how to divide / Partition the table, and send the Data...

Career : Resumes and Job Hunters

How can I attract Senior Database Administrator candidates? - I have a few full-time DBA positions open on my team, one of which is for a Sr. DBA. We...

Programming : Connecting

MySQL as linked server - Hi everbody I need some suggestions I Have a sql server(2005) default instance in Windows Server 2003, I need to connect...

SQLServerCentral.com : Anything that is NOT about SQL!

The SQL Saturday Thread - I figured I'd start a thread (I don't think anyone's done so) for all things [url=http://www.sqlsaturday.com/]SQL Saturday[/url]! I'm heading down to...

Discussion: is e-Commerce making a mockery of SQL Server? - Some of you may have heard of my latest tales of woe, in that I am in an environment that...

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

Exporting - Hi Guys We are having an issue exporting from SSRS reports into any format. The error: Message "Microsoft Office Excel cannot access the...

SSRS blocks up the whole SQL2005 server - Hi guys, I have an subscription that normally runs in the evening. 84 reports are built by this subscription. It's done...

two values in Label in ssrs - How i can display two values in same label.but i want to show second value in bracket().i am using this...

Reporting Services Parameter Bar Customization - Is it possible to customize the parameter tool bar in reporting services. By default "View Report" button is shown on...

Reporting Services : Reporting Services 2005 Development

HELP in MDX... - Hi, I am creating a report in SSRS using MDX. In one of the Datasets I need to do something like...

Data Warehousing : Integration Services

SSIS - CheckPointFile - I am using CheckPointFile and the following properties i have set in my package. CheckPointFileName: checkpointlog_oms.chk CheckPointUsage: IfExists SaveCheckpoints: True I am able to...

Help Read single value from a text file in SSIS - I have an ssis package that imports data from text files to sql tables. However there is also a single line...

Data Warehousing : Strategies and Ideas

Show Right Column to Right User - If I have three different user with different occupation (manager, salesman, accounting) The main question is to how display right column...