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
13
votes
3 answers

Can't see second azure sql database in SSMS object explorer

I have created a second database on my existing Azure SQL server. The first database works fine and I can see it using SSMS. I cannot see the second database in the object explorer. Autocomplete detects that it exists however. Any suggestions?
Sam
  • 263
  • 3
  • 8
13
votes
3 answers

How to view SQL Server licenses

I understand that there are three kinds of SQL licenses: http://www.microsoft.com/sqlserver/2005/en/us/pricing-licensing-faq.aspx Is there a a dialog in SSMS, a sproc, registry key, etc I can look at on a server to determine the type and number of…
Booji Boy
  • 295
  • 2
  • 5
  • 11
13
votes
1 answer

Why is MS SQL Server Using NTLM Authentication?

Windows Server 2008 R2. SQL Server 2008 R2 installed. MSSQL Service runs as Local System. Server FQDN is SQL01.domain.com. SQL01 is joined to an Active Directory domain named domain.com. The following is the output of setspn: C:\> setspn -L…
Ryan Ries
  • 55,481
  • 10
  • 142
  • 199
13
votes
9 answers

How To Speed Up Adding Column To Large Table In Sql Server

I want to add a column to a Sql Server table with about 10M rows. I think this query would eventually finish adding the column I want: alter table T add mycol bit not null default 0 but it's been going for several hours already. Is there any…
Chris
  • 1,063
  • 4
  • 12
  • 18
13
votes
3 answers

How to restore a SQL Server database and shrink its files at the same time?

Let's say I have a SQL Server database whose data files have been created with an initial size of 100 GB, but it only contains 10 GB of data. A database backup will then be only 10 GB in size. I want to restore this backup to a different server (or…
Massimo
  • 70,200
  • 57
  • 200
  • 323
13
votes
10 answers

Can't remotely connect through SQL Server Management Studio

I have setup a SQL Server 2008 Express instance on a dedicated Windows 2008 Server hosted by 1and1.com. I cannot connect remotely to the server through management studio. I have taken the following steps below and am beyond any further ideas. I have…
FAtBalloon
  • 279
  • 1
  • 4
  • 12
13
votes
3 answers

How are SQL Server CALs counted?

Possible Duplicate: Can you help me with my software licensing question? Running a SQL Server, as far as I understand it, you need one CAL for every user who connects to the database server. But what happens if the only computer which is…
Sam
  • 909
  • 5
  • 15
  • 28
13
votes
5 answers

SQL Server 2005: There is insufficient system memory to run this query

One of our SQL Servers, which has been running stable for quite some time (years), has recently been throwing insufficient memory errors. From the Application Event Log, we see: Event ID: 701 Description: There is insufficient system memory to run…
Aaron Daniels
  • 447
  • 2
  • 5
  • 10
12
votes
2 answers

Windows Server 2008 R2 64-bit memory leak

I´m having trouble in one of my office servers. It´s a virtualized Windows 2008 R2 Server with 6GB RAM memory. It only has Microsoft SQL Server (memory assigned maximum = 3GB), and just a software that is not consuming more than 1GB RAM. However,…
12
votes
4 answers

Microsoft SQL Server Management Studio 2008 deleting multiple user tables

Is there an easy way to delete multiple tables in the database without dropping the database and recreating it? In this case we have over 100 to remove. I am happy enough to remove all user tables and reimport the needed data but can't touch any of…
Ryaner
  • 3,097
  • 5
  • 25
  • 33
12
votes
2 answers

How to undo assigning ownership of db_datareader/db_datawriter schema?

i meant to assign an SQL Server login to the db_datareader db_datawriter database roles. But if a moment of sore tummy and tiredness, i accidentally give that user schema ownership of them instead: Ignoring for the moment what it can…
Ian Boyd
  • 5,293
  • 14
  • 60
  • 82
12
votes
8 answers

Can't login to SQL Server in Single User mode

I've been trying all sorts of different combinations of startup flags to SQL Server 2008 R2 Express and I can not get past this error: Login failed for user 'LOCALSERVER\Administrator'. Reason: Server is in single user mode. Only one…
Earlz
  • 1,019
  • 5
  • 13
  • 29
12
votes
4 answers

Why is "DbccFilesCompact" status is "Suspended"?

I am running SHRINK file on a 600G data file. Currently, status is reported as "suspended" and sys.dm_exec_requests.percent_complete for DbccFilesCompact command reports that it is running (but very slowly) Is there a way to check why it's being…
dance2die
  • 2,011
  • 7
  • 32
  • 41
12
votes
2 answers

Is there a secure way to allow IIS 7 in a DMZ to access a DB server behind the firewall?

Our network admins are adamant that it is insecure for our web servers, which are hosted in the DMZ, to access the DB server behind our firewall. To get round the problem, we access the data via web services or WCF. I feel that this is an…
Al Polden
  • 223
  • 2
  • 4
12
votes
2 answers

How to Protect Sensitive (HIPAA) SQL Server Standard Data and Log Files

I am dealing with electronic protected health information (ePHI or PHI) and HIPAA regulations require that only authorized users can access ePHI. Column-level encryption may be of value for some of the data, but I need the ability to do like…
Quesi
  • 223
  • 2
  • 8