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
37
votes
7 answers

Can Microsoft employees see my data in Azure?

I have sensitive data stored in both Azure DB and Azure SQL VM. An authorised DBA can log on and query the database, but in theory could a random Microsoft employee do the same without asking permission? I found this online which suggests the answer…
userSteve
  • 1,573
  • 4
  • 23
  • 33
37
votes
1 answer

What can user do with VIEW SERVER STATE permissions?

In SQL Server 2008 there is a permissions VIEW SERVER STATE. What rights this permission give to user? What SQL Server mean by SERVER STATE?
31
votes
11 answers

How do I get this SQL Server ODBC Connection working?

Note: I've obviously changed the server names and IPs to fictitious ones. Here's what's going on. I've got a server, which I'm calling MYSERVER, running Microsoft SQL Server Express 2005. Right on this server itself, I've got an ODBC connection set…
soapergem
  • 719
  • 4
  • 13
  • 29
31
votes
6 answers

How can I prevent accidentally jacking with a production database?

Just recently, I had a developer accidentally try to restore a database to production, when he should have been restoring to a staging copy. It's easy to do, given that the db names are similar, i.e., CustomerName_Staging versus…
Chris B. Behrens
  • 671
  • 1
  • 6
  • 12
31
votes
9 answers

How do I determine the size of my SQL Server database?

Basic: what's the size on disk of my MS SQL Server DB? More: can I quickly see where the data is? i.e. which tables, logs, etc
adambox
  • 827
  • 4
  • 9
  • 14
31
votes
7 answers

Setting Low Disk Space Alerts on Windows Server 2008

I was wondering if there is an easy way to trigger an e-mail alert on Windows Server 2008 when any logical disk partitions become low on space. I have 2 SQL servers that have come close to running out of disk space because of the DB log…
31
votes
5 answers

Database 'XXX' is in transition. Try the statement later

im trying to connect to a sql server database i get this error Database 'XXX' is in transition. Try the statement later. i cancelled a long query earlier today but for some reason i can't get the database to get back up. Is there anything i can…
Rod Johnson
  • 453
  • 1
  • 4
  • 7
30
votes
7 answers

Is it OK to run perfmon on production servers? And why?

Or should perfmon be limited to a Dev/QA server with load tests that simulate production activity? I'd like to run perfmon for two days (like Sql Server master Brent Ozar suggests) to get an overall feel of my web app's database performance.
Bill Paetzke
  • 855
  • 4
  • 12
  • 19
29
votes
5 answers

mdf file cannot be overwritten when restoring a database in SQL Server

I got a databse A. It has some data in it. I created a backup for A as A.bak file. Then I create a new empty database B. And then I try to restore B from A.bak. But the SQL Serve tell me the following error: The file 'C:\SQL Directory\DATA\A.mdf'…
smwikipedia
  • 646
  • 4
  • 8
  • 15
28
votes
6 answers

How to rename a SQL Server 2008 instance?

How can I rename a SQL Server 2008 instance without reinstalling? For example, if the db is referenced as "MySQLServer\MSSQL2008", how can I rename to "MySQLServer\SQL2008"?
Scott Marlowe
  • 423
  • 3
  • 6
  • 9
28
votes
11 answers

Things every SQL Server DBA should know

What things should every SQL Server database administrator know? Books, blogs, tools, you name it.
cletus
  • 9,999
  • 9
  • 37
  • 40
28
votes
8 answers

Will disabling hyperthreading improve performance on our SQL Server install

Related to: Current wisdom on SQL Server and Hyperthreading Recently we upgraded our Windows 2008 R2 database server from an X5470 to a X5560. The theory is both CPUs have very similar performance, if anything the X5560 is slightly faster. However,…
Sam Saffron
  • 1,979
  • 3
  • 18
  • 27
27
votes
7 answers

SQL Server disk design on an ISCSI SAN

Its standard practice to separate log and data files to separate disks away from the OS (tempdb, backups and swap file also) Does this logic still make sense when your drives are all SAN based and your LUNS are not carved of specific disk or raid…
CPU_BUSY
  • 2,332
  • 17
  • 17
26
votes
2 answers

How do I limit MS SQL Server memory usage?

I've heard MS SQL Server takes up as much RAM as it can to cache results. Well, it's not leaving enough bargaining room for our little server's RAM. How do I change the settings to limit the amount of RAM it can use? MS SQL Server running on…
FlavorScape
  • 791
  • 4
  • 10
  • 20
26
votes
11 answers

Can't connect to SQL Server using 'sa' account, what I'm missing?

I'm trying to log in to a SQL Server 2005 Express instance using the following command: osql -S .\INSTANCE -U sa -P password I get the error: Login failed for user 'sa'. I can connect just fine using the -E switch. I must add that it's been working…
JAG
  • 859
  • 2
  • 9
  • 15