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

learn more… | top users | synonyms (3)

0
votes
2answers
372 views

Disaster Recovery Options for Sql Server

I wanted to see what suggestions you might have for Disaster Recovery Options based on the following criteria. Currently running SQL 2012 standard edition We have 18000 databases (same schema across ...
2
votes
1answer
73 views

DR option for SharePoint databases? ideas and experiences

First let me clarify that I am not looking for thoughts in terms what is the best or the bad options for a DR for SQL Server. I am just looking for for inputs from experienced people. We are running ...
6
votes
2answers
181 views

SQL Server 2012 Standard Edition Disaster Recovery Options?

Suggest me the best method for My DR plan. Currently we have set of databases (6) used for our application and we in the process of building DR and HA plan. As we are into small business we are using ...
3
votes
1answer
150 views

Conversions between any data type and the binary data types are not guaranteed to be the same between versions of SQL Server

I just found that on the SQL Server 2012 MSDN documentation for binary and varbinary types, they mention the following at the end of the article: Conversions between any data type and the binary ...
5
votes
4answers
6k views

Moving rows from one table to another

I am moving records from one database to another, as a part of archiving process. I want to copy the rows to destination table and then delete the same rows from the source table. My question is, ...
1
vote
0answers
36 views

SQL server database performance issue [closed]

There are two database on same sql server 2012, with same tables, indexs and data as well, but for some reason one database response is 6 times slower then the other in most of the quries. Please help ...
3
votes
2answers
115 views

Unexpected gaps in IDENTITY column

I'm trying to generate unique purchase order numbers that start at 1 and increment by 1. I have a PONumber table created using this script: CREATE TABLE [dbo].[PONumbers] ( [PONumberPK] [int] ...
0
votes
1answer
67 views

Breaking up long running query into batches runs fine for a while and then produces fatal error

I'm using a variation of this post which details using "careful batching" to delete records in batches from a table that contains 38MM records. The script below runs for a while and shows results ...
1
vote
0answers
18 views

AlwaysOn AG Live Migration

A couple of thoughts on AlwaysOn AG migrations: Is there a reason why Microsoft didn't implement similar technology to Hyper-V Live Migration to AlwaysOn AGs so that the buffer pool and cache are ...
0
votes
0answers
14 views

Auto Increment Sequence Broken After Applying a Key [duplicate]

After SQL Server 2012 Enterprise edition's evaluation period expired, I applied another key using the edition upgrade wizard. After it was successfully done, all Auto-Increment columns started ...
7
votes
3answers
7k views

Log Shipping - RESTORE WITH STANDBY - on SQL Server 2012 keeps breaking

We are using log shipping and RESTORE WITH STANDBY on SQL Server 2012 in order to restore the database in read-only mode for reporting purposes. However, the log shipping setup keeps breaking after ...
1
vote
1answer
45 views

Performance improvement on SQL query joining table on itself

I'm running this query on a table with approximately 20MM records in it. It's a very slow query, and I'm wondering if there's a better way to accomplish this that might run faster ? delete previous ...
2
votes
1answer
371 views

How to troubleshoot how resource governed query is being throttled in SQL 2012?

I have a parallelized query on SQL 2012 SP1 (ent) that is running in a user defined resource governor pool much much slower (2 seconds versus 125 to 140 seconds under user defined pool = ~75 times ...
11
votes
2answers
17k views

What is the fastest way to insert large numbers of rows?

I have a database where I load files into a staging table, from this staging table i have 1-2 joins to resolve some foreign keys and then insert this rows into the final table (which has one partition ...
6
votes
2answers
21k views

SQL Server 2012 Restore backup to new DB Name

I seem to remember that, in 2008, you could restore a backup to a new copy of a DB, by changing the name in the "Destination Database" field from the restore-wizard. It would create a brand new DB, ...
1
vote
1answer
29 views

I need to figure out the last time that a function was used by SQL Server. How can I do this?

I work with databases that contain thousands of stored procedures and hundreds of functions. I have found on-line methods to track the usage of stored procedures; however, I haven't seen the same for ...
4
votes
1answer
272 views

Why does SSMS highlight SUBSTRING in purple but RIGHT in grey?

I apologise for the trivial question, but I was trying to work out how to do a RIGHT in SQL so I experimentally typed RIGHT and it didn't highlight in purple, so I spent some time scratching my head ...
1
vote
1answer
32 views

SQL Availability Group restore database to standalone server

Running: SQL Server 2012, Windows Server 2008 R2 I want to test a backup by restoring onto an isolated server. The backup was taken from an Availability Group (HADR) configuration, but the target ...
0
votes
1answer
52 views

Need to make sense of FileTable permissions

I'm setting up a FileTable to allow users to quickly stuff some PDF report files into a database for later searching via an intranet application (to be built later). Sorting out the necessary ...
1
vote
1answer
59 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 ...
2
votes
2answers
124 views

Why can't user with SQLAgentOperatorRole delete his own SQL jobs

I created a login and a user. I assigned the user as the db owner of the database "test". Then I granted him the role SQLAgentOperatorRole so that he can delete/create/modify the jobs belonging to the ...
2
votes
1answer
36 views

What should be the command for following role creation requirement?

I need to create a role where the assigned user can access only the 'AdventureWorksDB" where he will have execute permission to all tables,views and stored procedures in the database. I wrote the ...
1
vote
1answer
151 views

Clustered index on a column with low selectivity

I have a table with a lot of columns. Two lookup functions are performed: 1) lookup by using column name (this happens rarely, maybe twice a season), and 2) lookup by column date. The column name has ...
13
votes
2answers
115 views

Index on a persisted computed column not seekable?

I have table, called Address, that has a persisted computed column called Hashkey. The column is deterministic but not precise. It has a unique index on it that is not seekable. If I run this query, ...
-2
votes
1answer
36 views

when adding a table to my dbo.view I don't get the entire view

here is the code for my view that calls all rows from the tables: SELECT dbo.Purchase_Order.Purchase_Order_ID, dbo.Purchase_Order.Purchase_Order_Number, dbo.Purchase_Order.Purchase_Order_Date, ...
1
vote
1answer
24 views

Attach Database is disabled in Microsoft SQL Server 2012 Management Studio

I have buy from Godadday hosting and domain, after that I have create database in godaddy and the connect to this db using my authentication. I have .mdf, .ldf that need to attach to the connected ...
2
votes
1answer
41 views

How to add new named instance in SQL Server 2012 [closed]

We have already installed SQL Server 2012 with required instance and collation name. But now as per the project needs we have need to add one more instance name. Can anyone knows how to add new ...
1
vote
1answer
56 views

Identity column value falling behind randomly

We are having a strange intermittent issue where the identity column value falls behind the MAX(ID) for the table. Each customer gets their own table that stores statistics to the tune of ...
1
vote
1answer
93 views

Failed to deploy the project. Try again later. (Microsoft SQL Server, Error: 27118)

I try to deploy new version of existing SSIS project into Intergration Service Catalog and getting error: "Failed to deploy the project. Try again later. (Microsoft SQL Server, Error: 27118)" ...
1
vote
1answer
34 views

How to group data and write it's group id for each row?

I have sample data: CREATE TABLE #T (Name varchar(5), GroupId int NULL) INSERT INTO #T (Name) VALUES ('A'), ('A'), ('A'), ('B'), ('B'), ('C'), ('D'), ('D') Name GroupId ----- ----------- A ...
1
vote
2answers
654 views

Migrate sharepoint database from SQL Server 2012 express to SQL Server 2012 Standard

My sharepoint is using SQL Server 2012 R2 Express as a database Server, and I already have reached the limit of space (10GB). In the other hand I have a SQL Server 2012 Standard with proper license. ...
1
vote
2answers
77 views

How can I run a SQL job every 1 second? [duplicate]

I have an SQL Job which processes minimum amount of rows at a given time. Currently its running every 10 seconds which is the minimum available in Job Scheduler. But because of that the table used ...
1
vote
2answers
50 views

When to prefere a truncate over a batch-delete?

When I browse DBA-Reactions I understand nearly all the .gifs but with this one I have trouble: https://twitter.com/DBAReactions/status/613840893322338304 I mean truncate obviously doesn't create ...
5
votes
5answers
5k views

SQL Server Management Studio 2012: How to have folders in the SSMS project?

I'm using SSMS 2012 to talk to the SQL server 2012 and Azure SQL servers we use. I admit I'm not a SQL expert so I've been saving most of my SQL scripts for future reference. I've quickly run into 20 ...
1
vote
2answers
45 views

Automating an SQL task on a monthly basis

At the start of each month I have to give a team a copy of the live database which is held in a backup from 1am each morning (D:\Backup) - We then copy this database elsewhere onto a dev server and ...
1
vote
0answers
39 views

SSRS puts excessive load on SQL server

I have this bit of code: With ab as (Select distinct d.Code from d join a on d.code = a.Code where a.text like '%AutoPost%' ), sd as (Select distinct m.ref, m.Number, m.Completed, s.ID, ...
0
votes
1answer
16 views

Correct way of configuring remote users to connect to Microsoft SQL Server 2012

I have 2 Servers, a web server and a database server. Web server runs a number of .net sites that need to connect to the database server. Currently, I have a configuration string for each ...
3
votes
2answers
5k views

SQL Server Service Account login or password is not valid error

I am trying to install SQL Server 2012 Express on a Windows 2012 Server for test purposes. This machine is part of our company domain. During installation I am trying to use one of domain account ...
3
votes
1answer
42 views

Determine Gap Records, Fill and Return Result

The following working code targets SQL-Server 2012 and I have distilled the actual problem into a manageable scenario with the code example shown below also presented on SQL Fiddle. I seek feedback ...
1
vote
0answers
55 views

A significant part of sql server process memory has been paged out. Lots of free memory though

Having a problem where my SQL Server 2012 SP2 Enterprise server says that most of SQL Server's memory has been paged out to disk but there's over 100GB free (of 256GB). From there system performance ...
0
votes
1answer
24 views

SQL Server not using all cores

I have a server with 6 cores, I've installed SQL Server 2012 web edition, based on core licensing, allowing up to 16 cores. However, it only uses 4 cores. In the error log file: 2015-07-09 ...
6
votes
3answers
6k views

Logins aren't syncing across Availability Groups

We have 2 servers in an AlwaysOn group. While the user accounts within each synchronized database exist on both servers, the database instance level logins only exist on one of the servers. Ie ...
3
votes
1answer
62 views

How to create a login and user that can only access one schema in one database

I have executed the following: USE [MyDatabase]; GO CREATE LOGIN [MyDomain\MyAccount] FROM WINDOWS WITH DEFAULT_DATABASE=[MyDatabase]; CREATE USER [MyDomain\MyAccount] FOR LOGIN [MyDomain\MyAccount]; ...
1
vote
2answers
88 views

SQL Server 2012 and DBM

Why would MSFT would deprecate mirroring from 2012.. I understand alwaysON will replace it but then SE users are left with nothing..no alwaysON or dbm from future releases.. Just analyzing from end ...
1
vote
1answer
118 views

Does reporting webservice url contain the function that helps to export the report to the client version?

The reporting webservice url contains the webservice url that contains all the information of the Reports which are created in SSRS. As the report has been created on reporting service, i want to ...
1
vote
1answer
50 views

Problem trying to force the use of a filtered index

I was trying to do some testing on filtered indexes yesterday and created a fairly simple situation: CREATE TABLE IndexTest ( ID INT NOT NULL IDENTITY(1,1) CONSTRAINT pk_IndexTest PRIMARY KEY, ...
2
votes
0answers
40 views

SQL Server 2012 replication setup on routed network

I'm trying to setup replication between two SQL Server 2012 instances. I set up a publication successfully on server1, but then I had a problem when trying to access it from server2, because the only ...
2
votes
2answers
77 views

Execution plan has TOP operator for query without TOP or ORDER BY

I have product sales by month temporary table.(subset of much larger historical table) I'm running query to find new product not previously sold in the previous months for a specified 6 month range. ...
-1
votes
2answers
63 views

how can I delete records when my disk drive is full?

My data folder of SQL as filled up the space of my local drive. I have 150KB free space left in the drive. So I have to delete some records to regain space. But when I run the delete query it says ...
9
votes
2answers
162 views

SARG cardinality estimate, why not full-scan?

Why there is no full-scan (On SQL 2008 R2 and 2012)? Test data: DROP TABLE dbo.TestTable GO CREATE TABLE dbo.TestTable ( TestTableID INT IDENTITY PRIMARY KEY, VeryRandomText VarChar(50), ...