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

learn more… | top users | synonyms (3)

2
votes
3answers
174 views

How can I configure maximum number of concurrent connections WITHOUT SSMS?

I'm having an issue in a production environment and I was trying to simulate it in my local SQL Server Express instance. I used SSMS to change the "maximum number of concurrent connections" from "0" ...
1
vote
1answer
53 views

SQL Server 2012 AlwaysOn Availability Group active/passive

I have one Primary and one secondary replica on WSFC and AAG configuration. Both nodes are physical machines and sync with automatic fail over. The secondary replica is readable and we run ...
2
votes
1answer
66 views

Set a filegroup to readonly

I have a set of dimensions which are updated only during specific times. I have moved these tables to a specific filegroup named Dimensions. I wanna keep this filegroup as readonly. When ETL runs, it ...
0
votes
2answers
57 views

Notify when database is accessed in any manner

I'm using SQL Server 2012. Is there a way to receive a notification (email/log etc..) if a database or table in a database is touched in anyway (e.g. CRUD via Stored Procs or tables opened via ...
1
vote
0answers
74 views

A significant part of SQL Server process memory has been paged out

Around 7:30pm every evening we receive the following message and the server experiences an outage of 2 minutes. A significant part of sql server process memory has been paged out. This may result ...
3
votes
1answer
36 views

Separate differential backup from one restored baseline

I work on a team that customises software, part of this customisation is stored as records in a database, part is customisations to the schema itself and there are often some specific records in the ...
1
vote
1answer
21 views

Checks to be done, before/after changing the windows login password? [duplicate]

Here we have a scenario where a Service account , added under security as sysadmins for windows login, going to have its password change as per windows policy. Since windows team, server admins are ...
0
votes
1answer
34 views

Primary server 'XYZ' can not write to shared drive during availability group configuration

I am in a process of adding databases to availability group. In one of the steps it was asking "data synchronization prefferences" as shown below I have put the mapped drive location path, which ...
0
votes
1answer
14 views

Catalog of LinkedServer2 from Server1 shows databases on Server1

I'm on Server1 and set up a linked server to LinkedServer2, but the catalog shows the databases on Server1! I am sure I've done something bone-headed or am overlooking something horrendously obvious, ...
0
votes
1answer
16 views

Select records that fit criteria in another record

I have a procedure that I want to return only when a second procedure was selected. Id Name Procedure 1 Jim Smith Procedure1 2 Jim Smith Procedure2 I would like the first record ...
0
votes
1answer
39 views

I do not see SQL Server instance name under roles section of Fail over cluster manager screen! How to setup?

I have created 2 Virtual machines in azure and configured Windows Cluster using fail over feature. I have enabled the "AlwaysOn" feature in SQL Server Configuration Manager. But I do not anything ...
4
votes
1answer
60 views

How to create a 'keywords' table from a column's values

I have a table with 8 million+ rows in it. It stores jobs and their characteristics. There is a column in it that holds job titles. I am planning to create a keyword table based on the job titles from ...
8
votes
2answers
175 views

Backing up multiple databases to the same point in time

Usually when we start the backup we do not allow changes to commit or database will be not be accessible. I mean database will be in single user mode but I want to start the backup and release the db ...
1
vote
1answer
118 views

Shared network location in Availability Groups configuration

I am configuring Availability Groups feature in azure virtual machines nodes. In the below screen wizard, it's asking me for shared location. where and how I need to create this shared location? Do ...
1
vote
1answer
106 views

Restore accidentally truncated table

I truncated the wrong table, but I have a backup made an hour before the incident. I am trying to restore but at 30% I get the error: Restore of database 'msdb1740' failed. (Microsoft.SqlServer....
2
votes
1answer
52 views

Best Practice : Schema design for Large Number of rows with few columns

I have about a data set that each entry is about 750,000 rows under it with each row having four fields. Each entry is in its' own CSV file currently and I want to get it into a database. Currently I ...
7
votes
4answers
480 views

How to get response from stored procedure before it finishes?

I need to return partial result (as simple select) from a Stored procedure before it is finished. Is it possible to do that? If yes, how to do that? If not, any workaround? EDIT: I have several ...
1
vote
1answer
53 views

Packaging SQL Server Express 2012 install won't install due to user rights

Is there a way force the above permission window to elevate the user permissions?
0
votes
1answer
44 views

Flagging duplicates

I have a huge table with a couple of duplicates: I want to add a new column that shows some value when duplicates occur, something like: case when fist.firstname = last.firstname then 'yes' else '...
0
votes
2answers
26 views

Source of network_name for distributor

So, I have a really weird case. Was doing a migration from sql server 2005 to 2012. Built the server, and at the last minute we found that the server was called abc/xyz. We just wanted abc, so the DBA ...
0
votes
0answers
32 views

Is it possible, when using LPIM, for one database to allocate the majority of the memory?

Windows Server 2012 R2 SQL Server 2012 Enterprise (maximum server memory: 200,000MB) 224GB memory LPIM enabled physical_memory_in_use_kb 204703788 large_page_allocations_kb 1128448 ...
1
vote
0answers
28 views

Joining tables and seeing Duplicate Records

I Use the query below to produce values from a table (BSCV1), based on results from another table (MshiftV1) using an inner Join on names and timestamps. I call the output "Correlation". WITH ...
0
votes
1answer
19 views

How do I allow users to add members to a specific database role?

I want to GRANT permissions to a new database role so that defined users can add and remove members from that role WITHOUT granting ALTER ANY ROLE permissions. Here's how my query runs/dies: CREATE ...
5
votes
1answer
63 views

T-SQL (SQL Server 2012) Update based on lookup table

I have the following tables related to this question: CREATE TABLE tblTitan( titanId int IDENTITY (15483,1) PRIMARY KEY, userId int UNIQUE NOT NULL, titanName varchar(15) NOT NULL, titanExperience ...
0
votes
1answer
121 views

SQL Server BACKUP WITH FORMAT

When doing a SQL Server database backup using the T-SQL BACKUP statement, does WITH FORMAT only wipe out the specified Media Set or does it wipe out all Media Sets 'associated' with the database? ...
4
votes
0answers
51 views

Large Variation in Bulk Insert time

So I have a simple Bulk Insert process to take data from our staging table and move it into our datamart. The process is a simple data flow task with default settings for "Rows per batch" and the ...
0
votes
2answers
97 views

Linked Server Error on SQL Agent Job

I get the below error from a SQL Server Agent Job. However, if I run the query in the job manually it works fine. Why is this? Is it just SQL Agent that requires MSDTC? I don't believe it is ...
0
votes
0answers
48 views

Importing Legacy Files directly into SQL Server database

I have a bunch of flat files, mostly Excel files, which I am trying to import directly into a SQL Server 2012 database. Is there a way to do this? I assume first the columns in the Excel files must ...
1
vote
0answers
45 views

Backup fails unless compression is enabled

I'm trying to back up a DB to a network share. The backup fails every time with the same error: BackupIoRequest::ReportIoError: write failure on backup device '\\share_name\Backups\filename.bak'. ...
1
vote
1answer
86 views

SSMS connects, Linked server fails

There's a SQL Server 2012 machine which I have login and password. It's a SQL Server login, not an AD one. I'm able to login using SSMS. But when I configure a linked server in my SQL Server I get ...
2
votes
0answers
50 views

where to add a column with low cardinality, decimal type into an index?

I got a question regarding the best way to put a bad column for an index in an index, so that I can satisfy my query below, and similar others that follow the same pattern. on the query below, all ...
0
votes
0answers
110 views

SQL Server could not retrieve the list of publications for 'XYZ'

First of all please note the following carefully: I have a source database named S_DB on one SQL Server hosted on a machine named S_SRV, on a domain named S_DOM. On a different domain named D_DOM, ...
0
votes
1answer
52 views

SQL Server Backup - move to new server - Media Failure

I've got a server in the UK with SQL Server 2008. It's very locked down firewall-wise. We want a local duplicate of the DB to test and build a new report. Backing up the relevant DB, and then ...
1
vote
0answers
16 views

I only have the original files of database but no .bak file, how do I restore the database? [duplicate]

We were upgrading a server from SQL Server 2012 to 2014 at work and it was giving us trouble so I passed it off to someone else who, when backing up the SQL Server database, didn't create a .bak file. ...
1
vote
0answers
58 views

Multiple conditional counts in the select clause - what's the best way?

(Bit of a long one, sorry) To set the scene: N.b. This is on SQL SERVER 2012 We have a table [CardLog] in an access control system database. Every time an ID card is printed, a row is added to this ...
1
vote
2answers
48 views

Find times when table is least frequently used

I would like to analyse performance of one of the big tables in the database. There are only two types of operations on it. Inserts and reads. Once data is entered it is never updated. I need to ...
4
votes
2answers
49 views

A lot of ad-hoc queries impact on server

We have a third party application which generates a lot of ad-hoc statements (our server has 16GB of memory and there are 140000 ad-hoc queries present in the cache).I've enabled 'Optimize for Ad-hoc ...
1
vote
1answer
270 views

Cannot install database engine services, replication and SQL writer

I am trying to install SQL Server 2012 Express, but I get this error (I try to uninstall and delete registry key, try to change account for database engine to NT Authority\System, but reinstall still ...
0
votes
1answer
74 views

Restore Database Wizard not launching

I'm using SQL Server Management Studio 2012 and trying to use the 'Restore' functionality to copy an existing database into a new one. This is something I've done a dozen times before, but I'm ...
3
votes
2answers
48 views

Can I tell SQL Server not to place data in the buffer cache?

One of the servers I support has an ETL job that runs every morning. This isn't an SSIS package, just a series of stored procedures executed via SQL Server Agent. The job takes several hours to run, ...
0
votes
0answers
21 views

Diagnosing SSBDIAGNOSE?

When trying to connect SSBDIAGNOSE from a command shell to a named instance on the same server(to which my Windows Login has SA), I receive an error e.g. SSBDIAGNOSE CONFIGURATION FROM SERVICE //FOO/...
0
votes
1answer
24 views

Create a job that sets Auto Update Statistics on

I am using SQL Server 2012. The vendor wants Auto Update Statistics set to false, but my boss wants it set to true. If I set it to true, after a while it goes back to false by itself. I think the ...
1
vote
1answer
60 views

Forcing correct execution plan when passing a table UDT to a table function

I have a scalar function that returns a big XML, created over a bunch of invoices. The exact list of invoices to feed to the function can be calculated using several different ways, but the function ...
1
vote
1answer
51 views

Merge Two Group By Rows SQL

How do I merge two rows returned by a Group By statement: Select SiteId, SiteName, EventCount = Count(*) From #MyLogs GROUP BY EventCode, SiteId, ...
1
vote
3answers
45 views

Which one to consider for upgrade SQL Server 2008 vs SQL Server 2014 or Compatibility level 100 vs 110

I need to upgrade the SQL Server 2008 to SQL Server 2014 . SQL Server 2008 is currently running on compatibility level 100. I need to upgrade to SQL Server 2014 with compatibility level 100 this year ...
2
votes
1answer
135 views

What is the role of eager writer?

What is the role of eager writer? How this process works internally in SQL server? What is the major difference between eager writer and lazy writer/checkpoint? My understanding here is, that both ...
3
votes
0answers
75 views

SQL Server 2012; Incorrect PLE buffer manager value for NUMA server

We are receiving PLE alerts from SCOM for several instances. These instances are on hardware servers, and use NUMA nodes. SQL Server 2012 SP1 CU7 Enterprise Edition is installed. Memory is fixed and ...
0
votes
0answers
119 views

Set database offline with rollback immediate takes an hour to complete

Every night we take our production database offline, detach it, and then re-create it to sever any connections as the start of our backup procedures. The first command is: USE master ALTER DATABASE ...
1
vote
2answers
65 views

SOS_SCHEDULER_YIELD - Prevent a Proc from giving up the Processor Time

I've got a process which about once a month at times unrelated (or as far as we can tell) goes into SOS_SCHEDULER_YIELD State. This process blocks our main data entry pipeline and brings the entire ...
0
votes
1answer
43 views

Using Partial String match from one query results in where clause for another SQL Server 2012

I need results field of query1 to drive I have one query that produces a table of several columns, namely "Time_stamp", "Value", and "Name" from two existing tables. Select TOP 20 MshiftV1....