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

learn more… | top users | synonyms (2)

0
votes
1answer
30 views

sql server service broker

For the last few days the service broker command which run from master database is consuming much more RESOURCES than before. The Impact on the Database is high (from the bad side), It causes for ...
5
votes
2answers
900 views

Error running Powershell Script in SQL Server Agent

I have a SQL job that runs via SQL Server Agent (Running SQL Server 2012 Enterprise). The last step of the job is to run an application located on a network share. Unfortunately I don't know the name ...
3
votes
2answers
491 views

Which of the following pieces of SQL is most efficient

I need to add the date part of GetDate() to the time part of a stored DateTime. Naively I thought I could do the following: declare @testTime DateTime = '2013-04-23 13:55:06' select cast(getdate() ...
2
votes
1answer
780 views

Connection to local SQL Server 2012 can be established from SSMS 2008 but not from SSMS 2012

I have two local SQL Server instances running on my local machine. The first is SQL Server 2008 R2 Enterprise Edition (named MSSQLSERVER) and the 2nd is SQL Server 2012 Business Intelligence Edition. ...
0
votes
0answers
41 views

SQL-Server 2012: Same query takes different Query Plans - but why?

Recently we had an issue with a query, which reached a timeout when executed the call through our web application. Using a monitoring tool I found the "bad query" and took it. I run it directly on the ...
0
votes
1answer
2k views

A transport-level error has occurred when receiving results from the server. Semaphore timeout

I've searched around and I'll the questions seem to be old and none seem to resolve my issue. I'm running SQL Server 2012 Enterprise and experiencing the following issue: Msg 121, Level 20, State ...
3
votes
3answers
119 views

Replication with FileStream

I need to setup database replication (for high availability) on a database that uses FileStream. This is on SQL Server 2012 Standard Edition, so Always On or Peer-to-Peer replication is not an option. ...
1
vote
1answer
21 views

SQL Server 2012 Install error “The instance selected for installation is already installed and clustered on computer…”

I am trying to setup a new environment for SQL Server 2012 AlwaysOn. I inadvertently used some SQL Server 2008 config files initially to do the installs but ran into too many problems. I un-installed ...
0
votes
1answer
39 views

Search NVARCHAR(MAX) string in other string

I want to find the index of a string in other string. I try to use CHARINDEX and PATINDEX but nothing worked because the search string is NVARCHAR(MAX) and these functions are limited to 8000 chars ...
2
votes
1answer
147 views

How to allow connections to SQL Server with 2 differents ip

I have a small issue here: I have a SQL Server instance 2012 (let's call it INSTANCE) on a cluster. I also have 2 network interfaces for this instance: SQLINSTANCE.my.metwork ...
2
votes
3answers
272 views

SQL Profiler - Insert values?

I setup an SQL profiler to run, but I am not seeing any values for updates/inserts. Is there a way to see them? All I see is stuff like this: insert into some_tbl(id, col1, col2, col3) values ( @P0 ...
2
votes
3answers
3k views

Simple model database transaction log full 'CHECKPOINT'

I have a SQL Server 2012 SP1 database which has a problem that the transaction log is full. It consists of a single data file and a single log file, both about 800MB. I had 5GB free disk space, and ...
3
votes
1answer
73 views

How do I login to SQL Server via group membership in another domain

When attempting to connect to SQL Server (2012), I get a login failed error message. The error log on the server reports: Logon Error: 18456, Severity: 14, State: 5. Logon Login failed ...
2
votes
1answer
30 views

SQL Insert Statement Persists Two Records When I Need Just One

I have altered it to include hardcoded variables when I pulled this chunk of code from the stored procedure. I ran it independent of the application with the same result. I need one insert statement ...
3
votes
2answers
97 views

Insert only deadlocks

We have an application inserting data into a table. Unfortunately, we are getting deadlocks and the deadlocks are coming from inserts only. We are seeing the inserts take key locks in a different ...
1
vote
1answer
27 views

Dividing data from one table to multiple storage

I have the following tables: [Table_A] [Table_A_Changes] The two tables are pretty large (more then 50GBs). The first one contains some data, and the second one records' changes.The database is in ...
0
votes
2answers
100 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. ...
2
votes
1answer
1k views

SQL Server Create Access Denied even after adding MSSQLSERVER user permissions

I am aware that SQL Server instances need write access not for my user account (which is in fact irrelevant to that service's context) but for the user account or security principal under which the ...
1
vote
3answers
62 views

Deploying SQL Server database changes from test to production server

I have a high availability production server that runs SQL Server. It is constantly being read/write to by hundreds of users. I have an exact copy of the database on a testing server and do all the ...
0
votes
0answers
31 views

How can I speed up MySQL Workbench in a SQL Server to MySQL conversion? [closed]

I am using MySQL Workbench to convert a 9GB SQL Server database (2012) to MySQL 5.6 on the same AWS Windows machine. (It's an r3.2x large, 8 vCPUn, 26 ECU, 61 GB RAM). It has been running for about ...
5
votes
1answer
91 views

.WRITE clause performance optimization

I have found that you can do high performance updates on varchar(max),nvarchar(max),varbinary(max) columns using the .WRITE clause(example here and here). Unfortunately, there is nothing mentioned ...
0
votes
2answers
48 views

Live Partial Table / column replication

I want to know if there is a way to achieve the following with SQL Server 2012 Enterprise Edition? I have Table A: on Server 1 with say 10 columns. Table A: | col1 | col2 | col3 | coln | col10 | ...
6
votes
1answer
103 views

Does tempDB disk perf matter if you have plenty of unused memory?

We have a SQL Server 2012 Enterprise setup with a large amount of RAM (256 GB), and at this time fairly small databases (about 17GB). Right now we are experiencing performance issues due to various ...
5
votes
0answers
66 views

SQL Server stuck in single_user with auto_update_statistics_async on

Books online states Before you set the database to SINGLE_USER, verify the AUTO_UPDATE_STATISTICS_ASYNC option is set to OFF. When set to ON, the background thread used to update statistics ...
1
vote
1answer
81 views

Multi-server administration - force poll on target fails, server needs to be registered locally without FQDN

I'm experimenting with multi=server administration on my SQL lab. Running SQL 2012 Enterprise SP1 on Windows 2008 R2 on a domain. I've created a domain account for my sql server agent user on each ...
0
votes
1answer
34 views

Using CREATE TYPE within Stored Procedure Call

I have a SQL Server 2012 database, and I generally use stored procedures that belong to a role with grant execute permission. I just created a stored procedure (sp1) that calls another stored ...
2
votes
0answers
36 views

SQL Server, Mount Points and File Groups design [on hold]

I am looking for some advice on a data warehouse we are building. Specifically around SQL Server, mount points and file groups. We have two design options for how mount points and files groups should ...
1
vote
1answer
702 views

SQL Server 2012: Security_error_ring_buffer_recorded: ImpersonateSecurityContext

a couple servers I manage are recording a lot of events in the system_health XE session. security_error_ring_buffer_recorded api_name ImpersonateSecurityContext calling_api_name ...
4
votes
2answers
3k views

Directory lookup failed when adding sample database to SQL Server 2012

I am trying to add the AdventureWorks sample database to SQL Server 2012, but I get an error message: Msg 5133, Level 16, State 1, Line 1 Directory lookup for the file "C:\Users\A\Documents\SQL ...
0
votes
1answer
20 views

[sys].[dm_db_index_usage_stats] returns more entries in some databases

I am using the following query to get some indexes usage statistics: SELECT DB.[name] ,OBJECT_NAME(IDX.[object_id]) AS [Table] ,IDX.[name] AS [Index] ,US.[user_seeks] ...
16
votes
1answer
5k views

Connection pools being reset with Error: 18056, Severity: 20, State: 46. & Perfmon Counters not showing

We are using SQL authentication & .net 4.0 Connection strings to connect to an Enterprise Edition 2012 SP1 SQL Server on a windows 2008r2 Enterprise Server. We use about 50 Servers split into 8 ...
7
votes
1answer
151 views

Detecting the locked table or row in SQL Server

I'm trying to understand/learn how to track down the details of a blocked session. So I created the following setup: create table foo (id integer not null primary key, some_data varchar(20)); ...
15
votes
6answers
7k views

What is a good, repeatable way to calculate MAXDOP on SQL Server?

When setting up a new SQL Server 2012, I use the following code to determine a good starting point for the MAXDOP setting: /* This will recommend a MAXDOP setting appropriate for your machine's ...
1
vote
1answer
52 views

The query processor could not produce a query plan

I'm getting this message: Msg 8624, Level 16, State 17, Line 1 Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support ...
0
votes
1answer
676 views

SSIS Package Validation Error when Executed From Windows Task Scheduler

I have deployed my SSIS package using the project deployment model to the SSIS catalog and experience a strange validation error when I try to execute the package. I believe this is due to a ...
1
vote
1answer
27 views

Viewing how much transaction log is used in Simple Recovery Model

We have a DW database in Simple Recovery Model. Every night, we load in data from different sources and run a few procs. I'd like to see how much the transaction log is actually used during this ...
4
votes
1answer
288 views

Full-text search with german umlauts

I created a table using German (Germany) as the Full-text language, in the settings I tried setting accent sensitivity to both sensitive and insensitive. I, however, get following odd results. The ...
0
votes
1answer
40 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
37 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
167 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
81 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
45 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
44 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
513 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
20 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
78 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
114 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 ...