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

learn more… | top users | synonyms (2)

0
votes
1answer
42 views

Unable to copy a DB from SQL Server 2000 to SQL Server 2012 using copy wizard

I am trying to copy a database from SQL Server 2000 to SQL Server 2012 using copy wizard in my local machine where SQL Server 2012 is installed. But, the wizard is not detecting destination server. ...
1
vote
1answer
38 views

Difference in architecture between SQL Server 2005 and SQL Server 2012 [closed]

I've been asked to identify the architecture differences between Microsoft SQL Server 2005 and 2012. I've been pointed out to http://technet.microsoft.com/en-us/library/bb545450.aspx but I haven't ...
1
vote
2answers
168 views

Should these two indexes suggested by the SSMS missing index feature be combined?

I'm trying to improve the performance of a specific query that is automatically generated by Entity Framework. I have run the query through SSMS, and it has suggested creating two missing indexes. ...
2
votes
1answer
39 views

Defining a column as nullable in a view (but not in the referenced table)

My company is working on implementing a new HR application that will unify our existing HR processes. We've run into a bit of a sticking point, though; according to business rules, the EmployeeID and ...
4
votes
2answers
85 views

Quickly restore test/QA SQL Server database

My company is releasing new mission critical software. For thorough QA, we are doing database comparisons. Our process is: Restore full backup. Test code. Compare. Repeat. This database is ...
1
vote
3answers
47 views

Restoring SQL Server database with CDC

I want to perform a database restore on SQL Server 2012 and copy the database to a different server. CDC is enabled on the original database. I have managed to copy the database along with the CDC ...
0
votes
1answer
45 views

Procedure with Insert Data From One Table to Another Table

I have two tables Person with PersonId, Name,Address,Mobile and PersonLog with Id,Name,Address,Mobile,FK_PersonId. I am trying store the old data in PersonLog and Person to be updated. This is my ...
0
votes
0answers
22 views

How to retrive output depending on last alphabet from entry in table [migrated]

I have table User with Id, Name. So depending on last alphabet from column Name, i need to output some text. If last char is 'o' should return YES, if is 'i' return NO, else null Ex. Monika ...
2
votes
1answer
60 views

Table design for child tables with multiple many-to-many relationships

We are working on designing tables for a new Networking application, and have been having some problems with finding the best design for the top level tables. Network is the top level table. Under ...
0
votes
2answers
518 views

SQL Server 2012 linked server to SQL Server 2000

I am trying to select through an linked server from SQL Server 2012 to SQL Server 2000. The linked server has been setup and I can browser the target database through the linked server which ...
0
votes
0answers
21 views

sql server linked server does not consider indexes [closed]

We have a query with a join between two tables. The first is in the database and the second is in another listener, connected by a linked server. I am executing this query in SQL Management Studio ...
3
votes
2answers
87 views

Keep getting message: Failed allocate pages: FAIL_PAGE_ALLOCATION 540

I'd appreciate some help with the following: I've done some Googling, but haven't managed to resolve this one. I keep receiving a message in the SQL Log 'Failed allocate pages: FAIL_PAGE_ALLOCATION ...
7
votes
1answer
120 views

T-SQL - OPTION (FAST x) and trace flag 8722

I have searched a long time and still haven't found the answer to my problem. Our Dynamics AX is generating queries with the query hint OPTION (FAST x), which sometimes forces a bad execution plan to ...
0
votes
1answer
173 views

Copy+Pasting currency value from SSMS 2012 to excel does not complete or calculate new value

So I'm trying to copy and paste some query results into Excel, and for some reason it seems to be not properly completing the first value. Let me explain what I mean by this. In Excel the cells I am ...
0
votes
1answer
83 views

How to split one big table that has 100 million data to multiple tables?

I have one database in Sql server 2012 and in that there is one table that has more than 100 million data and I wanted to split that table to multiple similar table with 1 million data in each table. ...
0
votes
0answers
46 views

Column encryption/decryption using encryptbykey

Working on a project where I need to encrypt a few sensitive columns in a table but make the data available through a procedure that a user can execute through either a report or excel. In looking ...
1
vote
1answer
43 views

Pre-production database replication solution

I would like to start by specifying I am no DBA and have basic understanding of advanced DB concepts. I am trying to find the optimal solution to replicate our production database to our ...
0
votes
0answers
27 views

SQL Server 2012 Replication Subsystem Increase Number of Working Threads

I am trying to create Transaction Replication (Push) between two servers, using a distribution database on a3rd server. Server 1 is SQL Server 2008, Server 2 is SQL Server 2012. The Distribution ...
0
votes
1answer
64 views

Windows SQL Server Express 2012 and LDAP external server integration

I have a new installation of Windows server 2012 with SQL Express 2012 with the management tools. I'm planning to create there a simple synchronization that will make queries twice per day to an ...
2
votes
1answer
74 views

Replicating a SQL Server database & Optimization

We got a database of approximately 100-120 GB on a server with 128GB ram, while the db is sitting on an 256 GB SSD drive. The bulk of the database space is spent on the tables below: Page_contents ...
1
vote
2answers
94 views

Transaction Log Shipping across multiple SQL Server versions

I'm lead to believe that TLS is only appropriate/supported across the same versions of SQL Server. What I'm trying to do is to maintain a reporting (read only) version of a production transactional ...
3
votes
2answers
7k views

Can I install SQL Server 2012 on a machine with 2008 R2 already?

I have been using SQL Server 2008 R2 for quite a while, and it is working great. Now I need to use SQL Server 2012. Will this effect my existing databases? How much risk is involved in installing SQL ...
0
votes
0answers
23 views

What are the best practises for locking down an SQL Server Instance Data/Log directories?

We have our own on SQL Server instance on a client's system. Other vendors also have instances on there. In order to prevent access to our data we are limiting the user access to our data using ...
0
votes
1answer
11 views

Altering table on SQL Server 2012 AON High Availability Databases [duplicate]

In a production site, the current configuration I am using is three SQL Server 2012 servers, with some databases configured with AON High Availability. I understand that between the AON High ...
0
votes
1answer
75 views

How to get more information from dm_exec_query_stats

I am running SQL server 2012 on windows azure VM (windows server 2012) I suspected that some of my web appliactions are attacked via SQL injection, So far i could not trace the relevant text with my ...
0
votes
1answer
50 views

Why do my backup policies fail when a database's guest user is disabled?

I'm attempting to implement Policy Based Management on a SQL Server 2012 instance also acting as a Central Management Server using the Enterprise Policy Management Framework. The job running the ...
2
votes
1answer
1k views

“No row was updated error” in SQL 2012 - worked fine in SQL 2005 and 2008

I have a database that currently lives in SQL Server 2005. We are currently looking at upgrading to SQL 2012. I installed 2012 in a test environment (Windows Server 2012 virtual machine). Backed ...
0
votes
1answer
73 views

Page compression not working?

I have created a table where I have around 100 partitions (per month), all of them are configured to use page compression. After that I'm inserting data to this table month by month. I now would ...
2
votes
1answer
37 views

Create failed for Availability Group 'AGN'

I tried creating availability group (AOH) many times but no luck , It got failed every time. Please help me on this case. I configured Windows cluster (Name as 'WINCLUSTER') with two nodes. They are ...
0
votes
0answers
56 views

Prevent gaps while using Identity/sequence object in sql server

I have a table and I am trying to insert values in it. I want to prevent gaps in the primary key column. For primary column I have tried using Identity / sequence objects. I know that this is ...
2
votes
2answers
995 views

db_owner unable to drop database - Error 615, SQL Server

I have a SQL Server 2012 database running on amazon EC2. I've created a user to be able to create, edit and drop databases. I gave the new user with dbcreator server role. My user can connect ...
3
votes
0answers
53 views

PowerShell Move-Item command made SQL and Windows entirely unresponsive

A LUN expansion completed overnight on our 15k FibreChannel VMAX SAN from 4 to 13 terabytes. This morning I attempted to move a 4.5 terabyte file from a temporary SATA LUN to the newly expanded LUN ...
9
votes
5answers
14k views

What is the fastest way to export a table to a text file

I will have a SQL Server 2012 database and a table with 3 million rows and maybe 50 columns. What will be the fastest way for an unattended background .net process (maybe issues some SQL or Powershell ...
0
votes
2answers
110 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 ...
4
votes
4answers
317 views

How does SQL Server determine precision / scale?

I'm running SQL Server 2012 SELECT 0.15 * 30 / 360, 0.15 / 360 * 30 Results: 0.012500, 0.012480 This one is even mor confusing to me: DECLARE @N INT = 360 DECLARE @I ...
2
votes
1answer
52 views

Detached database file permissions

I have a script that detaches databases for archival when they meet certain criteria. The script is executed by SSIS under the local Administrator account by the Ghost of DBA Past. Per design it (by ...
2
votes
0answers
30 views

Identifying if spid on SQL Server is in rollback after low disk space

On a test box I wanted to get an idea of how long adding an identity field would take to a table with roughly a half billion rows. The process ran for about 10 hours and we noticed it was getting ...
2
votes
1answer
476 views

Inline edit SQL Server database rows from Visual Studio

I'm pretty sure Microsoft have pulled one of the most useful features for performing quick edits on a SQL Server Database within the Visual Studio IDE. It seems to have only affected SQL 2012 ...
4
votes
1answer
91 views

How can “HierarchyID” type work when “CLR” is disabled?

The following statement sp_configure 'clr enabled' returns: name minimum maximum config_value run_value clr enabled 0 1 0 0 I assume this means there are no CLR ...
0
votes
2answers
33 views

SQL Server 2005 to 2012 Replication, cannot access replicated data

I have created publication (snapshot, small table with 10 rows) on MS SQL Server 2005. Then, I created push subscription on MS SQL Server 2012. When I try to select data form table, process takes ...
8
votes
3answers
1k views

Truncated 200GB table but disk space not released

I have only 2GB left, so I need to remove this history table. This table now is empty but the database disk space not released. And the database file is 320GB.
1
vote
1answer
69 views

Migrate Management Data Warehouse to a New Instance

Is there a defined procedure to follow for moving a SQL Server 2012 management data warehouse to a new server\instance? We intend to setup an MDW on a test sql server instance first, but will then ...
1
vote
1answer
285 views

SQL Server 2012 Publisher SQL Server 2008 Subscriber version issue

So I have a setup where one virtual machine is a SQL Server 2012 publisher and I need to setup merge replication on a SQL Server 2008 subscriber on a different vm. When setting up the subscription ...
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 ...
1
vote
1answer
447 views

Troubleshooting Mirroring Configuration

I am configuring database mirroring on SQL Server 2012. After configuration I am getting the following error when attempting to start the mirroring session: tcp server cannot be reached or does ...
3
votes
1answer
82 views

Possible reasons for really long database recovery

This is cross-posted at SSC, but restore is now going on 6 hours. Hello, Overnight I ran restores with NORECOVERY for a 5tb database, along with several other 250GB - 1.3tb databases. I did that ...
0
votes
1answer
47 views

Select complete next row based on the current row

Hi i have a complicated condition. I have a table lets say 'Test' ID Partner Type Amount 143854 CSTC Purchase -0.81 144029 CSTC Purchase -0.69 144030 CSTC Purchase ...
1
vote
2answers
2k views

Create database fails with Microsoft SQL Server Error 5133, Operating syste, error 5 (Access is denied)

I just installed SQL server 2012 on Windows 2012 today. After the install, I changed the database settings to create database files in f:\mssql instead of the default. i verified the confired and ...
2
votes
1answer
128 views

Listener pointing to incorrect AlwaysOn Availability Group

All, Thanks in advance I have two instances of SQL Server 2012 SP1 on a three node WSFC with a HAdr group on each instance with a corresponding listener. Instance 1's listener points to Instance 1, ...
4
votes
1answer
126 views

How to configure SSRS (SQL Server 2012) to run on a different instance, but same server as SharePoint

I have an instance of SQL Server 2012 running on Windows 2008R2 along side another instance of SQL Server 2012 that is running SharePoint (I think it is SharePoint 2010). When I try to access the ...