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

learn more… | top users | synonyms (2)

2
votes
3answers
130 views

Replicating tables for reporting purpose

We have 5 tables in a database on Server A that we would like to replicate to Server B for reporting purposes. We would like to create different indexes on the destination copy so we can get better ...
5
votes
1answer
2k views

Why are queries causing spill to tempdb?

Background I am in the process of migrating a 160gb database from MSSQL 2008 (standard) on a Win 2008 server with 48gb RAM to a new server running MSSQL 2012 (64-bit web edition) on Win 2012 with ...
1
vote
1answer
184 views

Different results from sys.dm_db_file_space_usage with database prefix

To make it simple: According to MSDN (link) among other sources, you can get the amount of current free space in tempdb by using the following bit of TSQL: -- MSDN version SELECT ...
1
vote
1answer
258 views

System table missing in SQL Server 2012

I restored a SQL Server 2000 database to 2005 then to 2012. I am not able to see system tables that existed in SQL Server 2000 now. Can somebody please let me know what is the reason. Thank you
1
vote
1answer
416 views

Does MAXDOP affect the number of tempdb data files I should create?

From what I have read, best practices for configuring tempdb includes creating multiple data files. The rule of thumb as I understand it is if you should create the same number of data files as you ...
0
votes
0answers
29 views

How to install SQL Server 2012 Management Studio Books Online in Help Library Manager

I tried to install the SQL Server 2012 BOLs however my Help Library Manager is all greyed out except the "Choose online or local help"
1
vote
2answers
157 views

SQL Server 2012 is database name mandatory for logon?

is the database name mandatory SQL Server 2012 logon - like SERVERNAME\DBNAME ? On 2005 Server the servername for logon with Windows credentional has been sufficient. Thanks in advance, Tom
0
votes
1answer
422 views

How to add an article to existing replication

This is the first time I am going to add tables to replication. I have outlined the below steps to add a new table to existing replication. Please correct me if I am wrong. The table is just created ...
1
vote
1answer
711 views

Best Format to Bulk INSERT/UPDATE Data to SQL SERVER using C# [closed]

Can anyone tell me what is best way to bulk insert/update data to SQL SERVER 2012 using C#? I have an excel file which I am passing as TVP(table value parameter) to a SP. But this is little bit ...
1
vote
2answers
643 views

Expose temp tables to SSRS in stored procedure

Problem: Compare data of a given date range to the same data of up to 3 previous years, and display the tabular data and a graph in an SSRS report. However currently, my stored procedure that I have ...
5
votes
2answers
344 views

SQL Server Full Text Search - .rtf files incorrectly indexed by rtf tags

I've set up a full-text index on my SQL Server DB on a varbinary(max) column. I have a type column specified, which contains the extension of the file, such a ".doc", ".pdf" etc. However, I have ...
0
votes
2answers
80 views

MS SQL Server 2012 Error on TLog Backup

I have a MS SQL Server 2012 installation on which I am restoring a SQL 2005 .bak which includes some full-text catalogues The original .bak has no conflicts with 2012 (as the migrate advisor was used ...
1
vote
1answer
86 views

bulk insert for loas data

declare @DATADIR varchar(128) set @DATADIR= 'C:\SQL2012\SH_DATA' msg:Command(s) completed successfully. EXECUTE('bulk insert CHANNELS from '''+@DATADIR+'\CHANNELS.txt'' With (firstrow = ...
2
votes
1answer
40 views

What is the difference between node types and atomic types in XML

Im Studying TSQL and I came to the chapter regarding XML, and here a question that I cannot find an answer: "What is the difference between node types and atomic types"? Thank you!
0
votes
0answers
34 views

performance improvement - left join

How do I rewrite to improve performance of the below query. select S.col1, S.col2, MaxDDate from s_tbl s left join (select col1, MAX(DDate) MaxDDate from F_tbl group by col1 ...
2
votes
2answers
1k views

SQL Server 2012 Managment Studio not saving auto recovery files

I tried to go to Tools > Environment > AutoRecover. The check box of save autorecover is checked. Save every "5" minutes. Keep autorecover info for: 7 days. But it doesn't save any auto ...
0
votes
2answers
1k views

Implications of changing compatibility mode in SQL Server from 100 to 110

I have a database Mydatabase created in SQL Server 2008 R2. I have upgraded to SQL Server 2012. I was trying to execute below query to calculate percentile select Distinct ...
3
votes
2answers
538 views

SQL Server 2012 - password for services during silent installation

I am a database developer and I have a task to prepare silent installation of SQL Server 2012 using configuration file. I have a problem with passwords for server services like: RSSVCACCOUNT="NT ...
0
votes
1answer
33 views

Merge replication parameterised filters

We are looking at using merge replication to maintain a 2-way data flow between a central SQL Server 2012 Standard database and, eventually, 100's of international satellite SQL Express 2012 ...
6
votes
1answer
173 views

Any way to reduce sysallocunits contention under a heavy concurrent INSERT workload?

I have a database which is being inserted into by a large number of independent sessions. Each session writes to a different table, so you would naively expect that they would all proceed in parallel. ...
2
votes
2answers
101 views

fragmentation for non cluster index growth very fast to 30

i have table with about 7 milion records.index fragmentation was about 90 . i try rebuild index for all index. and it works fine but after nightly job fragmentation for one of none cluster index ...
1
vote
1answer
52 views

Automatic Failover without data replication

I have a need to be able to automatically failover my databases and most need data replication. However, one database does not need data replication and so, for performance reasons, we do not include ...
2
votes
0answers
115 views

How to use Blob Storage as shared storage in a Windows Azure Failover Cluster?

In the context of SQL Server 2012 Standard Edition, is it possible to make Azure Blob storage available to a SQL Failover cluster directly as a shared SCSI resource on a Windows Cluster composed on ...
0
votes
2answers
17 views

One of the Database Ownerhas been Removed and corresponding property changes in sql server

A database has been created on SQL 2008 by a user named user1 ,on dec 2013.Today ,we are going to remove that user(/owner) from the server.What will be the owner property of the database show then?
1
vote
1answer
280 views

Two “Connect SQL” permissions in SQL Server 2012

What is the difference between these two "Connect SQL" permissions in SQL Server 2012?
0
votes
0answers
141 views

How to setup subscription to publication for SQL Server replication to SAP HANA?

I previously posted on stackflow.com and was told to post here. Here is the original post if you're interested: ...
3
votes
1answer
1k views

Why is SQL Server using a clustered index scan for a self referencing FK cascade delete

I have made an example to allow me to show what my issue is: Setup: CREATE TABLE [dbo].[Test]( [TestId] [bigint] IDENTITY(1,1) NOT NULL, [ParentTestId] [bigint] NULL, CONSTRAINT [PK_Test] ...
6
votes
2answers
81 views

Need to include FKs in SQL Indexed View clustered index?

I'm using a SQL Server Indexed view to improve performance of a join that filters a (very) large table by a category on a small table. eg: CREATE VIEW BigTableSubset WITH SCHEMABINDING AS SELECT ...
0
votes
0answers
67 views

SQL Server 2012 Profiler - ShowPlan XML Batch ID

I have an application that makes RPC calls for a single procedure, most calls run in a few miliseconds. Occasionally the call takes 5-7 seconds. I'm trying to catch an execution plan for one of the ...
4
votes
2answers
2k views

SQL Server auto-trim of varchar value in equal comparison but not like comparison

I came across some interesting behaviour on SQL Server (observed in 2005 and 2012) today that I was hoping someone could explain. A query doing a comparison using = on an NVARCHAR field ignored the ...
1
vote
0answers
452 views

SQL Server logs error

There are two SQL Server 2012 instances on the server. Named instance gives following error when Management > SQL Server Logs is clicked. Default instance works OK and opens Log file viewer. ...
0
votes
0answers
33 views

Trouble migrating a MySQL database to MS SQL 2012 using the migration assistant

I am trying to migrate a MySQL server database to Microsoft SQL Server 2012. I converted the schema and synchronized the databases, but when I try to do the migration, it doesn't work and I get this ...
3
votes
1answer
2k views

Downgrade database from SQL Server 2012 to 2008 [duplicate]

Hi guys got a problem with a database. I've been asked to perform some indexing and delete queries on a live database, so first of I wanted to get the database to our dev server so I can test out ...
3
votes
2answers
632 views

Converting Tables to Ansi Padding On

I am currently working with a MSSQL 2008R2 Server and a database which uses a lot of tables that are a mixed bag of ANSI_PADDED Settings. 90% of the tables habe Columns with Ansi Padding on AND ...
3
votes
1answer
333 views

How do I get SQL Server agent to show up in SSMS for a non-sysadmin user?

I have already mapped the user to the msdb database and assigned him the role of SQLAgentOperatorRole, but the user still can't see the SQL Server Agent listed when he connects. The Agent show up fine ...
5
votes
1answer
240 views

Disabling SET Statements / Forcing SET Options in SQL Server 2008R2/2012

I am currently working with a MSSQL 2008R2 Database which uses the following SET-Commands frequently: SET ANSI_NULLS { ON | OFF } SET QUOTED_IDENTIFIER { ON | OFF } SET ANSI_PADDING { ON | OFF } ...
2
votes
0answers
16 views

Disabling SET Statements / Forcing SET Options in SQL Server 2008R2/2012 [duplicate]

I am currently working with a SQL Server 2008 R2 database which uses the following SET commands frequently: SET ANSI_NULLS { ON | OFF } SET QUOTED_IDENTIFIER { ON | OFF } SET ANSI_PADDING { ON | OFF ...
0
votes
1answer
718 views

Support to SQL Server 2000 from Visual Studio 2013(SQL Server 2012)?

I can't access to a database created by SQL Server 2000 from Visual Studio 2013, I asked this before in StackOverflow, but I don't get an useful answer: ...
0
votes
1answer
55 views

What are the compelling resons to update SQL Server name to a real one after its changing?

Took the job of monitoring and tuning a few dozens SQL Server 2012 Enterprise Ed. SP1 (64 bit) on Windows Server 2008 R2 Standard Ed. running inside virtual machines. All of them on running ...
2
votes
2answers
2k views

How to create a server alias in SQL Server 2012

We have a Windows Server 2012 server running with 2 instances of SQL Server 2012 installed on it - Live and System. Both instances are accepting connections on 1433 & Live is the default instance ...
0
votes
1answer
88 views

Use SQL Server Database Mail with Amazon SNS

Is it possible to configure SQL Server 2012 Database Mail (hosted on EC2) with Amazon SNS? I'd love a single place to manage all alert notifications and their subscribers in SNS, but Database Mail ...
0
votes
0answers
974 views

SQl Server 2012 Powershell script to generate database with schema and data

Using Sql Server 2012, could somebody be so kind and show me a simple powershell 3 script that generates my entire database (schema and data)? I tried this one: $Filepath='d:\b\t' # local directory ...
0
votes
2answers
59 views

SQL Server replicated databases swap

I have a SQL Server 2012 database. I would like to be able to make changes to this database or to it's replication, then make the replica, the real one. The point here is to have 0 downtime on ...
1
vote
3answers
128 views

Creating a copy of primary database and attaching the copy database in the same sql instance

I just got into a project in which we have only one SQL Server 2012 copy. We have 12 databases attached to the primary instance of SQL Server 2012. As I don't have SQL Server 2012 or supporting OS, I ...
1
vote
0answers
248 views

SQL Server: Principal DB becomes unavailable after problem with mirror DB, even with Set Partner Safety Off?

We've got a very simple mirroring setup here: just a principal DB and mirror DB, no witness, running in high-performance mode with SET PARTNER SAFETY OFF. This problem has happened to us twice now: ...
1
vote
2answers
1k views

Select all data group by 1 column and functioned by another

I have the following table in SQL Server 2012 : ID int priority int type int other data columns I want to query the table for the following result : grouped by 'type' get the id of top 1 max ...
1
vote
1answer
183 views

Running parallel delete statements

Problem: I have a massive table - occupies a whopping 9.5 TBs. I need to delete around 5 mil rows from it. The best method I have come up with deletes 1 million records in 2 hours! Since I can not run ...
1
vote
3answers
214 views

Trouble with SQL Server authentication in SQL Server 2012

I am working with a SQL Server 2012 database. I am able to log into the server using Windows authentication. Although I have the SQL Server authentication username and password which is provided to me ...
1
vote
0answers
36 views

Turn xact_Abort on for specific applications or user

We have a 3rd party application that requires xact_abort to be turned on, however we have other applications that require it to be turned off. The service that requires it turned on always logs in ...
0
votes
1answer
797 views

Export a SQL Server 2000 database to Server 2012

I have a production environment running Windows Server 2000 and a development environment using SQL Server 2012. I need to make updates to the DB and implement some new features using .ASP. Is there ...