SQL Server 2012 (major build version 11.00.xxxx). Please also tag sql-server.

learn more… | top users | synonyms (3)

2
votes
0answers
57 views

MEMORYCLERK_XE Memory Usage Will not Clear

We've been having an issue where memory usage from Extended Events grows to over 1 GB and then will not clear - even when we stop all XEvent session on the instance. This hasn't been an issue yet on ...
1
vote
1answer
537 views

“Skipping the default startup of database” SQL notification for AlwaysOn Cluster

So I set up our SQL servers to notify us of alerts at severity 17 or higher (as advised by various SQL Server articles). I've done this to each node of a SQL Server Always On Availability Cluster, ...
3
votes
1answer
33 views

Changing database name based on project environment

I have three environments for our BI project (DEV, QA, PROD) and two databases in each environment, source(EDB) and target(EDM) DEV environment: Source = EDB_DEV Target = EDM_DEV QA environment: ...
4
votes
1answer
127 views

Cross Apply Fails When DateTime Added

In trying to achieve a Pivot-ed goal for a two row data table into one row, my first thought was to use a Cross Apply. By using the Cross Apply one can identify/generate each of the rows with a ...
1
vote
2answers
231 views

SQL Server hangs during backup on EC2

Once and then our SQL Server will "hang" during its weekly full backup. When this happens, external connections start to timeout. The symptoms are: Connections timeout The sqlservr.exe process sits ...
1
vote
1answer
283 views

Multi-server administration - force poll on target fails, server needs to be registered locally without FQDN

I'm experimenting with multi=server administration on my SQL lab. Running SQL 2012 Enterprise SP1 on Windows 2008 R2 on a domain. I've created a domain account for my sql server agent user on each ...
1
vote
1answer
3k views

SSIS Package Validation Error when Executed From Windows Task Scheduler

I have deployed my SSIS package using the project deployment model to the SSIS catalog and experience a strange validation error when I try to execute the package. I believe this is due to a ...
0
votes
2answers
926 views

SQL Server 2012: Full Text Catalog taking up all the disk space

We have created full text catalog and index for a pretty large table. The column on which the index is being created has a datatype of varchar(max). The problem started as soon as we started ...
5
votes
3answers
3k views

SQL Server 2012 database backup successfully report but no backup file

I have created maintenance plan in SQL Server 2012. And every day, the maintenance plan should backup the database. There is no database backup file when I look in the folder where the backups must ...
4
votes
4answers
264 views

Easy way to change Column ID (primary key) of a table to Auto increment

I started to use SQL Server recently and I still don't know the best way to do some things. I created all the tables with a column ID as the primary key. Now when I try to insert values I get the ...
1
vote
1answer
158 views

No rows in sys.dm_exec_procedure_stats for a particluar stored procedure

I am running DMV queries to get stats for my stored procedure, but I am not finding any rows against this SP under sys.dm_exec_procedure_stats. Please suggest what could be various reason for this ...
1
vote
2answers
62 views

SQL Join problem [closed]

I have a problem trying to join two tables TableA +----------+--------------+ | PersonID | customerId | +----------+--------------+ | 123 | 456 | | 258 | 145 | | ...
0
votes
1answer
110 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 ...
10
votes
1answer
482 views

High PAGELATCH_* and WRITELOG waits. Are they related?

We are seeing very high PAGELATCH_EX and PAGELATCH_SH wait types along with high WRITELOG waits. I've diagnosed the query causing the PAGELATCH waits and can eliminate them by reducing the insertion ...
-4
votes
1answer
30 views

calculate a column based on existing columns [closed]

Simply I want to calculate a formula on specific columns in my table to populate an empty column in the same table using SQL Server.
4
votes
1answer
607 views

SQL Server 2012 indirect checkpoint

I am trying to understand where to draw a fine line for Indirect Checkpoint that was introduced in SQL Server 2012. Based on my understanding SQL Server does checkpoint to flush dirty pages out to ...
2
votes
1answer
37 views

SQL Server spatial geometry properties on index

Is there a way to add geometry.STSrid(object property) to a spatial index or is it already added when I create a spatial index in SQL Server 2012. I have mixed SRID table and I was wondering if it ...
1
vote
1answer
31 views

Monitoring decimal values on Perfmon using User Settables

I am currently using sp_user_counter1 to store database information on Perfmon, which can be recovered by AWS CloudWatch, but the values are Decimal, and the sp_user_counter1 parameter supplied must ...
3
votes
2answers
105 views

What is considered for output from an sql server job step?

In short: It seems I only get PRINT messages to my SQL Server job history. What is the definition of valid history output? Background: Just executing a statement like UPDATE product SET ... will ...
0
votes
1answer
74 views

Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '*%text%*4' to data type int

I have a database that holds information linking customer data to forms that are filled out by them, or on them by someone else. Our UI runs reports but can only run 1 form at a time. I am trying to ...
1
vote
2answers
273 views

Is it possible to set stand-by database to active, do changes and then continue restore chain?

Basically, I'm using a custom log shipping method on a sql 2012, where the transaction files are manually copied to an offsite location. The files are then restored using something similar: RESTORE ...
8
votes
1answer
305 views

Update queries slower after enabling SQL Server Full-Text Index

I have an asp.net website with many insert, update, and delete queries running against my database. A few days ago I create a Full-Text Index on two columns of one of tables. After that I realized ...
1
vote
2answers
44 views

Can't create a table with the same name I deleted before

I started to use SQL Server recently and I think that its simple to resolve I did: 1 - Create table table_nome 2 - Drop table table_nome 3 - I'm trying to create a table with the same name, and ...
2
votes
3answers
137 views

How can I create 3 tables with references On SQL Server

I started using SQL Server recently and I think this is simple to resolve. I need to create one table with a country list, and two tables that will use the country list in a column. Here is the ...
1
vote
1answer
2k views

Mirror / replicate only 1 table of a database

I need a good way to replicate a single table in SQL Server 2012 between different servers and different databases. I tried replica which works just fine, but there might be a much better / easier way ...
1
vote
1answer
30 views

linked servers between availability group to a server

I had three servers(server1, server2, server3) in availability group. And the listener name is "Production". I have a server name "Acceptance". I need to run a script that which will copy the tables ...
5
votes
3answers
228 views

Shrinking database which is not having any insert/update

We have a process of archiving wherein we take the backup of current database and restore it as xxx archive database. Now this database contains previous data and will not have any ...
0
votes
1answer
23 views

Point in time restore fails - backup file from before the restore point not available (why does this matter)

I have tried to do a point-in-time restore of a database through the management studio gui, the point-in-time being yesterday morning (2016-04-12). This fails with the error "...cannot open ...
6
votes
3answers
116 views

How to improve estimate of 1 row in a View constrained by DateAdd() against an index

Using Microsoft SQL Server 2012 (SP3) (KB3072779) - 11.0.6020.0 (X64). Given a table and index: create table [User].[Session] ( SessionId int identity(1, 1) not null primary key CreatedUtc ...
0
votes
1answer
144 views

“Unspecified Error” when executing SSIS Package

I am executing an "Initial Load" SSIS package, which truncates all ETL tables first, then re-populates them by pulling data from a remote server. I get the dreaded "Unspecified Error" at a different ...
0
votes
0answers
17 views

installed 2012 SP3 after fixing missing cached installer files, @@ version shows up as sp1

I was to upgrade stg server running SP1 2012 standard, upon getting downtime on the first try I received multiple errors about missing installer cached files (.msp), which was fixed using Microsoft ...
1
vote
0answers
32 views

SQL Server dynamic inserts based on another table's rows

I've derived the following pseudo-coded script as a generic insert with variables that I want to replace for each row in another table (I can assume that the columns are always the same for the insert ...
2
votes
3answers
1k views

How to check history of primary node in AlwaysOn HA environment?

How do I see history of failovers of the primary node in cluster? I'm trying to figure out at what point secondary node started to act as primary. We are running Windows Server 2012 with SQL Server ...
1
vote
1answer
46 views

Rebuilding partitioned table clustered indexes

I need to know how can we rebuild the partition table clustered index with the table size being around 270 GB with 126 Partitions on it. Also, I want to execute it in the production environment, so ...
5
votes
2answers
1k views

'CONCAT' is not a recognized built-in function name

A client reported that they were running on SQL Server 2012, and we delivered some test queries for testing prior to a final delivery, however: 'CONCAT' is not a recognized built-in function name. ...
4
votes
1answer
68 views

Get a listing of snapshot data files

I need to programmatically drop a database with all of its snapshots and then recreate the database and create a new snapshot. I'm having trouble locating where the snapshot files are located from ...
1
vote
2answers
61 views

SOS_SCHEDULER_YIELD - Prevent a Proc from giving up the Processor Time

I've got a process which about once a month at times unrelated (or as far as we can tell) goes into SOS_SCHEDULER_YIELD State. This process blocks our main data entry pipeline and brings the entire ...
9
votes
2answers
225 views

SQL Server sample Update of Statistics misses highest RANGE_HI_KEY on ascending key column

I'm trying to understand how Statistics sampling works and whether or not the below is expected behaviour on sampled statistics updates. We have a large table partitioned by date with a couple of ...
1
vote
2answers
54 views

Script/tool to use to check when the server is not being heavily used and configuring backup on Availbility Groups

If I were to backup 50 databases in SQL server, I want to make sure that backup is taking place when the server is not that busy. Is there any way or script/tool to use to check when the server is ...
0
votes
1answer
49 views

Automate backup using Windows Task Scheduler

I want to run an automatic backup of SQL Server 2012 Express using Windows Task Scheduler. I have 3 user databases. I want to backup all 3 user databases through a single stored procedure and a ...
6
votes
1answer
187 views

Microsoft SQL Server 2012 Mirrors Go Into Disconnected

I have some Microsoft SQL server 2012 mirrors, without a witness in asynchronous mode, that are sporadically going into disconnected. I am running SQL Server 2012 11.0.5058. Looking at the logs on ...
0
votes
1answer
241 views

delete WSFC 2012 cluster role/group fails

PS C:\Windows\system32> get-cluster Name ---- sql2012poc_cl1 PS C:\Windows\system32> get-clustergroup Name OwnerNode State ...
2
votes
2answers
2k views

How to allow connections to SQL Server with 2 differents ip

I have a small issue here: I have a SQL Server instance 2012 (let's call it SQLINSTANCE) on a cluster. I also have 2 network interfaces for this instance: - SQLINSTANCE.my.network - ...
3
votes
1answer
146 views

How many rows can a SQL Server 2012 table hold, and when should I partition it?

Say a table stores granular data about some event. It has the date of the event, a type dimension with around 30K types, and a category dimension with around 100 categories, plus some numeric facts. ...
5
votes
1answer
183 views

There is insufficient system memory in resource pool to run this query

Over the past year we have been suffering a situation where many different queries at the same time will fail with the following error (or a variation in a different resource Governor group): There is ...
0
votes
2answers
47 views

Trying to query AD on a linked server error message is 7321

Trying to query AD on a linked server error message is 7321 error occurred while preparing the query. Any suggestions? Select Name, EmployeeID, Mail, SamAccountName FROM OPENQUERY(ADSI, 'SELECT ...
2
votes
1answer
629 views

SQL Server: how to troubleshoot login timeout expired error

I have a production SQL Server 2012 (SP1) running on Windows Server 2008 R2 Enterprise edition. A lot of time while connecting to this server from a remote host I to face connection timed out error. ...
4
votes
2answers
1k views

How do I delete unique rows from a table with duplicate keys?

I have the following data: road | ID | other column | other column | ------------------+------+---------------+--------------+ MAIN ST | 1 | ... | ...
2
votes
2answers
31 views

How do I detect execute permission granted to a role (when no ON clause was used)

I just spent hours trying to figure out how an app had privilege to execute stored procedures. TIL from StackExchange: Turns out the ON clause is optional for GRANT, allowing a role to be granted ...
0
votes
1answer
125 views

Sync two SQL Server databases

So I've got a hosting package from hostgator with an MS SQL database and a local SQL Express 2012 database running. I'm trying to investigate syncing the two together, two-way syncing, and I'm unable ...