Microsoft's SQL Server is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. It originated from the Sybase SQL Server codebase, which is why both products use the extension of SQL called Transact-SQL (T-SQL).

learn more… | top users | synonyms (2)

1
vote
1answer
282 views

Deadlock occurring on database, SQL Server 2008R2

Last few days I had major problems with my production site, turns out deadlock occurred, every half an hour maybe 50-60 of them. To do a quick fix in order to keep the site running I set : ...
3
votes
1answer
82 views

Secure database access from particular applications

I have an C#.NET application and a SQL Server database (SQL Server 2008 R2) and would like to restrict the access to some of the Tables when it has been accessed from some other application rather ...
1
vote
0answers
30 views

remove the instance while uninstall msi package

I have uninstalled the XYZ.msi package from Control Panel.It is completely uninstalled,but it's instance is still available in SQL server 2005.Why the instance didn't remove after uninstall of the ...
4
votes
1answer
2k views

Can not start SQL Server, model db in RESTORING state

Quick run down: First problem started when sysadmin received error that model is recovering. Sometime later vendor tried to do some upgrades to the database. When they restarted SQL Server it failed ...
0
votes
1answer
34 views

Is reconfiguration required when switching sql server machine to use a FQDN?

I'm going to be changing the Primary DNS Suffix (not the NETBIOS name) of a Windows 2008R2 Server that does not belong to a windows domain (eg. a WORKGROUP computer) in order to give it a FQDN. Is it ...
1
vote
0answers
100 views

How to take advantage of multiple spatial indices?

All, I'm building a view which uses a spatial intersect (STIntersect in MSSQL 2012) between points (student addresses with address information) and polygons (school boundary polygons with school ...
2
votes
3answers
110 views

Query databases on different servers

How can I create a query that will find all the databases on different servers? I have four servers, PRDSVR, UATSVR, DEVSVR, TRNSVR; with either copies of the same database on each server or ...
3
votes
1answer
81 views

SQL Server backups strategy with limited storage available

I've a SQL 2012 Server setup on a VM, with 3 disks: Disk 1: 150GB --> System Disk 2: 750GB --> SQL mdf Disk 3: 750GB --> SQL ldf DBs are in full recovery mode. Let's say we'll have 350GB of data ...
0
votes
1answer
183 views

DB collation is used for comparison instead of column collation

I am moving data from one SQL Server to another. lets call them source and destination SQL server. The source SQL Server has collation SQL_Latin1_General_CP1_CI_AS and the destination has collation ...
2
votes
1answer
46 views

Accidental Turn On of Replication

We had a log file that wouldn't stop growing even though we do backups. Turns out that replication had been turned on for that database. None of us DBAs did that (at least as far as we know). So, ...
0
votes
2answers
290 views

Memory Allocation in Shared DB & IIS Environment

In my use case, we have production servers that host both IIS & SQL on the same machine, not ideal but no flexibility to change that. Basically a single machine is both a DB and an Application ...
1
vote
0answers
30 views

What does this icon in SQL Server mean? [duplicate]

Can someone tell me what the icon of a server and a blue database symbol means. It is attached to database engine instance in my object explore view. (I apologize, I am unable to add a image of the ...
3
votes
2answers
631 views

What does this SQL Server icon mean?

What does the icon of a server with a blue database symbol mean?
1
vote
1answer
664 views

The provided statistics stream is corrupt, when running UPDATE Statistics

When running UPDATE STATISTICS mytable I'm getting following error: The provided statistics stream is corrupt. When our application is inserting rows to mytable we are getting the same error. ...
1
vote
1answer
143 views

Is it dangerous to use Linked Server? (SQL Server 2008)

I wonder what are the security risks in using Linked Server.
4
votes
1answer
542 views

Putting a condition related to a table in JOIN is better?

I have seen this a lot that people are putting table related condition on JOIN clause. See this example, SELECT i.Name FROM sys.TABLES AS tbl INNER JOIN sys.indexes AS i ON (i.index_id > 0 ...
0
votes
1answer
41 views

remove the instance while uninstall a database

I have uninstalled the database but it's instance is still available in SQL server 2005.I want to remove that instance.Is any possibilities to remove the instance while uninstall a database?
1
vote
1answer
1k views

SQL Server Agent cannot log on to “MyServer”

I'm struggling to get our SQL Server Agent to run a maintenance plan, which used to work in the past. (This is on SQL Server 2008 R2.) The original problem was that the SQL Server Agent would not ...
2
votes
0answers
359 views

Can I recover a single table from a SQL Server 2012 database backup [duplicate]

I have accidentally dropped a specific table and I don’t want to restore whole database (it is huge) but instead I want to recover only that table from a backup? What would be most simplest ...
2
votes
1answer
41 views

How can I model and enforce constraints on a categorical item contained in a collection?

Scenario: There is a collection of items where each item belongs to 1 category. There is a collection of buckets which may contain at most 1 item from each category. Oh, and an item may belong to at ...
4
votes
1answer
355 views

A clarification of MERGE best practices

I just wanted to ask a clarification about something on the MSDN from the "Optimizing MERGE Statement Performance" page. I am working with a data warehouse that takes in records from many different ...
2
votes
2answers
227 views

SQL Server 2008 R2 Missing Index

I am performing index maintenance on a database. I have run SQL script that uses DMVs to provides a list of indexes SQL Server believes should be created. I am not creating indexes just because the ...
4
votes
1answer
96 views

Understanding Backup Types

I have recently started a role as a junior DBA... Yesterday I created a new database for a co-worker and my boss asked me to make sure we get a backup plan on it asap. I didn't think much about it, ...
2
votes
1answer
79 views

How can I automatically have a node become primary in an Availability Group?

In my environment, I have Db01 and Db02 setup with SQL 2012 AlwaysOn. Db01 is the preferred master as that is where all of the backup jobs reside. Typically, the only time that Db01 is unavailable is ...
2
votes
0answers
103 views

SQL Server 2012 High availability Groups for OLTP and Reporting environments

I would like to seek your advice in designing a high availability architecture at my current work place. We are moving to SQL Server 2012 platform and we currently have a set of OLTP databases ...
0
votes
2answers
344 views

SSMS connection string

In SSMS we are giving hostname\instance name to connect to SQL Instance, can someone please explain me how it is getting connected, is it using any files or protocols or what exactly is happening in ...
0
votes
1answer
663 views

Reporting Services TempDB lock blocking report generation

Two days ago one of our reports in Reporting Services started to take much longer to generate. Its generation time had increased from 4 seconds to 2 minutes. Investigation found: The Stored ...
1
vote
0answers
76 views

Efficient way to Add NON-CLUSTERED Index?

I have the following table, CREATE TABLE [dbo].[Products]( [ID] [int] IDENTITY(1,1) NOT NULL, [RetailerID] [int] NOT NULL, [Name] [nvarchar](255) NOT NULL, [Price] [float] NULL, ...
1
vote
1answer
103 views

Automatically keep synchronized copy of database

I want to create a working copy of my main database to hold it on a separate server to run queries and report generation on to take the load of the main server. I'm looking into SQL Server ...
0
votes
0answers
167 views

SQL Server and Entity Framework

We are currently experiencing a problem with Entity Framework which generates a sp_executesql statement. This statement is below. The statement runs fine in SQL Server however through the front end ...
0
votes
4answers
422 views

SQL Server 2005 - 2 sets of backups - 2 maintenance plans?

I did my best to search for an answer to this question and couldn't find a scenario quite like this. I'm a fairly new DBA in the sense that I haven't had a ton of training, I basically took the job ...
3
votes
1answer
104 views

Generate Agent Job Report

We have a few jobs that run nightly that the status has to be reported every hour. I am trying to find in MSDB where I can capture the information below hourly and send out an excel file. Server ...
0
votes
0answers
386 views

Sql Azure: The session limit for the database is 8000 and has been reached

I am getting following exception in SQL Azure, my SQL Server database is a web version, and I am getting this error in SQL Server Management Studio (when connecting). Also this is happening when ...
4
votes
2answers
1k views

A constant scan takes either 0 seconds or 2-3 minutes

A query like the one below that is guaranteed not to return any rows, takes anything from 0 to 160 seconds on one of our servers: select col1, col2, col3 from tab1 where 0 = 1 Two weeks ago, this ...
1
vote
0answers
18 views

How to keep the structure of the Tablix and Field names when there is no data to show [duplicate]

When the data set returns no data, the tablix column headers display, but I also need the detail rows to display with a blank or zero for all fields. Adding an additional row to the tablix is not an ...
3
votes
2answers
178 views

SQL Server Express Freezes for a couple minutes

I have SQL Server Express on an AWS micro instance. These instances have only 615MB of RAM. For the most part it performs fine. My application can make up to about 15 db connections. However, every ...
0
votes
1answer
156 views

sysadmin security error creating Reporting Services cache refresh plan in Report Manager

On SQL Server 2012 (SP1) Reporting Services (native), when creating a cache refresh plan in Report Manager, I receive the error: Only members of sysadmin role are allowed to update or delete jobs ...
0
votes
1answer
80 views

How to know my workload type

Is there any tsql-query/DMV through which I can tell my workload type on database, whether mostly Reads or mostly writes happening? Thanks in Advance.
3
votes
1answer
107 views

How to monitor load on database server

Could anybody please suggest me a way to monitor the load on my database server? What perfmon counters should I monitor on daily basis and confirm that load on the server is increasing day by day [or] ...
3
votes
2answers
11k views

SQL Job step run as different sql account

I'm curious how to set up a SQL job step to be executed as a different SQL login account. It appears I need to set up a New Proxy Account which requires an existing credential. When I create a ...
0
votes
1answer
1k views

Why TRUNCATE TABLE cannot use four-part name?

I was trying to truncate a table as the following: TRUNCATE TABLE [servername].[dbname].[schema].[table] I got error: object doesn't exist or you don't have permissions. However, if I remove ...
0
votes
2answers
687 views

Find which objects are using my table column in the given schema

Lets say I have a table 'MyTable' having a column 'MyColumn'. I want to find out which procedures, triggers, views, functions are using that column. Currently I have this script which gets most ...
4
votes
2answers
266 views

Query tuning to meet timeout settings [closed]

We have an web app with a 30 second time out on search screens. I've analyzed the original query and added a missing index for one of the query's 9 joins. Other things like expected and actual ...
4
votes
2answers
2k views

Update Statement takes forever to complete [closed]

I have table around 1250000 records, and 80 columns Table Structure CREATE TABLE [dbo].[Table] ( [Column1] [int] IDENTITY(1, 1) NOT FOR REPLICATION NOT NULL, [Column2] [int] NULL, [Column3] [int] ...
0
votes
1answer
51 views

Oracle to SQL Server

We have a table with 169 million rows in a Oracle 10g database, we need to move this table to a MS SQL Server 2012 database. Describe on the table: aaa NOT NULL NUMBER(38) bbb NOT NULL NUMBER(38) ...
3
votes
3answers
298 views

What steps should I perform to prepare a MDF for distribution as a (mostly) read-only database?

I am on a team that develops a product that uses several SQL Server databases. Some of them are mostly read-only. Tables do not get changed, but some views and stored procedures get changed as a way ...
1
vote
1answer
10k views

How can I enable distributed transactions for a linked server?

I have a SQL Server 2012 instance with a linked server pointing to a db2 database on an IBM Iseries system using the System i Access ODBC Driver. I'm trying to enable distributed transactions. I ...
-2
votes
1answer
178 views

SQL Server database change in to single user type and We cannot access the tables

Our team is working on a database and before some time it change to single user type and we cannot access any tables. Any idea what happened?
1
vote
1answer
2k views

Fetch large data from Sql Server and process in chunks

I am working on an API which would need to process large dataset. The query to select records is complex and takes time to complete. I cannot use the pagination using ROW_NUMBER as not all records ...
7
votes
2answers
545 views

SQL Server performance: PREEMPTIVE_OS_DELETESECURITYCONTEXT dominant wait type

I received a call yesterday from a customer who was complaining about high CPU usage on their SQL Server. We're using SQL Server 2012 64 bit SE. Server is running Windows Server 2008 R2 Standard, 2.20 ...