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

learn more… | top users | synonyms (2)

6
votes
1answer
427 views

How can I tell how many Cores SQL Server is actually using?

I have two servers running SQL Server. Server 1: SQL Server 2008 R2 Express (4 core) Server 2: SQL Server 2012 Developer Edition (8 core) As far as I am aware SQL Server 2008 R2 Express should ...
0
votes
3answers
500 views

How to uninstall SQL server 2012 not showing in control panel's “Programs and features”

I am frustrated to the core. While fixing my Sql Server I've made the situation worse. Here is the problem: initially my master database was corrupted, so the MSSql service was not starting. I tried ...
8
votes
1answer
251 views

Sequence is reusing

I have a sequence that generates tracking numbers for objects in my system. It had been working fine for quite some time. Last week we noticed that it was starting to re-use values. What seems to ...
1
vote
1answer
156 views

Understanding execution plans using TVPs

I have some slow running queries (8 seconds across 1M records grouped by months) and have been trying to make sense of the execution plans. We use around 10 TVPs to send in a set of filters that the ...
2
votes
0answers
235 views

SQL Server 2012 Local SSD TempDB Slow

I have a production deployment using local SSDs for tempDB. I have 2 SSDs in a RAID1 configuration. I am seeing average reads of 1-2ms but the average writes are showing as 1377ms on all four of my ...
0
votes
1answer
194 views

Script to automate converting a clustered index on primary key (with foreign keys to it) column to non clustered?

What's a good way to easily convert a clustered index on a primary key column to a nonclustered index? I know how to do this manually, but it's time consuming if there are several tables which have ...
1
vote
2answers
145 views

Backup of database X on SQL Server 2008 on server A - restore to SQL Server 2012 database Y on server B

I want to copy a SQL Server 2008 database to SQL Server 2012 with a different database name. Took a backup of 'production' and copied it to the SQL Server 2012 machine. Created a new SQL Server 2012 ...
2
votes
1answer
218 views

SQL Server large transaction log for simple recovery model? help! [closed]

Hi all i'm building a data warehouse and noticed that my tran log is massive (in simple recovery). MDF file is 2.6 GB. LDF file is 7.8 GB!!! Why is this??? i don't want a stupid tran log that's why ...
0
votes
0answers
29 views

“Not In” returns no rows all the time [duplicate]

Whats wrong with the following query. The first part of the select always return 0 rows. DECLARE @AgentID varchar(20), @StringValues varchar(max), @ContactKey int, @Note ...
0
votes
1answer
382 views

DB2 Linked Server on SQL Server 2012 - Grant Access to Users

I have a linked server on SQL Server 2012 Instance to point to a DB2 database and I have Sys Admin access to that Instance. I am unable to test connection to that DB2OLEDB database as I get below ...
2
votes
1answer
167 views

Fix Linked Server Without Restarting SQL Server Instance

Problem: Occasionally a nightly job will fail, and when I look into it, it is the result of a query across a linked server failing. But for some reason that query seems to remain 'open' in some way ...
1
vote
1answer
49 views

Log shipping - failed over to secondary, how to fail back

SQL 2012 I've been researching and testing Log Shipping as a DR solution. I got the two servers setup. Log shipping is in place and verified to be working correctly. I failed over by restoring the ...
1
vote
1answer
97 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 ...
5
votes
1answer
94 views

SQL Server 2012 Unable to Utilize Defined Amount of Locks

So I've been beating my head against the wall for two days about this and I can't find a solution. I'm running a script to stage a large amount of data. This script requires roughly 35 million locks ...
0
votes
0answers
29 views

Linked Server Performance Issue in SQL Server 2012 SP1

We are having issues with a job that seems to run for a long time and not seem to complete. The job runs a sproc that calls other sprocs and uses a linked server. The server that the job runs on is ...
2
votes
1answer
261 views

Do decimal separators behave differently for Money and Decimal data types?

I've recently been troubleshooting some problems with a third party application around regional settings and decimal separators. The detail of these problems isn't too relevant except to say that the ...
2
votes
1answer
77 views

Shrink my database log file, make sense? [duplicate]

I am now taking log backups daily after a long gap(1.5 years). Now when I run, DBCC SQLPERF('logspace') Result, Database Log Size (MB) Log Space Used (%) Status master 1.742188 ...
0
votes
2answers
50 views

Output a 2 column table to a three column query

Hi I have a Table with 2 columns, one column for the employeename and another column for shift, below is a sample. EmployeeName Shift John 1 Peter 1 ...
4
votes
1answer
152 views

Which version of Microsoft Tape Format is supported by which MS SQL Server

When you create a backup with Microsoft Sql Server, the resulting file is in Microsoft Tape Format. Different versions of SQL Server apparently use different version of this format. Which version of ...
0
votes
0answers
25 views

Application Role and access second database

I have written a script to create an audit trails to my database in a second one db. So far I had no problems during tests on my dev machine from SQL Server Management Studio. Problems started to ...
0
votes
0answers
173 views

Persistent Data Collector Collection_Set_3_Upload Job Failure with AlwaysOn Groups Enabled

I have a two node SQL 2012 AlwaysOn HADR cluster (v11.0.3412) with 3 availability groups configured. The AG groups are set to synchronous mode and the secondary is not readable (we do not want the ...
0
votes
2answers
648 views

Split a very large SQL table to multiple smaller tables [closed]

Is it possible to search a column within a table for a numerical value range of 1-2000 and then copy each full row into a different table? By doing so technically splitting the table into smaller ...
0
votes
1answer
84 views

apply cdc to existing data warehouse

I'm building an education data warehouse. I have various dimensions that i would like to track changes to i.e. DimStudent, DimClass, DimCollege, DimExamPaper etc. etc. My solution currently drops ...
0
votes
2answers
108 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
1answer
109 views

Stored procedure performs worse than straight query

I have a stored proc that takes 2 dates as parameters. The dates are used to specify a range of dates for the first in a series of CTEs to limit the scope. When I run the query in SSMS as a query, it ...
2
votes
1answer
227 views

How to get rid of clustered index scan?

I have a query that was generated by C#/Linq-To-Entities code. As with this kind of query, it looks seriously ugly and I doubt it would help to include it here. But I have run it through a query ...
5
votes
1answer
461 views

SQL Server AlwaysOn Error_number 35206

I've joined a Ecommerce business where they use SQL Server 2012 AlwaysOn for HADR and this is the first time I've come across supporting this technology. The Sql Server log on both nodes gets ...
2
votes
1answer
395 views

Failover Cluster and AlwaysOn Availability Groups across Data Centers

We have two 3 node clusters in separate data centers, let's call them ClusterP and ClusterS. ClusterP is our primary and ClusterS is our secondary for disaster recovery. Each cluster has multiple ...
1
vote
0answers
52 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 ...
2
votes
1answer
135 views

Is it advisable to add indexes to a data warehouse's staging area?

We have a data warehouse built in MSSQL 2012, Staging area, EDW, cubes and reports. In the staging area, the tables are a 1:1 copy of those supporting the systems used to fill the DWH with. The ...
0
votes
1answer
43 views

Sequence and table with the same name?

Can we have a sequence and table with the same name? I am trying to create a sequence with the same name as an existing table, but I get this error: There is already an object named 'XYZ' in the ...
0
votes
0answers
75 views

Are heterogeneous joins between MS Access and SQL Server tables really so bad?

I'm developing a multi-user Access 2013 application with an Access backend on a fileserver. At first I'm going to finish my stable Access application which works fine for the moment. However, I plan ...
1
vote
0answers
117 views

How to get usage based optimization working on SSAS?

I have set up the configuration for SSAS to log the usage into the database, since the table did not exist I let it do that. However SSAS created the table OlapQueryLog under the schema of the SSAS ...
2
votes
2answers
159 views

Datetime column vs Date + Time columns

I am designing a table for a system that saves a number of logs. We are looking at ~200 entries per second. We are using SQL-Server 2012 Enterprise Edition. I have a question regarding breaking up a ...
0
votes
1answer
434 views

Can connect to SQL Server 2012 via OSQL and SQLCMD but not via SSMS

We have individual developer edition SQL Server 2012 databases set up on each of our developers PC's. All PC's are Windows 7, firewall is disabled and everything runs fine. We're now looking to ...
2
votes
1answer
329 views

Is there any difference on performance when choosing DISTINCT or GROUP BY to bring distinct values?

I would like to know if there is any difference concerning performance when choosing DISTINCT or GROUP BY to bring distinct rows from a query. I've tried comparing the execution plans, but they seem ...
1
vote
1answer
345 views

SQL Server 2012 performance degradation

We are running SQL Server 2012 SP1 on Windows Server 2012. The issue we have is that after some time the server automatically reboots. Checking the logs did not show any errors. When looking into ...
0
votes
3answers
62 views

Lost my SQL Server 2005 host, SQL Server 2005 database import into SQL Server 2012?

My SQL Server 2005 host died, but the database related LUNS were on a SAN and still exist. Is there a way to use my SQL Server 2012 host to recover that database or import it in some way?
1
vote
1answer
682 views

Script not allowed to create schema objects when generating tables despite db_owner role

I am looking to make a "schema only" (no data) copy of a database on my local server. I used Tasks -> Generate scripts to script the tables from my existing database and then after creating the new ...
1
vote
1answer
1k views

Trigger to audit table changes

I have created a trigger to audit changes to a table: CREATE TRIGGER [dbo].[iudt_AutoAuditChanges] ON dbo.CPTCategoryMaster AFTER INSERT,DELETE,UPDATE AS BEGIN SET NOCOUNT ON; ...
1
vote
2answers
20 views

We have copied a drive that had a db on it and I need to open the db on a new server

Before I got here, they copied the old servers drive to an external disk. Then they blew away the old server. Now that they have a new server and SQL 2012 is installed, they would like to see the db ...
1
vote
1answer
89 views

SQL Server USE ignores IF block

I want to shrink the transaction log file of several databases using a maintenance plan. Those databases are mirrored, therefore the shrink task cannot be executed on the MIRROR databases, but the ...
1
vote
0answers
74 views

Identity in a view treated as ordinary int - migrating from SQL Server 2000 to 2012

I'm migrating a very old platform from a SQL Server 2000 backend and MS Access 2003 as its frontend to SQL Server 2012 backend and MS Access 2010 as the frontend. This obviously means a bit of ...
2
votes
1answer
66 views

Permissions to see and script objects, but not alter them?

I am a software developer. I have a production database that I need full ddl read access to, but not any ddl write or execute access. Is there a script I can send my DBA that will grant me full ddl ...
1
vote
2answers
29 views

How to update information of the data of column in the table matching the certain text?

I have a condition where i need to update the only matched case of the data in the table. For an example I have a #test table Sample data are Firstname Lastname ABCDEF GHIJKL BFGABCF FGYUTY ...
10
votes
1answer
429 views

SQL Server 2012 Page Life Expectancy resets to 0 after about 50 days

I've noticed an odd behavior on a 2-server HA cluster and I was hoping someone could confirm my suspicion, or maybe offer some other explanation... Here is my setup: A 2-server SQL 2012 SP1 ...
1
vote
0answers
32 views

SQL Server 2012 Page Life Expectancy resets to 0 after about 50 days [duplicate]

I've noticed an odd behavior on a 2-server HA cluster and I was hoping someone could confirm my suspicion, or maybe offer some other explanation... Here is my setup: A 2-server SQL 2012 SP1 ...
8
votes
2answers
515 views

Creating index on computed field: string or binary data would be truncated

I have a table Foo with the following fields: ID bigint not null identity(1,1), SerializedValue nvarchar(max), LongValue as TRY_CAST(SerializedValue as bigint) Now I want to create an index on ...
0
votes
2answers
84 views

Does CAST(DateTime AS DATE) cause the entire table to be CAST before comparison? [duplicate]

This is a very common need in the WHERE clause of our SQL statements: CAST(Something.CreationDate AS DATE) BETWEEN CAST(@firstDate AS DATE) AND CAST(@lastDate AS DATE) All of the fields are of ...
7
votes
1answer
264 views

Query plan cache bloated by ad-hoc queries, even with “Optimize for Ad-hoc Workloads”

I've been noticing what I thought to be unusual issues with our query plan cache, where the plans in the cache were never more than a day old. Through running the following query (courtesy of ...