As a software developer, I learned about the value of version control over time. My first forays into development were as a child, where I made a single backup of my code on a separate floppy disk in the event I had an issue. This was my one-man-wolf-pack version control system, and it served me well, although it wasn't efficient. In a few of my early development positions, we zipped up all our code each night to a separate folder, giving us the pentagram-version-control system. This worked as long as we didn't need to go back over a week, but it still wasn't very efficient. I think that because we worked on fairly small projects and could hold most of the code in our minds, we muddled through issues.
Later I was introduced to a real version control system (VCS), Visual SourceSafe. Some of you cringe, but that system worked well. We could see the differences in code, and over time I learned to cut loose with my development, just trying new things, knowing that I could easily revert code backwards without much effort. Since then I've worked a bit with Subversion and Git, both of which seem to be very capable, mature systems. I still plan on getting some work done with Mercurial and TFS at some point, just to compare the features and functions.
I started source controlling my databases after reading an article by Bill Wunder. This was over a decade ago, and it seemed to make sense to me. All of the things I had learned about VCS worked with databases as well, and I learned that having a database under VCS provided me with some stability in development, including the ability to roll back to previous versions of code when we found bugs. Trust me, checking out a previous version of a stored procedure is much, much less stressful than restoring an old backup just to look at stored procedure code.
These days I see more and more people putting their databases under version control, which is comforting. It makes me think that we, as data professionals, are maturing in our industry. However there are still lots of people out there that don't use a VCS for their database (DDL) code. Some don't even use a VCS for their application code.
There's no excuse these days. Subversion and Git are free and open source. Download them, spend a few days, and get control of your code. All of the ways in which you can improve the efficiency and quality of your software start with more knowledge, and a bit of version control on which to apply your craft.
The Publisher is the database where all
replicated data originates. Each Publisher can have multiple publications
defined within it. Each publication contains a set of articles that all need to
reside in a single database. Each article corresponds to all or part of a single
database object. A single database object can map to an article in more than one
publication. More »
When a SQL Server database is operating smoothly and performing well, there is no need to be particularly aware of the transaction log, beyond ensuring that every database has an appropriate backup regime and restore plan in place. When things go wrong, however, a DBA's reputation depends on a deeper understanding of the transaction log, both what it does, and how it works. More »
For loading text, CSV or XML files into SQL Server, the Log Parser utility, with its amazing SQL engine, is likely to be the obvious choice. Although initially developed purely for converting IIS logs, the Log Parser can turn its hand to a range of formats including even event logs or the Windows registry. More »
Have you ever wondered if that black box in your datacenter called the network is performing as well as it... More »
Question of the Day
Today's Question (by Steve Jacobs):
IN BIDS (SQL Server 2008 R2), which one of the following returns the system's container start time in either of the following formats? Please keep in mind you are using this variable in email messages.
MM/dd/yyyy h:mm:ss tt
M/d/yyyy h:mm:ss tt
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
2 points in this category: Integration Services (SSIS).
We'd love to give you credit for your own question and answer.
To submit a QOD, simply log in to the
SQL Server Hardware will provide the fundamental knowledge and resources you need to make intelligent decisions about choice, and optimal installation and configuration, of SQL Server hardware, operating system and the SQL Server RDBMS.
Pick up your copy of this great book from MVP Glenn Berry at Amazon today.
Yesterday's Question of the Day
(by Ford Fairlane):
True or False: In SQL Server 2014 you have the ability to set the following off.
SET ANSI_NULLS OFF and ANSI_NULLS OFF database option
SET ANSI_PADDING OFF and ANSI_PADDING OFF database option
SET CONCAT_NULL_YIELDS_NULL OFF and CONCAT_NULL_YIELDS_NULL OFF database option
The answer is False.
With SQL Server 2014 the ANSI_NULLS, ANSI_PADDING and CONCAT_NULLS_YIELDS_NULL will always be set to ON. SET OFFSETS will be unavailable.
This script is for capturing user authorizations on a SQL instance. This script is by database versus user. Thank you to everyone for their feedback on the first script I submitted.
This procedure takes in a valid database name and will return all authorities for the logins with the database as their default database. The script captures any server roles, database roles, and any database permissions and authorites granted on the default database along with any other database the login has access to on the SQL instance.
If the database name is not provided, it will generate the access and authorities for all logins which could take some time.
This procedure uses the stroed procedure sp_hexidecimal and Aaron Bertrand's sp_foreachdb stored procedure
This has been tested on SQL Server 2005 and SQL Server 2008 R2. Please note that some facets on each of these SQL versions have not been tested due to lack of availability.
SQL Query help
1. First Query Gives me Outstanding Amount for Billing. Here Transaction type is ('SLINV','SLCRD')
SUM((SL.BASEVALUE)*CASE WHEN CURR.RATE IS NULL THEN...
ISNULL not working
- I have a select statement in my existing SP, which is not working:
select IsNull(St.alternateStudyCode, St.studyCode) AS StudyCode,* from Studies...
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.