SQL Server 2012 (major build version 11.00.xxxx). Please also tag sql-server.

learn more… | top users | synonyms (3)

0
votes
1answer
58 views

Why does adding a transactional replication publication change all the tables and columns to “not for replication”?

I'm trying to get replication set up - this is my first time ever doing it, so I'm probably making some rookie mistake here. Right now I'm just working in the dev environment. I've been following the ...
1
vote
1answer
172 views

SSIS Execute Sql Task not executed on server

I have a package that has an Execute Sql Task. When I run it in SSDT it works fine, the query is executed. When I deploy it on the server and run the package, the query is not executed and there is ...
-1
votes
1answer
149 views

Job successfully execute Stored Procedure but no results [closed]

I have stored procedure which is using dynamic query and inserts details of severs into table. If I execute stored procedure manually it works fine. but if try to execute the same with JOB, Job ...
14
votes
3answers
1k views

What is a deterministic method for evaluating a sensible buffer pool size?

I'm trying to come up with a sane way to understand if the max server memory (mb) setting is appropriate (either should be lower, or higher, or stay the way it is). I am aware that max server memory ...
1
vote
0answers
48 views

SQL Server database performance issue [closed]

There are two database on the same SQL Server 2012, with same tables, indexes and data as well, but for some reason one database response is 6 times slower then the other in most of the queries. ...
0
votes
1answer
33 views

One time database shrink catch-22 solution?

I am developing a plan for SQL Server 2012 EE to properly downsize and type (nchar to char types) some needlessly Unicode nvarchar(max) fields and would like to optimize the database size as part of ...
0
votes
0answers
48 views

SQL Server DBCC OUTPUTBUFFER: is the output buffer a circular buffer?

While viewing the results from a long-running SQL process with a large amount of output from "print" statements, it appears that the output buffer is a circular buffer. So midway through the process, ...
0
votes
1answer
104 views

Is it possible to know the remaining 'expiration of sql login password date' & ‘maximum password age’ through T-SQL

I would like to say that today incident whatever i have faced related to Microosft SQL Server 2012. I had logged in Microsoft SQL Server 2012 at starting working hour of office time ,but at the mid of ...
3
votes
1answer
606 views

The multi-part identifier “d.dept_name” could not be bound

I want to create a table with department name as column name and no. of employess for each department as its row. Here dept_name is coming from Dept table and count of emp.ID is coming from emp ...
2
votes
1answer
442 views

SQL Server Mirroring can't connect to mirror database

I am at my wits end with this. I am trying to set up mirroring between a development server and my local machine. The error that keeps coming up is: Msg 1418, Level 16, State 1, Line 1 The ...
0
votes
1answer
39 views

Need help with a query for a helpdesk application

I have a helpdesk application I'm modifying. I need to pull data into an ASP.Net DataGrid. In the problems table, there is a field for employeeID, which is the employee id of the person entering ...
2
votes
1answer
207 views

SQL Server 2012 Always On Setup with two nodes

I have AlwaysOn setup with two data nodes and one witness. I faced an issue where my PRIMARY Server restarted abruptly. Here're some issues I faced during this timeframe. Due to abrupt restart of ...
3
votes
1answer
97 views

Grant access on Secondary but not on primary in SQL Server logshipping [duplicate]

I have a strange situation wherein users need permission on log shipped DB on secondary server but not on primary. The problem is, the login has access on many other DBs on primary server apart from ...
0
votes
0answers
155 views

PREEMPTIVE_OS_FILEOPS when querying Filestream

I've have a table which contains a Filestream column, when I query the table as follows: SELECT ID, FileContent --, * FROM dbo.Files AS f WHERE FileContent IS NOT NULL AND ID = ...
4
votes
1answer
578 views

Scope_Identity() returns null after inserting first row in table

I have a stored procedure that is used for inserting values in two tables. The tables have a parent-child relationship i.e. the first table has an identity column, and the second table references the ...
3
votes
1answer
62 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 ...
5
votes
2answers
169 views

How can I efficiently downsize some Unicode fields?

We have a SQL Server 2012 Enterprise live transactional database that is now growing over 1G per month and is becoming a size problem for us. It is currently at 23G. Character type fields are all ...
2
votes
3answers
190 views

Excluding clustered key columns from non-clustered indexes definitions

As I've read the bookmark or the reference of the non-clustered index to the table clustered index is the clustered index key itself. On the SQL Saturday event I've attended, one of the lecturers said ...
0
votes
1answer
86 views

Exploring async DB IO - what is the cause for “The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement”?

Please, observe the following code: static async Task<Result> IOAsync(string duration) { using (var conn = new SqlConnection("server=localhost;database=abc;uid=xyz;pwd=123;Max Pool ...
1
vote
0answers
225 views

iSeries Linked-Server SQL 2012 performance issue

I have a seen a serious performance dive when moving from SQL2008R2 to SQL2012 on my linked server queries. I have set the linked server on the SQL2012 server as a Microsoft OLE DB Provider for ODBC ...
0
votes
2answers
46 views

Granting Select access to all tables within a specific Database in MS SQL

I have a server that has multiple databases that are contained within that same server/project. I am using MS SQL Server 2012. I have a special role set up with 3 users that are apart of that role. I ...
0
votes
0answers
22 views

Same query takes even 100 times more ran from IIS app vs Management Studio

Sometimes (after a new deploy but which doesn't have any db updates) a specific query takes even 100 times more time to be executed than standard (or Management Studio). A few details: The query is ...
13
votes
6answers
27k views

SQL Server 2012 slower than 2008

I migrated a large website and database from an older server (Windows 2008 / SQL Server 2008 / 16 GB RAM / 2 x 2.5 GHz Quad Core / SAS disks) to a newer, much better server (Windows 2008 R2 / SQL ...
4
votes
2answers
927 views

Are there problems with using SQL Server AlwaysOn Availability Groups with Windows 2008R2?

[Cross post from StackOverflow] Brent Ozar published this webcast (slides, video with free registration) entitled "Real-Life SQL Server 2012: AlwaysOn Lessons Learned", in which he repeatedly states, ...
5
votes
1answer
7k views

TFS2010 for SSMS 2012

SSMS 2012 does not work with VSS 6. We installed modern source control, TFS 2010 server. Then I Installed Team Foundation Server MSSCCI Provider 2010. However the only choice for Source control ...
1
vote
2answers
94 views

SQL Server compatibility level

I inherited a database server with SQL Server 2012 Enterprise Edition. All the databases (except for the system databases) are at the 90 compatibility level. How do I justify updating them to 110 ...
1
vote
1answer
34 views

Batch process to delete table from SQL Server backup files

I have a set of full backups from a same SQL Server database saved in different files. For example: 01.my-database.bak 02.my-database.bak 03.my-database.bak I want to delete a specific table from ...
0
votes
0answers
47 views

SQL Server 2012 - Query Governor Not Working Properly

Our production instance has been experiencing long running queries, in an attempt to keep them from running long, we decided to implement the Query Governor. I started by testing in our development ...
5
votes
2answers
299 views

Import XML files into SQL Server 2012

Every Friday I have to import a couple (sometimes more than 300) of XML files into 2 tables. The structure of one of the tables, R000000, looks like this: R00000010 | R00000020 | R00000030 | ...
1
vote
1answer
55 views

Using RowLock to enforce Once-And-Only-Once

I have a Web Service that can fire off a chain of events for an order. It does this when it gets a message telling it to (max of about 2 per second). The problem I have is that I have more than one ...
4
votes
2answers
5k views

SQL Server how to detect unused views and/or get usage stats

Is there a way to determine in SQL Server if a view is no longer being used? (without removing it) Ideally i would like to know usage for SQL Server 2000 as well as 2012 if that is possible. I am ...
2
votes
1answer
2k views

How to disable case sensitivity in SQL Server 2012?

I tried to update collation_name in sys.databases. I am trying to change 'SQL_Latin1_General_CP1_CS_AS' to 'SQL_Latin1_General_CP1_CI_AS' in order to disable case sensitivity in table. update d set ...
4
votes
2answers
198 views

Help with query

I have following data. I am trying to get the number of days the project stayed in a particular status. Example below of raw data, I need to be able to get the result shown. Can I get some ...
6
votes
2answers
166 views

sys.dm_sql_referenced_entities fails to provide used columns list when joining with temp table

I think I need some help as I run out of ideas. In my database I have a simple table like this: CREATE TABLE dbo.Invoices ( CashDiscounts MONEY, Cost MONEY ) GO and a stored ...
4
votes
1answer
886 views

DB Engine Stolen Server Memory is too high

I get error from System Center Operations Manager (SCOM). How to solve this error? SQL DB 2012 Engine Stolen Server Memory is too high. I run query and get this counters: ...
4
votes
3answers
1k views

Error 3203 restoring SQL Server backup: The data is invalid

I am trying to restore a .bak file (backup taken on SQL Server 2008 R2, compatibility level 100). I am restoring the backup on SQL Server 2012 edition. I get the below error. Unfortunately the ...
0
votes
0answers
48 views

FreeTds with 2 sql server instances

I have python scripts on a Linux machine that connect to Microsoft sql server to get data. The server was initially 2008 version. Now it has both 2008 and 2012. How can I point the tds to connect ...
0
votes
1answer
168 views

SQL Server 2012: Users cannot see database properties

I migrated a database from SQL Server 2008 to 2012 and also the users. Now the weird thing is that if the user connects to SSMS on the same server as the SQL Server engine, he can display database ...
0
votes
2answers
678 views

How to replicate data between two SQL Server 2012?

I have two SQL Server 2012 databases running on two different Windows Server instances, I want the Server A (DB1) to be in full sync with the new Server B (DB2). How can I make this connection ...
1
vote
2answers
92 views

How many deadlocks am i really getting? system health or deadlocks/sec?

I'm trying to look at deadlocks on a troublesome server, and when I look at the system_health xel file, I see 80 records for "xml_deadlock_report" in about 16 hours. I assume these are all different ...
0
votes
1answer
87 views

DENY VIEW DEFINITION TO PUBLIC

I have a SQL account with no permissions other than having the public role. I have run the following command to deny permissions to the system views: use master DENY VIEW ANY DEFINITION TO ...
0
votes
1answer
923 views

Change Tracking cleanup

Is there a way to know when cleanup of change tracking tables occurs? How to check the last occurrence of a cleanup process? BACKGROUND: I have Change Tracking on database with retention set to 1 ...
2
votes
2answers
947 views

AppDomain 2 (mssqlsystemresource.dbo[runtime].1) is marked for unload due to memory pressure message in SQL Server Log

From last two days I can see following in SQL Server errorlog. AppDomain 2 (mssqlsystemresource.dbo[runtime].1) unloaded. & AppDomain 2 (mssqlsystemresource.dbo[runtime].1) is marked for unload ...
1
vote
0answers
37 views

Date picker is dynamic in SSDT but not in SSRS

Running SQL Server 2012 SP1 and SSDT from same distribution. (VS2010) When I display a report in SSDT the date selector on a date parameter is dynamic or responsive. When you click on the date ...
2
votes
1answer
176 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 ...
1
vote
0answers
38 views

Disable the Task action button

How can I disable the "Tasks ->" button in SQL Server Management Studio? I need to prevent users scripting objects.
1
vote
2answers
31 views

Selecting Values That Differ From Section Average

I'm attempting to select data from a table that's already been made containing records of file size as taken every twelve hours. The table looks something like this: surrogate_id | partition_id | ...
2
votes
1answer
72 views

Generate Database Creation Script Within A Stored Procedure

I'm looking to automate a wipe of our test environment to bring it up to be in-line with production at the end of every sprint. As it stands this is currently being completed by the test enviroment ...
5
votes
2answers
3k views

Transaction log is full due to 'CHECKPOINT' for DB in simple recovery model

For one of our DB's on SQL server 2012 RTM, We could not perform almost any troubleshooting step as the error says: " Transaction log is full due to 'CHECKPOINT" This being a dev database, its ...
1
vote
1answer
52 views

storing as smallint, querying as int

A multi-billion-row fact table in our database has 10 measures stored as int columns. The value ranges for some of these columns won't ever be above the +/-32K range of a smallint. To save I/O, we're ...