This tag is for SQL Server 2012, major build version 11.00.xxxx.

learn more… | top users | synonyms (2)

0
votes
1answer
21 views

How to write a query which recursively returns all foreign key references to a column?

I need to obtain a list of foreign keys which refer to a given column, as well as all foreign keys which refer to those keys, and so on. Order does not matter. I have SELECT s.name, t.name, ...
0
votes
0answers
10 views

After applying SQL Server 2012 SP2, Full-Text Filter Daemon won't restart

Before applying SP2 to SQL Server 2012, I stopped the following four processes in Sql Server Configuration Manager under SQL Server Services: Sql Server SQL Full-Text Filter Daemon SQL Server ...
3
votes
0answers
41 views

SQL Server 2012 Installation Has No Option To Uninstall

I've recently inherited a laptop for testing from a client, unfortunately it wasn't a fresh image so it has some software already installed that's causing me some grief. The short version is their IT ...
3
votes
1answer
166 views

Execution Plans Differ for the Same SQL Statement

As a background to this question the details can be found at this link. In a nutshell: I have 2 SQL statements that are almost identical except for the RIGHT table. The LEFT JOIN is the same and the ...
0
votes
1answer
34 views

Find out beforehand how many records a query has

I develop reports in ExtJS resulting of queries in SQL Server 2012. I use Ext.Grid with paging, therefore I can use offset to limit the amount of records a query will return. But for this ExtJS ...
2
votes
2answers
76 views

Moving data from table with VARCHAR(50) fields to table with numeric fields increases table size

I want to understand why migrating data in a table with all VARCHAR(50) fields to a table with optimized smaller types caused the new table (containing 61,065,164 rows) to be 4.46 GB, which is larger ...
1
vote
1answer
33 views

Cannot install SQL Server 2012

I'm trying to install SQL Server 2012 on Windows Server 2012 Standard and got this message: SQL Server Setup has encountered the following error: The resource ...
0
votes
0answers
10 views

What could cause the built-in NT Service\SQLAgent$ identity to be unable to connect

Something has happened, I don't know what, which has caused our nightly scheduled (maintenance plan) backups to begin failing. They were working, but then, started to fail. The error is shown below. ...
0
votes
0answers
19 views

SSMS IntelliSense doesn't work on particular database

I have SSMS 2014 installed on my desktop, and many 2012 and 2014 databases running in our data center, so far I found one database (database A) doesn't have IntelliSense working, e.g. typing: SELECT ...
0
votes
1answer
23 views

Copy of a database with an existing database with schema and data in sql server

I have two databases one is having master kind of tables and other will have transaction data. I should create a new database with a structure of an existing database to my clients. Here is the ...
6
votes
2answers
343 views

What effect will reducing the size of a varchar column have on the database file?

We have a number of tables in our database that have VARCHAR(MAX) columns where a VARCHAR(500) (or something much smaller than max) will suffice. Naturally I want to clean these up, and get the sizes ...
0
votes
0answers
19 views

Fencing a failed application node to isolate it from SQL Server

I have a multi-node server application that is backed by SQL Server 2012, often in a clustered or AlwaysOn AG/FCI HA configuration. My application monitors the health of the application nodes (not the ...
0
votes
0answers
28 views

SQL Server 2012: query to see queries that are consuming more resources [duplicate]

I'm trying to find/build a query to show me those queries that are consuming more resources in SQL Server so that I can optimize them or at least have a statistical idea of what is really happening. ...
-2
votes
0answers
19 views

How to monitor sql server 2012 temp db 24/7? [on hold]

Temp db growth is one of the major issue which i'm facing on sql server 2012 . Can any one suggest how could we identifies which queries are hitting temp db and how much space it is utilizing on the ...
1
vote
1answer
31 views

Incorrect unit allocation size. error comes when Tuning the Database

Here I am Using the SQL IDERA tool for checking the Index and performance of the Database, then i found below error, can any one tell what is it talking about. Incorrect unit allocation size. ...
1
vote
1answer
41 views

SQL Server 2012 stored procedure runs very slow sometimes

I have a stored procedure with a single large query which takes an ID as a parameter and returns some counts. It has quite a few inner joins and left outer joins but they are all on indexes. The ...
1
vote
0answers
23 views

finding out the Backup set physical name

I created a maintenance plan to back up two user databases and system databases over a month ago. I queried the msdb database to view the size of the backups using the following query. SELECT ...
1
vote
1answer
14 views

Syncing Uncontained Objects with AlwaysOn Availability Groups

In setting up our HA environment (AlwaysOn AG), I came across the add-in ssms_2012_ag_addin_setup.exe that I got from SQLSkills. ...
-1
votes
1answer
19 views

can exec permissions be granted to a role in SQL Server 2008 / 2012

Can exec permissions (e.g. on a SP) be granted to a role in SQL Server 2008, so that all role members then have the permission; and if the 2008 database were backed up and restored into SQL Server ...
1
vote
1answer
51 views

Updating large table (~6.5 million rows) & indexes

I'm trying to update a table with about 6.5 million rows in a reasonable amount of time, but I'm having some issues. We're adding a new column to an existing table and then setting a value for all ...
2
votes
3answers
285 views

Is inserting multiple queries takes same time as that of single query?

I have a requirement where I have to insert a lots of rows.For inserting we use like this insert into emp(name,age) values('abc',12); This will insert only one row.For inserting multiple rows we ...
-1
votes
1answer
36 views

Debugging Remote Connection Failure of SQL Server 2012 [closed]

I am running SQL server 2012 web edition on Windows Server 2008 R2. I have followed all these steps http://blog.citrix24.com/configure-sql-express-to-accept-remote-connections/. But still unable to ...
1
vote
2answers
27 views

SSMS (2012) limit # of characters on editor window line

Is there a way to enforce a hard limit on the number of characters allowed on a line in the SSMS editor window? I have searched, but am unable to find an option to set this. I'd like to force the ...
0
votes
2answers
40 views

Are some these indexes redundant?

Let's say I have a table of 4 columns: A, B, C, D. A primary key is on A, B, C. Index1: is A, D, B, C in that order Index2: A, B, C, D in that order and the primary key index: A, B, C There are ...
0
votes
1answer
37 views

Server 2012 Linked Server From An Instance

I have 3 SQL Server 2012 Instances, 2 on SiteA on the same server SiteAServer. I have 1 on SiteB on server SiteBServer. SiteADefaultInstance, SiteASecondInstance SiteBDefaultInstance ...
1
vote
0answers
23 views

SSMS login fail to Linked Server

i have one server with SQL server 2012 standard on cloud environment and one linked server with sql express on remote location connected with VPN , im using transactional replication every time when ...
1
vote
0answers
21 views

Update SQL Server .net version

I have used this article to detect the latest install .net version and here is the result: Its .net 4.0 and I want to know if the SQL Server is using the latest installed version? I want to ...
0
votes
2answers
28 views

Linked Servers security context and transaction logging

I have many large logging tables that are populating with data constantly. The information is rarely or never read and I want to move them out of the database. So, the idea is to: create linked ...
1
vote
2answers
28 views

How to configure an instance to listen on port 1433 to allow remote connection

Trying to connect using SQL Server Management Studio 2012 on a Windows 8.1 Client computer from outside the cluster's domain. Cluster is a two node Virtual Cluster made from Windows Server 2012 R2. ...
2
votes
1answer
36 views

io_stall question

I just installed SQL Server on new hardware and ran a test script to show io_stall information by file. Nothing else has been loaded yet, just a fresh install of SQL Server 2012. Why are the ...
0
votes
0answers
30 views

Performing a huge amount of individual INSERTs occasionally causes a lag that triggers the timeout

I have some code that is using entity framework to perform a large number of INSERTs in succession. SQL profiler shows a SELECT, then another SELECT, then an INSERT for each one due to it having to ...
1
vote
1answer
42 views

How to identify where a package execution has spent most of the time?

Team BI has a package deployed as a project on SQL Server 2012. How can I find how long a package takes to run on a daily basis, and where it has spent most of the time? I know that the ...
3
votes
2answers
61 views

How to properly increment an int identity in SQL Server if the Identity Increment isn't set?

When I use SQL Server with an int based identity column, I always use the auto increment. But I'm needing to insert into an existing table that doesn't have the property set, and I'm wondering what ...
0
votes
1answer
15 views

migrating legacy databases from SQL Server 2000 via SQL Server 2008 to SQL Server 2012: users and logins

I have some legacy SQL Server 2000 databases to migrate to SQL Server 2012. In my dry run, I have done this: I created empty databases of the same names in SQL Server 2008. Then I backed up the SQL ...
0
votes
0answers
20 views

Auditing Specifications for SQL Server 2012 [duplicate]

I work for the State of California. I am working on a project setting up a Data Warehouse sharing data between 3 state agencies. The Data Warehouse will be encrypted. I would like to know what are the ...
1
vote
0answers
23 views

Is It Safe to Remove Local Service Accounts?

I have changed my SQL Server services to use domain service account. The server still has NT Service\MSSQL$INSTANCENAME and NT Service\SQLAgent$INSTANCENAME listed under Security\Logins. They each ...
0
votes
2answers
80 views

Recover data in a SQL Server table without backups [duplicate]

We are having a database without backup to restore. (we didn’t keep backups as client not having enough space in his SQL Server 2012). Unfortunately some data has been lost and we need to recover ...
0
votes
0answers
24 views

Why creating the missing index still shows it in the missing index dmv?

I followed the steps in this blog post to create the missing index and to clear it from the missing index dmv after running a select statement which uses the indicated column in the where clause and ...
0
votes
0answers
24 views

Auditing SQL Server 2012 [closed]

I work for the State of California. I am working on a project setting up a Data Warehouse sharing data between 3 state agencies. The Data Warehouse will be encrypted. I would like to know what are the ...
1
vote
1answer
59 views

How to migrate data of to another sql server

Good day, I have a database running on a virtual machine hosted at our ISP. It is a fairly large database which has about 5GB of data inserted into it every day (network logs). It is partitioned ...
0
votes
2answers
34 views

Will reindexing use the empty space or just grow table?

I have a table which is 170 GB and it has 98 GB of free/empty space. The free space was created by a massive deletion. If I run DBCC REINDEX or ALTER INDEX REBUILD, will the index use that free space ...
2
votes
2answers
74 views

How should I (re) index the table while keeping the transaction log small?

I have a 170 GB table in a database. It has 70% fragmentation on its index (index has multiple columns in it). The last time I tried DBCC REINDEX the transaction log blew up in the hundreds of GBs. ...
0
votes
1answer
17 views

How to order the where clause and join columns in a covering index?

Simple query example: Select t1.A, t1.B, t1.C, t1.CustomerID from table1 t1 join table2 t2 on t1.CustomerID = t2.Id where t1.A = 'x' and t1.B = 'xx' and t1.C = 'xxx' I created a non clustered with ...
0
votes
0answers
57 views

Why does Extended Events server_principal_name return NULL sometimes?

I have an extended event session setup. This is the definition. CREATE EVENT SESSION [Successful-Logins] ON SERVER ADD EVENT sqlserver.connectivity_ring_buffer_recorded ( ACTION ( ...
4
votes
4answers
141 views

Disk Space usage

Is there a way i can get a report or create a custom report in sql server 2012 which can update me with disk space available & actual disk space for listed drives twice or once a day. I need this ...
1
vote
1answer
49 views

If “large value types out of row” table option is enabled, the table size is increased

I have recently learned about sp_tableoption which gives you the ability to store "large value types out of row" for particular table. A colleague of me told me if I enabled it, each field is stored ...
4
votes
1answer
70 views

GZipStream/DeflateStream compressions alternatives

I have created a simple CLR functions for compressing/decompressing NVARCHAR columns: [SqlFunction(DataAccess = DataAccessKind.None, IsDeterministic = true)] public static SqlBinary Compress( string ...
4
votes
1answer
158 views

How to optimize: having COUNT(*)>1

Without considering the indexes, Is there a way to re-write this query and get the same result quicker? select fo.OrderNo, fo.OrderItemSeqNo, COUNT(*) from Facts.FactBackOrder fo group by fo.OrderNo, ...
0
votes
1answer
38 views

Distributor latency - slow sp_MSget_repl_commands performance

One of our publishers is subscribed to by three subscribers, each subscriber is hosted on its own physical server. Two of those subscribers are 2008R2 and the third 2012. The 2012 subscriber is ...
1
vote
0answers
47 views

Does partitioning help if you don't query on the partition value?

Say I have an orders.Order table that is partitioned on CreatedWhen (a datetime column set to GetDate() when the row is created). The table has over 10 million rows and the partition is quarterly ...