Questions tagged [sql-server]

Questions related to Microsoft SQL Server. If your question is version specific please tag it specifically for that version as well. Does your SQL Server question belong here or on another site? Click the about the SQL Server tag link on the line below.

The tag is for general questions related to Microsoft SQL Server and its various technologies. SQL Server is a very broad topic, much of which is perfectly suited for serverfault. SQL Server programming questions involving code, however, will be generally be better suited for stackoverflow.

If you have a SQL Server question, ask yourself the following questions to determine the best site:

  • Is the goal of my question to solve a SQL Server system administration (DBA) function? If not, then it's a good bet you should head on over to stackoverflow https://stackoverflow.com/ or superuser https://superuser.com/

  • Who would use the code that my question relates to the most, a developer or a DBA? If a developer, stackoverflow is your place. If a DBA, ask away here.

For information on how to handle installation errors related to the system language versus the installation media language, see SQL Server setup media does not support the language.

4775 questions
147
votes
9 answers

How to dump a Microsoft SQL Server database to a SQL script?

Is there any way to export a Microsoft SQL Server database to a SQL script? I'm looking for something which behaves similarly to mysqldump, taking a database name, and producing a single script which will recreate all the tables, stored procedures…
Matt Sheppard
  • 1,579
  • 2
  • 11
  • 10
66
votes
7 answers

What are the drawbacks of running a database inside a virtual machine? How do I overcome them?

Running anything inside a virtual machine will have some level of performance hit, but how much does it really impact the performance of a database system? I found this academic reference paper with some interesting benchmarks, but it was a limited…
Russ
  • 713
  • 1
  • 5
  • 7
65
votes
4 answers

Get a list of SQL Server Agent Jobs

I've got an extensive selection of these to add to a spreadsheet and don't want to go through by hand. What it the T-SQL command(s) to generate a list of SQL Server Agent Jobs?
alimack
  • 943
  • 2
  • 11
  • 22
54
votes
3 answers

What is the difference between SQL Server standard and web edition?

Is there any technical difference between these 2 editions or is it just how they are licenced?
Shiraz Bhaiji
  • 2,229
  • 9
  • 34
  • 47
51
votes
6 answers

How to check progress of DBCC SHRINKFILE?

Is there a way to find out the progress of DBCC SHRINKFILE statement? Here is how I was running it dbcc shrinkfile('main_data', 250000) I am running above statement on both SQL Server 2005 and 2008. [UPDATE] Here is the query I ran to check the…
dance2die
  • 2,011
  • 7
  • 32
  • 41
46
votes
7 answers

Is it safe to have SQL Server auto-shrink turned on?

There are many SQL Server options that can be enabled for databases, and one of the most misunderstood ones is auto-shrink. Is it safe? If not, why not?
Paul Randal
  • 7,194
  • 1
  • 36
  • 45
45
votes
22 answers

PowerShell? Do you use it? Can you show me some cool system administration things I can do with it?

I keep reading everywhere that PowerShell is the way of the future. When it was first released I did a whole bunch of virtual labs, but since then I still haven't used it in a production environment. I know the day will come when I'm dealing with…
44
votes
4 answers

How do I remove a specific bad plan from the SQL Server query cache?

We have one particular SQL Server 2008 query (not a stored proc, but the same SQL string -- executes every 5 minutes) that intermittently caches a very bad query plan. This query normally runs in a few milliseconds, but with this bad query plan, it…
Jeff Atwood
  • 13,104
  • 20
  • 75
  • 92
43
votes
16 answers

Early signs of a bad sysadmin

We're about to get our first sysadmin to look after a multitude of SQL Servers which have previously been awkwardly looked after by a mixture of the developers and IT support. It's long overdue, and we've been trying to persuade the higher-ups to…
MartW
  • 1,305
  • 10
  • 15
43
votes
6 answers

What are named and default instances?

What are named and default instances? What is/are the difference(s) between them? Why they are used?
Novice Developer
  • 533
  • 1
  • 4
  • 4
41
votes
6 answers

SQL Server (2005/2008): Does full backup truncate the log in full recovery mode

I've just read through a lot of MSDN documentation and I think I understand the different recovery models and the concept of a backup chain. I still have one question: Does a full database backup truncate the transaction log (using full recovery…
Heinzi
  • 2,217
  • 5
  • 32
  • 52
39
votes
18 answers

Poor internal database - replace it or chuck hardware at it?

So - we have an internal company database, the usual kind of stuff: manages clients, phone calls, sales deals and client agreements/schemes. It's an Access 2000 front-end, and an SQL Server 2000 Standard back-end. Single server, dual Xeon 3.2GHz,…
tomfanning
  • 3,378
  • 7
  • 34
  • 34
39
votes
5 answers

How can I tell if Snapshot Isolation is turned on?

In SQL Server 2005/2008, how can I tell if Snapshot Isolation is turned on? I know how to turn it on, but I can't find the incantation to get google to tell me how to query the state of the Snapshot Isolation option.
Samuel Jack
  • 515
  • 1
  • 4
  • 8
38
votes
5 answers

Pay no attention to that SAN behind the curtain

Once upon a time, I built my own SQL servers, and had control over drive configuration, RAID levels, etc. The traditional advice of separation of data, logs, tempdb, backups, (depending on budget!) was always a pretty important part of the SQL…
BradC
  • 2,220
  • 4
  • 27
  • 36
38
votes
7 answers

How do I reduce transaction log backup size after a full backup?

I have three maintenance plans set up to run on an Sql Server 2005 instance: Weekly database optimisations followed by a full backup Daily differential backup Hourly transaction log backups The hourly log backups are usually between a few hundred…
Dave D
  • 483
  • 1
  • 5
  • 10
1
2 3
99 100