SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

Featured Script

The Voice of the DBA

Good Practices for Software Development

Would you post your password on a wall in your office? Of course not, because other employees, the cleaning crew, even guests walking around your office would be able to access your system with your account. When I read Brian Kelly's post on passwords in files, that's what I thought of. Sticking credentials in a file, where they're subject to any kind of search, is a bad idea.

However this happens all the time. Combine this with a few other "common practices" like using sa to connect to a database and building dynamic SQL, and you might as well just set blank passwords and invite someone to have fun with your database. It's sad that we continue to see these types of software development practices in 2014, and especially poor to see them from companies that sell software.

There is so much information out there on building software that is of higher quality and is much more secure. However all too often I find developers just aren't implementing these practices. There are probably a myriad of reasons why, and I wish we had more ways to better train people, disseminate the information, and enforce it's use.

Ultimately we can only do what we can. However I'd encourage those of you that see poor practices taking place to have a word with the developer (internally), or send a note to the vendor. If it's more important to make a few more dollars than implement better practices, I'd encourage you to publicly call some attention to the matter. Maybe a little exposure to the dark side of software development will pressure managers to require more secure work over time.

Additional Articles from SQLServerCentral.com

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


The Voice of the DBA Podcast

Listen to the MP3 Audio ( 2.0MB) podcast or subscribe to the feed at iTunes and LibSyn. feed

The Voice of the DBA 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.

Everyday Jones

Follow Steve Jones on Twitter to find links and database related items and announcements.

ADVERTISEMENT
14 SQL Server Backup Questions You're Too Shy to Ask
Grant Fritchey answers questions on...
SQL Server versions
Using RESTORE
Using MDF files SAN backups
Writing to disk
Native backups Widows backup tool
Backups on a shared network
Write access Verify flag
Sensitive information
Backing up the small stuff Log retrieval
Extracting build scripts
Download the full article.

Featured Contents

 

XML Workshop : Utilizing Relational Data In XML Files

Matthew Pettit from SQLServerCentral.com

Have you received an XML file that must be migrated into a production database? Today’s workshop dives into an ad hoc method of processing relational datasets delivered in an XML file format. More »


 

Prevent multiple users from running the same SQL Server stored procedure at the same time

Additional Articles from MSSQLTips.com

There is a stored procedure that must be run by only one user at a time. In this tip, learn how to prevent multiple users from running the stored procedure at the same time. More »


 

From the SQLServerCentral Blogs - Microsoft Azure Automation

Grant Fritchey from SQLServerCentral Blogs

Microsoft just announced a new mechanism for managing your Azure resources, Automation. You can check out the documentation on it... More »


 

From the SQLServerCentral Blogs - Journey of an On-Premises DB to Azure VM – SQL Server 2014 makes it easier!

AnupWarrier from SQLServerCentral Blogs

SQL Server 2014 is deeply integrated with Windows Microsoft Azure and moving an On-prem database to a Microsoft Azure VM... More »

Question of the Day

Today's Question (by Steve Jones):

In SQL Server 2014, how many Always on secondary replicas can you have?

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


We keep track of your score to give you bragging rights against your peers.
This question is worth 1 point.

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

ADVERTISEMENT

Microsoft SQL Server 2012 High-Performance T-SQL Using Window Functions

Optimize your queries—and obtain simple and elegant solutions to a variety of problems—using window functions in Transact-SQL. Led by T-SQL expert Itzik Ben-Gan, you’ll learn how to apply calculations against sets of rows in a flexible, clear, and efficient manner. Ideal whether you’re a database administrator or developer, this practical guide demonstrates ways to use more than a dozen T-SQL querying solutions to address common business tasks. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

What is the amount of free disk space required for your durable memory-optimized tables?

Answer: twice the size of the table

Explanation:

The requirements state that you need twice the size of your durable memory-optimized table in free disk space.

Ref: Requirements for Using Memory-Optimized tables - http://msdn.microsoft.com/en-us/library/dn170449%28v=sql.120%29.aspx


» Discuss this question and answer on the forums

Featured Script

Count all records the tables

Andrés Michaca from SQLServerCentral.com

This script will return a count of all the records from the tables that exist in a database

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 2014 : Administration - SQL Server 2014

SQL Azure with SSD's - Hi - Anyone running SQL Azure residing on SSD's? I have a very volatile OLTP environment that we'll be splitting up...

Help me out - [url]http://msdn.microsoft.com/en-us/library/dn170449(v=sql.120).aspx[/url] [u]Under Requirements:[/u] "Free disk space for that is two times the size of your durable memory-optimized tables." [u]Under Important Notes:[/u] "The total in-memory...

Having same server name for principal and mirror server, does it work? - I have a mirrored database from server SRV-SQL01 (principal) to SRV-SQL02(mirror). Users/Developers access SRV-SQL01 via a DNS alias called "App-SQL". Developers have...


SQL Server 2014 : Development - SQL Server 2014

convert decimal to int in case condition - i have a table exam_setup CREATE TABLE exam_setup ( setup_id INT, sub_id INT, assignment decimal(4,1), attendance decimal(4,1), INT_1 decimal(4,1), INT_2 decimal(4,1) ) table values are, sub_id = 75, assignment = 25.0 attendance = 15.5 INT_1 =0.0 INT_2...

Microsoft SQL triggers on columns - Dear All I have one table namely consumer with approx 50 columns. I have created one same table with audit prefix including...


SQL Server 2012 : SQL 2012 - General

ALwaysON - I have a 4 node alwaysON with default instance. I installed 2 named instance and while configuring a listener it...

How Do I EDIT ALL SPARSE Columns in SSMS 2012? - I am using SSMS and want to use the EDIT CONTEXT MENU to update some Rows. Only some SPARSE fields display...

Which to install first Sql Server Management Studio and then the latest SSDT or the latest SSDT then tools - I am wondering if I can avoid the bloat of the 2012 Visual Studio IDE and go straight to the...

How to synch the DB between 2 servers - Hi I have 2 server PROD n DR server all the PROD server DB is synched to DR server through log...

Setting up HADR between two stand alone servers - Hi All, Does anybody know how I can set up HADR between two stand alone servers? Is it even possible to...

Cache - Hi all, If any one worked before, please give me pros & cons of App fabric cache and proc cache. What are the...

How to Install BOL Books OnLine Locally - Has anyone been able to install BOL on the SQL Server 2012 itself? In 2008 and earlier, if BOL was installed,...

DB setting that affects dbcc checkident(reseed)? - Greetings, I have encountered an anomaly & was wondering if anyone knew what might be the cause. The dbcc checkident(reseed) command behaves...

Constraint Vs Trigger - Hi, I am facing a question which I cannot really have an answer without having a second opinion. My application have a...

Trigger and commit - Dear All I have a update trigger. In this trigger I need to insert few records in 3 tables. If error...

Database monitoring - Currently there are various teams accessing the database. For costing reasons, we need to track usage. Is there an efficient way...

DB Chaining and Ownership chains - Hi all I am getting the following error when trying out DB chaining and Ownership chains Msg 916, Level 14, State 1,...

Optimizing Query - Hi, Script attached which needs to be optimized. Request background: 1) Add a new record with top priority Related Requirement: 1) Modify the priority of...

SSIS import - The column delimiter for column "COL1" was not found. End Error Error: 2014-04-14 17:08:09.95 Code: 0xC0202092 Source: Load PEFC MTD...

SQL Server 2012 studio multi-language support - Hello Dear DBA colleagues, What's the best way to change SQL Server 2012 management studio default language to spanish/portuguese ?, we are...


SQL Server 2012 : SQL Server 2012 - T-SQL

What are DMV? Can some one teach me with examples. - HI I want to find how to use DMV and when to use them?

Normalize values from column split using tally table - I have a table that has the following structure: EntryID int, Categories varchar(200) values look like: 541,'A,B,C' 345,'B,C' 234,'A,C' 657,'D,E' 435,'D' what I want to do is extract the...

Weekly Best Seller - Hi there I have a table containing products sales by Year and Week. I would like to know how many times...

Replacing UNION in TSQL 2012 - Gents, I have been looking for the most optimal way to replace UNIONs all over the internet and I can't...

Need assistance with making a sproc SQL Injection proof - Hey guys, its beena while since I've been on a team where there is a web app so I'm having...

How to check column name in case sensitive? - Hi Friends, I have a table called SrcReg which is having a column name called IsSortSeqNo smallint. I am mapping this...

Get original order quantities and dates, and find any changes or additions to quantities in subsequent order version(s) - I am due to work on this problem, but I have a lot of trouble trying to figure out how...


SQL Server 2008 : SQL Server 2008 - General

SSRS Matrix not showing all the entry for a Column Groups - I created a Matrix in my SSRS report and for some reason if the COLUMN GROUP has more than one...

Sql Server 2008 R2 data base sharing issue - Hi We have sql server2008r2 installed on a virtual server. Our IT Admin has given me and my collegue access to the...

Allow user to create/delete/alter objects within schema only - I am preparing a database for a vendor system to be installed. The requirements say to create a database and...

SQL Server 2008 R2 Resources Issue - Hi all, We have a sql server with the following resources: Processor: INtel(R) Xeon(R) 1 CPU X5690 @3.47 6 cores RAM: 20.0GB SQL...

OPENROWSET with UNC works from server, not from client - Microsoft SQL Server Enterprise Edition 64 bit: 10.50.1600.1 Windows 7 Enterprise 64 bit (both client and server) Microsoft Access Database Engine 2010...

Question:Can you trace a query (just a query text) - I just got this support request,simple: @sqlteam can their be a trace set on following query since its running slow...

Field definition in view - I have a view that assembles fields from another table into a single string. The result is fairly small, 56...

Does the execution plan various version to version in sql server 2008 - Hi, Does the execution plan various version to version in sql server 2008? running the query in express edition it not showing...

MSDTC Issue - We have a active/passive node environment which works consistently however last night it failed due to the following sql error...

Drop Identity column from temp table - Hi I'm selecting * from my perm table into my temp table(SELECT * temp INTO FROM perm), and it will also select the...

Error installing MS SQL Server R2 Enterprise (x64) - Hi Everyone, Recently I attempted to upgrade from MS SQL Server to MS SQL Server R2. However I have encountered an error,...

Connecting other sql server database from sql query - Hi , I am writing stored procedure in sql server called SERVER1 and inside same procedure i want to access another...

Cannot resolve the collation conflict between "Latin1_General_CI_AI" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation. - how to reslove this error Msg 468, Level 16, State 9, Line 7 Cannot resolve the collation conflict between "Latin1_General_CI_AI" and "SQL_Latin1_General_CP1_CI_AS"...

SQL Server Wait Time Clarification - I recently collected the wait times on one of our servers. We know we have a disk issue and it...

SSIS Package - HOW TO USE - I am new to SQL, I created a table on a destination database and I am trying to transfer data...

Insert INTO Select - Hi I have this problem to solve. I have to get any table as input parameter, then create a temp table...

Aggregating data by Ranking and grouping - Hi There, I need to aggregate data and display it by ranking. I have a table called learning which has the...

Table size not reducing after large data delete and index rebuid - Hi I have a table with 160GB data size. To reduce size, I set the values of a varchar(max) column to...

Query optimization help - I have one simple query to optimize but somehow after creating couple of index this query is still having more...

Agent Job Authentication error accessing linked server - I have a SQL agent job which has been running daily for a year. It fires a stored proc which...

SSIS & Webservice Call Timeouts - I have an SSIS package with a single task (a Script Task). The script task calls a webservice (an .aspx...

Data Collector - collection_set_4_noncached_collect_and_upload job failing - Morning All I have not seen this before with all the instances of data collector I have set up but could...


SQL Server 2008 : T-SQL (SS2K8)

Store inventory/Liquidations and purchases - Hello All, See code and desired results below. Given a groups of stores one of which is deemed the model I would...

Joining where values do not equal one another - I have two select statements; one for open purchase orders, one for open customer orders. I would like to be...

Difference in variable definition - Hello, Is there a difference in the following: [code]DECLARE @T1 VARCHAR(50); SET @T1 = (SELECT TOP(1) Col1 FROM MyTable); -- define variable first...

sysservers error when running an SQL script - Hi there I am getting the error "Could not find server 'bmf' in sysservers. Executive sp_addlinkedserver to add the server to...

Getting heirarchy - I'm struggling to prepare a recursive t-sql for the below scenario User table user id (int) active (bit) Reporting table userid (int) reporting_userid (int) Assume I have...

Performance related question - asa

Pulling incorrect records using date range in where clause - Hi All, I've been experiencing difficulty with pulling records using a where clause date range. I'm using this: select * from dbo.ACCTING_TRANSACTION_hISTORY where ath_postype...

Problem with SQL statement pulling out incorrect data - Hi there folks I'm not at all adept at using T-SQL, and I've got a problem with a script that I've...

SQL Help requested to Get Daily and Weekly OT - Hello Everyone, I need to pull a report from a table which gives me daily totals, I'm asked to get regular...


SQL Server 2008 : Security (SS2K8)

SysAdmin server role and Active Directory Groups - I've been struggling to find best practices information or any advice regarding Active Directory Groups that provide group members with...


SQL Server 2008 : SQL Server 2008 Administration

How to Unlock the Database - Hi All, How to Unlock the database in sql 2008. is there any Query to Unlock database.... Regards Jagadeesh...

How to search for replication information messages e.g "The initial snapshot for publication is not yet available." - I have been working a lot with replication the last few weeks. The replications I was working on are all...

SSRS 2008 R2 - I have created reports in SSRS 2008 R2 and i created data-source with remote server database (database in remote server)...

How To Optimize a Query in SQL2008 - Hi All, Am Using SQL2008, I want to Optimize a Query,Where can i check the Recommendations like whether i have to create...

change datasource of server in [sys].[servers] - We will shutting down an older sql server and standing up a newer 2008 version using the same server name...

SQL Server 2008 R2 in hung state. Need help in analyzing the log. - 2014-04-20 20:02:08.51 spid5s SQL Server has encountered 28 occurrence(s) of I/O requests taking longer than 15 seconds to complete on...


SQL Server 2008 : SQL Server 2008 Performance Tuning

Issue with specific table accessing having Performance issue - Hi All, Having a DB of 400GB,with 3 .ndf files and don't have any additional file group for indexing, the SP's...

Odd Results from an Indexed JOIN Column - Hello there! Starting off with some DDL... [code] CREATE TABLE #AgentSession( [sessionId] [int] IDENTITY(1,1) NOT NULL, [dirSrvSessionGuid] [uniqueidentifier] NOT NULL, [serverId] [int] NOT NULL, [projectId] [int]...

script to find most expensive queries across all databases - Hi, I have the following query that returns most expensive queries. The issue with this query is that it seems...

Problem with concurrent insert into a partitioned table - Hi i've a problem with the concurrent insert into a partitioned table. I have two processes which write data to different...

Need to generate Report from a Busy Database - Hi All, We have a production database which is busy throughout the day and need to generate report from the same....


SQL Server 2005 : Administering

Session hangs - Hi friends Executing procedure on management studio usually takes 10 minutes, it took over an hour today. I had no...

optimising table for distance queries - Hi I have a table which has a couple of million records in it which relate to locations around the world. I...


SQL Server 2005 : Backups

how can i restrict the query on query window that contain *(astric) - how can i restrict the query on query window that contain *(astric) EXP:- select * from emp want to stop this king of query,only...


SQL Server 2005 : Development

Extracting data from XML is slow and filling tempdb transaction log - I am trying to extract data from an XML column within a table on SQL Server 2005. The table as...


SQL Server 2005 : SQL Server 2005 Integration Services

Script Task to Copy Same File Over & Over & Rename Uniquely (Odd Request I Guess) - I'm working on a project for a client that initially loops through a folder where several Excel spreadsheets are found...


Reporting Services : Reporting Services

Report STyle - I need to graphically display the following : Location Capacity FreeCapacity Europe 500 250 Asia 400 50 Africa 400 300 I saw somewhere like a bar which was...

Problem: Execute and Save SSRS Report through Console App - I think here is a problem, in path of report- // Path of the Report - XLS, PDF etc. string fileName = @"Dev\SalesSupport\TestWethose...

error logs/error information - I am a newbie to SSRS. I am running SSRS 2012 on a remote VM that points to a database...

SSRS Grouping - Hi, I have a requirement in SSRS as shown in the attachment. Please suggest me how can i achieve this. ...

SQL/SRSS Newbie Assistance Needed :) - Hi all: Ok, I'm somewhat new to SQL/SRSS and could really use some help in getting started on something I"m tasked...

ssrs text at last page of the report - In my report i am using one tablix and one text box. Text box always bottom of the last page,...

Report Builder 3.0 Exclusion Query based on Parameter and Field Values - Hi, I am creating a report which has a Full and Partial Parameter. If the Partial parameter is selected I want...

Windows File Share Delivery/ SSRS 2008 R2 - Hello All, I was aware that a subscription could send a report to a file share but just got into the...


Reporting Services : Reporting Services 2005 Administration

Domain migration and Reporting services 2005 security - We are in the process of moving from domain a to domain b, afterwards we will be severing all links...


Reporting Services : Reporting Services 2005 Development

Change Shared Datasource Password - Hi All, I have created nearly 50 shared DataSource , which is supported for nearly 300 RDLs. The Password credential for...


Reporting Services : Reporting Services 2008 Development

how to display month and year in header of report - Hello, I have a parameter called start date (@startdate) and I f I give the date as '10/1/2013' when I click...

Expression to show or hide the tablix based on filter id - Hello, I have a tablix and I filtered with schooltype value as 2 In my dataset if schooltype value is...

Dounut Charts in SSRS 2012 - Can anybody Help me with the following : 1) How to Customize the thickness of a dounut chart. Basically I have...

How to convert nvarchar to date data type? - I have to convert nvarchar to date data type. and fetch the week number of that particular month from the...


Programming : General

Help with Syntax error - Having some trouble with a syntax error related to the FROM statements on line 65 and 95: [code="sql"]Use PARCS_DB GO TRUNCATE TABLE tbl_Utilities_PARCS_LiveValue TRUNCATE...


Programming : Powershell

SQL Server Detach database - Hi I am a SQL Server DBA and have never used Powershell before. I'm trying to detach a database using Powershell,...


Data Warehousing : Integration Services

SSIS Logging from within Stored Procedures? - Dear all, I am new to SSIS 2012 and I really like the default logging features. As many, I use a mixture...

Get values from two similar tables with Join condition - Hi everybody, I have an issue with the join of two tables without PK. Both are in two different servers...

Execute SQL task assign to variable - Hi, after getting pretty deep with SSIS I put it down for six months. Now I can't do something embarrassingly...

Any possibilities to save the message tab information in SSIS - Hi All, I have a package to execute the .SQl file in a folder. Is there any possibility to save message...


Data Warehousing : Analysis Services

Dimension Processing - Hello I would like to know if it's possible to process dimensions in parallel. If I open SSMS and connect to...


Data Warehousing : PowerPivot

Swapping table from one data source to another - Have a powerpivot book with two data sources. A Table that is linked to one data source needs to be...


SQLServerCentral.com : Anything that is NOT about SQL!

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


SQLServerCentral.com : Articles Requested

Export with Headers - How can you export data from a query, using bcp, SQLCMD, etc. and include the column headers at the top?...

This email has been sent to {user_email}. To be removed from this list, please click here.
If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com.
This newsletter was sent to you because you signed up at SQLServerCentral.com.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.
This transmission is ©2014 Red Gate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com