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

learn more… | top users | synonyms (2)

1
vote
3answers
3k 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, ...
8
votes
2answers
1k views

SQL Server database design for “archived but available” data

We have this large database (>1TB) that we intend to "shrink". The database revolves around one main entity, let's call it "Visit". For discussion, let's say it is a database for a medical practice. ...
1
vote
0answers
376 views

Error installing Clustering with SQL Server 2012 on Windows Server 2012

We are installing SQL Server 2012 on Windows Server 2012 and trying to accomplish clustering. We've setup all the core functionality on the servers: advanced cluster preparation on all nodes and ...
2
votes
1answer
107 views

How to know if logreader agent already exists?

I'm creating a script to recreate a database for test purposes, and the database has some publications. In order to create or not the logreader agent I need to know if the current database already ...
1
vote
0answers
1k views

Issues with Log Shipping

First time at posting a question on here, so please bear with me and I'll try and detail all the information. Currently, I'm log shipping from SQL 2012 Standard Edition (11.0.3000) (lets call it ...
1
vote
1answer
127 views

Data Compression Enhancement in SQL Server 2012

Is there any specific enhancements in SQL Server 2012 for Data Compression Feature? Last time I checked SQL Server 2008 R2 introduced support for Unicode characters so columns with NCHAR data types ...
1
vote
1answer
64 views

Adding index in table suggestion?

I have a table called Products with ID(PK, Clustered), Name, Price, Brand, ...., RetailerID, SKU, ModelNumber. My query have SELECT .... FROM Products WHERE RetailerID = @RetailerID AND ( ...
0
votes
2answers
114 views

64bit SQL Server with total virtual address space of 4GB. How could this be?

My SQL Server 2012 Standard edition, 64bit has a total virtual address space of 4GB. Why is that? it is a 64bit installation: print @@VERSION : Microsoft SQL Server 2012 (SP1) - 11.0.3128.0 (Intel ...
3
votes
2answers
1k views

How to move from 32bit SQL Server install to 64bit?

A production server has accidentally been installed with SQL Server 2012 32bit version, while it needed a 64bit version. How best to fix this issue? Is it possible to simply UPGRADE from 32 to 64 ...
1
vote
1answer
112 views

sql server database size shown different in properties pane

while monitoring when checking database space used,my favorites are use indexinternals sp_spaceused select (sum(size)*8)/1024 as size From sys.master_files where name like 'indexinternals%' ...
1
vote
1answer
78 views

Query tuning - performance

Could you please help me tune this query. It takes over half an hour to run! I want to identify repeat bookings (can only be identified using an annoying varchar field - email) UPDATE #Repeats --a ...
3
votes
1answer
86 views

Does MERGE updates when not needed?

In SQL Server 2012, Does a merge statement like this : WHEN MATCHED THEN update SET A.len = B.len updates a row even if A.len equals to B.len ? Or does the SQL SERVER knows to ignore this ...
-2
votes
2answers
172 views

SQL Server 2012 - Stopword Error [closed]

I am doing an exercise in Microsoft 70-461 certification book (written by Itzik Ben-Gan) In chapter 6-Query Full text data. I run the following query to create a stopword list. The system showed me ...
1
vote
4answers
698 views

SQL Server 2012 - where is the table in dbo? [closed]

I am trying to insert something into the dbo.Documents table. After the query is run, I can't find the Documents under the TSQL2012 database. I created TSQL2012 for exercise purpose. I couldn't ...
2
votes
3answers
86 views

MS SQL Server instance name

Quick question guys! Will there be any issues if I use the default instance (MSSQLSERVER) for both test and production environments? They are on separate physical servers. I'm using MS SQL Server ...
1
vote
1answer
488 views

Stop and Start the Instance In a Job

i have sql server job. in the last step of job i want to stop/start sql server. I create .bat file with NET STOP "MsSqlServer" i try ssis package that use execute process task with cmd.exe and ...
0
votes
1answer
299 views

Setting Audit Events in SQL Server 2012

We have to do information assurance remediation on our SQL Server 2012 and came across the following finding: Check to see that all required events are being audited. So I ran these queries: select ...
0
votes
1answer
1k views

Sql Server Fix Users

I Create a user in my database with following command : CREATE USER Test WITHOUT LOGIN I created a login with the Test Name. I want to link Test user with Test Login. When I use following command ...
6
votes
1answer
123 views

Is there a way to implement a cross-database task on SQL Server 2012 with the Availability Groups feature?

We use SQL Server 2012 and its new Availability Groups (AG) feature. There is a task for moving old data of some tables from one database to another database. Both databases are included into ...
1
vote
0answers
172 views

KPI Metrics Table Design [closed]

We are currently working on project to get KPI metrics from out account partners,We want to design a table and It will have 3 Major Business units 4 Business Verticals (Service Desk, Knowledge ...
0
votes
2answers
87 views

Copying a restoring database in SQL Server 2012

I've got two SQL Servers, one of these servers (Server A) is backing up transaction logs on some database and uploading them to the other (Server B). Unfortunately I have no access to Server A, I ...
3
votes
1answer
54 views

reset sql server to default?

Sorry in advance for the noob question. I am trying to learn to mirror a test database and in the course of doing this, was typing in some commands into a query box. While trying to create a ...
2
votes
0answers
69 views

SQL Server 2012 Replication

Please help me out with a problem I am facing. I have a table T. I altered the table to alter the column C from varchar (10) to varchar (100). Now, there is a view V that is schema bound and selects ...
4
votes
1answer
190 views

Why clustered index scan?

I just started to learn to optimize my queries and to analyze their query plans. I thought this query would generate nonclustered index seek + key lookup. SELECT ct.* FROM Person.ContactType AS ct ...
5
votes
1answer
12k views

How to uninstall SQL Server Management Studio 2012? [closed]

How to uninstall SQL Server Management Studio 2012? ControlPanel's "Uninstall or change programs" (in Windows 7 Prof) gives a row of entries: while internet search results always tell: "click ...
3
votes
2answers
394 views

SQL Server 2012 CPU spike due to LinkedServer - how to find the offending query?

As part of another question (SQL Server 2012 performance issues (maybe due to linked server)) I've identified a CPU spike to be directly related to a spike in Bytes Received, which leads me to believe ...
1
vote
1answer
1k views

How can I view special characters in SQL Server 2012 Management Studio grid view?

In a SQL Server 2012 database, I have a log table where I log SQL queries executed by a VB.NET application. The field is defined as nvarchar(MAX) In Microsoft SQL Server Management Studio, when I ...
1
vote
0answers
257 views

CDC with SSIS: process all changes in order of occurrence

I have a SSIS package that I'm using to sync (in an on going basis) all changes from one table to another. Note that I need to sync ALL changes and not just NET changes. My problem is that I cannot ...
2
votes
3answers
349 views

SQL Server not properly using memory?

Ihave a database with two tables in it. One table has approximately 20 million rows and another has approximately 70 million rows. When I run sp_spaceused on these two tables I find that the total ...
2
votes
1answer
409 views

Sync & Async Synchronisation on SQL Server 2012

Is it possible to set up async synchronisation (high-performance) on MS SQL Server 2012 globally, but somehow force synchronous replication for one table between nodes? Nodes are in different ...
4
votes
3answers
108 views

Enforce Schema-bound views

For reporting purposes, I need to be able to query dependencies between views and underlying tables at column level (via sys.sql_expression_dependencies). One way to get SQL Server to store ...
6
votes
1answer
742 views

How accurate is the sys.partition.rows column?

The system view sys.partitions has a column "rows" that is the total number of rows in a given partition. For a table that is not partitioned (or only has one partition depending on how you look at ...
3
votes
2answers
131 views

How can I track the last modified user of a file in an SQL Server 2012 FileTable

Other than through a custom interface to store/fetch files using the old filestream way, is there a way to log which user modified a file opened directly from the share exposed by Sql Server 2012?
0
votes
1answer
162 views

SQL Server 2012 for data warehouse [closed]

I have to develop a data warehouse using SQL Server 2012. I'm confused about the release I could use... Standard or Enterprise? The database server will have 16 or 32 GB of RAM and a Quad-Core CPU. ...
2
votes
1answer
548 views

SSIS execute task running wscript.exe hangs when started from SQL Server Agent

I have a problem with sql server 2012 SSIS package which has execute step running wscript.exe utility. When I run this package from BIDS everything works fine, when I start package from SSIS it also ...
4
votes
1answer
77 views

SQL Server 2012 32 bit - will enabling locked pages allow it to use more memory?

I recently found out, that a server got a 32 bit installation of SQL Server 2012 rather than 64bit, and it is running out of memory now. Can I have this 32 bit installation use more memory using ...
8
votes
1answer
542 views

How to move a database from SQL Server 2012 to SQL Server 2005

What are my options if I need to move a database from SQL Server 2012(32bit) to SQL Server 2005(64bit)? I know I cannot: restore a backup of the database on SQL Server 2005 detach & attach I ...
1
vote
1answer
149 views

SQL Server 2012 Developer edition questions

I'd like to use SQL Server 2012 Developer Edition on our development/test server, which is a dedicated server rented from an online company. When the product is ready, I would like to have it ...
1
vote
1answer
302 views

SQL Server 2012 SQL Log “the log file is not using Unicode format”:

On only one server of many, the SQL log is blank and shows a message "the log file is not using Unicode Format" when viewed via SSMS. The log is in the right location as specified in the service ...
2
votes
0answers
126 views

TDP setup for SQL Server databases [closed]

I am looking for any tips/steps used by the DBA's for install and configuration of TDP backup for SQL databases. Hope this meets the criteria for the forum. Thanks
1
vote
2answers
73 views

Recommended best practice for server naming [closed]

We're currently in the process of upgrading to SQL Server 2012, in the past all servers have been installed with a naming convention which contains a "-" in the middle i.e. TS-DBL01 I'm trying to ...
1
vote
0answers
2k views

MS SQL Server - Login timeout expired

I am doing this tutorial of Microsoft: Basic Data Mining Tutorial http://technet.microsoft.com/en-us/library/ms167167.aspx I am using SQL Server 2012 and SSIS - SQL Server Integration Services but I ...
1
vote
0answers
70 views

SQL Server scheduled backup to Azure Table bacpac

I moved my database from Azure SQL to Windows Server 2008 R2 + SQL Server 2012 Web edition virtual machine on Windows Azure. The Azure SQL provided automated backup to Azure Table as bacpac file. It ...
1
vote
1answer
55 views

Changes to main Database during Transactional Replication

Can you please advise how can I keep slave database up to date while it's in transactional replication with master. I mean what If I change indexes, columns, tables or sthm else in master dabase? ...
2
votes
3answers
337 views

Uniqueidentifier vs. IDENTITY vs. Material Code --which is the best choice for primary key? [closed]

Which one is the best choice for primary key in SQL Server?There are some example code: Uniqueidentifiers e.g. CREATE TABLE new_employees (employeeId UNIQUEIDENTIFIER DEFAULT NEWID(), ...
0
votes
1answer
167 views

Creating plan guide for query called through sp_executesql

To make a long story short, I have a view called vwRelatives which uses CTE recursion to build family trees. It's meant to be queried for a single person at a time. This runs in about a quarter ...
2
votes
0answers
644 views

Microsoft Sql Server 2012. 100 000 000 rows table select/insert performance [closed]

This is first time i am working with huge database ( 100 million rows in table Events). Use case here is to quickly select and insert x and y for selected Organisation and datetime. My database ...
0
votes
2answers
352 views

Hierarchy of Employee “names” with CTE: Cannot create a correct version

I am trying to create the correct structure of my sql (CTE) query, but I can not. This is a version I want to have . And this is my current version: . As you can see there are duplicates and i have ...
3
votes
2answers
1k views

transactional replication, failing with communication link failure half way through bcp

I am trying to replicate to a 4th subscriber on a remote site. 3 subscribers work fine locally. the other difference is this is a 2012 subscriber from a 2008 r2 publisher and remote distributor. When ...
8
votes
1answer
1k views

SQL Server's READ COMMITTED SNAPSHOT vs SNAPSHOT

I was researching the differences between SQL Server's READ COMMITTED SNAPSHOT and SNAPSHOT isolation levels and came across the following resource: Choosing Row Versioning-based Isolation Levels ...