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

learn more… | top users | synonyms (3)

2
votes
1answer
758 views

SQL Server: how to troubleshoot login timeout expired error

I have a production SQL Server 2012 (SP1) running on Windows Server 2008 R2 Enterprise edition. A lot of time while connecting to this server from a remote host I to face connection timed out error. ...
0
votes
1answer
61 views

Linking between SQL Server and Excel [closed]

I want to dump Excel data in SQL Server database. What is the best/easiest way to do this? I have SQL Server 2012 Management Studio. I have tried many techniques but failed miserably, there is no ...
1
vote
1answer
187 views

Replication Configuration

I had a SQL Server 2008 Express edition as a Default instance and I am having SQL Server 2012 Evolution and SQL Server 2014 Evolution are my named instances. When I was trying to configure ...
0
votes
1answer
372 views

Reporting Services service restart fixes slow reports

SQL 2012, the reports are displayed on a WEB page or rendered to PDF I have an ongoing problem with reports suddenly slowing down. The only way to "fix" this problem is to restart the service. This ...
3
votes
2answers
206 views

Adding 4th table to join jumps processing time from seconds to over 20 minutes

I am trying to join a total of 4 tables together. When I only join 3 of the tables together I get a result set of about 220,000 records in about 2 seconds, but as soon as I throw the 4th table in, the ...
2
votes
1answer
2k 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 ...
1
vote
0answers
168 views

Problem to understand a 70-462 exam question

This is the question: You administer a Microsoft SQL Server 2012 instance that contains a financial database hosted on a storage area network (SAN). The financial database has the following ...
3
votes
1answer
37 views

Replication for Mirrored server

I have 3 SQL servers running SQL Server 2012 Standard Edition, called A , B and C. Server B is a mirror of server A. There is transactional replication between server A and Server C. How can I ...
3
votes
2answers
64 views

Strange Database Mirroring Problem

I am noticing a strange problem with DB mirroring on SQL Server 2012 (standard edition). The mirroring is set up, and successfully established, and working. There is no witness. Once principal is ...
2
votes
1answer
221 views

Last user update for a table

Since my server was started one month back, I am getting 2015-07-31 as the value of last_user_update for a table. Does that mean my table’s data hasn't been modified (inserted, updated, deleted) ...
0
votes
1answer
31 views

Accessing a Linked server [closed]

I am fairly new to the whole DBA scene. With that said, i was able to get an ODBC connection established within Microsoft SQL Server 2012 to be able to access a database for a library. Now what I am ...
0
votes
0answers
23 views

How do I keep all roles, users and permission on a database being dropped then restored with a different database with different permissions [duplicate]

The DBA at my job every week drops my test database and restores it with a copy of the live environment. The permissions on the live database are different then the test database(and need to be). ...
3
votes
1answer
84 views

Error: “The certificate cannot be dropped because one or more entities are either signed or encrypted using it.”

I have a certificate I would like to remove from the database. If I issue the command DROP CERTIFICATE <FooCert> I get the error The certificate cannot be dropped because one or more ...
1
vote
1answer
141 views

Copy Data between two databases

I have the following situation. An application writes logs into SQL Server 2012 Standard edition database. The incoming data are too big to leave in the operational DB because the application also ...
1
vote
0answers
30 views

Is it possible to query the avg time in ms per read/write

I was wondering if it was possible to obtain the avg block read and avg block write in ms with a query in SQL Server. If SQL Server knows how many IO requests are made for a given wait type and how ...
3
votes
1answer
37 views

SQL Server Replication

We had an issue with replication, where a large (7.5 million row) update was done on a 33 million row table. Replication converted that to 7.5 million individual update statements. When my alerting ...
17
votes
5answers
11k views

SQL Server Agent Jobs and Availability Groups

I'm looking for best practice in dealing with scheduled SQL Server Agent jobs in SQL Server 2012 availability groups. Maybe I missed something, however at the current state I feel that SQL Server ...
0
votes
0answers
32 views

Failed to flush the commit table to disk

We recently had this error come up for one our databases https://support.microsoft.com/en-ca/kb/2603910 In order to fix it we patched the server to the latest SP and Security Update. Current version ...
0
votes
1answer
39 views

SQL Server 2012 SP1 to SP3 with Mirror

I have a Production server and DR server where the databases are mirrored, both on SQL Server 2012 SP1. I want to apply SP3. I can do this on a weekend and I don't want a failover. Should these be ...
1
vote
2answers
72 views

SQL Server 2012 cannot use file server for log shipping

I have a problem with log shipping in SQL Server 2012. I have two servers for log shipping, let's say server A and server B. For the first experiment, when I use a shared folder from my computer ...
1
vote
1answer
79 views

Tables not displaying after creating database by script. Do I need to insert?

I successfully created (scripted) a database in SQL Server 2012. My problem is that while the database itself is listed in the object explorer, the tables from the database are not. The database I ...
1
vote
1answer
33 views

Notify on SQL trace event starting?

I was wondering if there was a method of receiving some sort of notification when a SQL trace begins - be it e-mail or some other method? The circumstances of needing this we currently have a ...
6
votes
1answer
177 views

Create a function to generate a column value in a specific format

I am new to databases or, in fact, programming. I want to create a function or maybe a stored procedure (if it works) to insert/create default values for a column of the users table. In this table, ...
1
vote
1answer
20 views

Changing Key (PK, FK) properties in DROP/Add column statements

I want to change a table by adding a column. So far nothing to see here, BUT I would like to make this column part of a composite key, i.e., I now have a layout table_name( Field_1 datatype PK, ...
2
votes
1answer
126 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
3answers
268 views

9 digit zip codes are reporting LEN of 12

I am attempting to resolve some difficulties in getting zip codes to display properly. The original spreadsheet has zip codes of mixed 5 and 9 digit formats. After the import process, these 9 digit ...
1
vote
1answer
55 views

WSFC Quorum query

I have an three node AlwaysOn AG setup, running on SQL Server 2012 SP3 in Windows Server 2012 R2. Node 1 and Node 2 are in the same physical location. Node 2 is the secondary replica. Third node acts ...
1
vote
1answer
36 views

Copying Partitioned table data to another table on different SQL Server

We have a partition table on Production environment with 2338117620 rows and 206 partitions. Now we have to copy only last 2 year data in Test environment. But the problem is that , Import Export ...
3
votes
2answers
175 views

Dropping PLE on query

In company we are working in project on very big database. It uses 100GB RAM. What's weird before first running a query PLE is 11k~, after running it drops to about 70, anyway when after 15 mins I ...
1
vote
1answer
130 views

SQL Server 2012 Express Service Pack 2 - installation error 0x84B40001

I'm trying to install SQL Server 2012 Express Service Pack 2 through command line: SQLEXPR_x86_ENU.exe /ACTION=Install /HIDECONSOLE /FEATURES=SQL /INSTANCENAME=SQLEXPRESS /SECURITYMODE=SQL /SAPWD="...
4
votes
1answer
34 views

MSDTC and its relation to SQL Server

So I'm doing some research on MSDTC and its role it does or does not play in various types of calls within SQL Server, and it got me thinking on the following questions: Are there any 3rd party ...
17
votes
1answer
103 views

Sequence - NO CACHE vs CACHE 1

Is there any difference between a SEQUENCE declared using NO CACHE and one declared using CACHE 1 in SQL Server 2012+? Sequence #1: CREATE SEQUENCE dbo.MySeqCache1 AS INT START WITH 1 ...
0
votes
0answers
51 views

Running internal.cleanup_server_retention_window on SSISDB causes t-log to fill up

I have a SQL Agent job that runs internal.cleanup_server_retention_window on my SSISDB to keep it's size in check. The retention period is one day and it's scheduled to run each day. The problem is ...
2
votes
1answer
1k views

SQLNCLI10.x vs 11.x when connecting SSIS 2008R2 to a SQL Server 2012 database

Starting from the question and working backwards. My question: is it OK to use SQLNCLI10.1 as a provider for SSIS 2008 R2 to connect to SQL Server 2012 database(s)? I have a SSIS box running SQL ...
3
votes
1answer
187 views

SQLCMD stuck on “set textsize 4096”

I am using SQL Data Compare to generate a script that updates data in a QA database (SQL Server 2012). The script is around 500mb and I added a GO every 100 lines. When I start the script with: ...
2
votes
0answers
52 views

Procedure runs slower over time; fixed by cache clear or reboot

We are experiencing a strange issue where an application which was fixed by creating missing index requests, updating stale stats, and removing lookups and other scans, was running fine once fixed, ...
2
votes
1answer
44 views

Execute Stored Procedure with Account that has only read access

I created a stored procedure that has TRUNCATE and INSERT statements in it that I use for an SSRS report. I typically only use an account that is a member of db_datareader for SSRS reports, however ...
1
vote
2answers
217 views

Error when restoring SQL Server 2008 R2 backup on 2012

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 ...
1
vote
1answer
37 views

Best solution to keep a big table synched in 2 DB

I manage a few tables with more than 1 billion records. Daily, their ETLs run, reading data from flat files and inserting a few thousand records on each of them. Now I need to keep these same tables ...
6
votes
1answer
146 views

How do I move or redistribute FILESTREAM files between containers?

We have a FILESTREAM container with a few million files, and we believe it's the cause of our performance issues we're experiencing (abundant timeouts). According to this blog about FILESTREAM best ...
1
vote
1answer
85 views

Why is it faster to do four simple selects instead of one select with left joins?

I need to find a single value from a table A containing three foreign keys to two other tables B and C. For the sake of experiment, I tested two ways to query the value: Multiple queries: declare @...
2
votes
2answers
569 views

Registered Server window does not show Database Engine or Local Server Groups

I am running SQL Server Management Studio 2012 on a Windows 7 machine. After a failed attempt to import my registred servers from SSMS 2008, the icons for Database Engine and Local Server Groups are ...
1
vote
1answer
647 views

Report Builder cannot publish to report server

This is currently in a cloud lab environment. We're not allowed to join any AD domains. We have a linux server (RHEL 6) running MySQL 5.3 and a Windows SQL Server 2012 on Win 2k8 R2. Our laptop is ...
2
votes
1answer
184 views

SQL Server 2012 - Dropping Snapshots takes hours

We recently did a SQL Server upgrade from 2005 to 2012. We have a nightly job that drops a snapshot of an active database. The snapshots gets created again later in the day. Before upgrading, in SQL ...
1
vote
1answer
44 views

Log shipping secondaries in STANDBY stuck in 'Restoring…' - SQL Server 2012 SP3

Yesterday, I configured Log shipping between 2 SQL Server 2012 SP3 servers for a total of 13 databases. Some specifics: I'm using 'Azure files' to transfer the log files (CIFS accessible BLOB ...
5
votes
2answers
79 views

QUERY - join two tables based on date and filter results

My apologies for the cryptic title. I guess my inability to condense my question into a title is indicative of my inability to come up with an answer to the following: I have data in two tables (MS ...
4
votes
2answers
94 views

Why is .bak file size increasing/doubling with each consecutive backup on SQL Server?

I'm running a simple DB on SQL Server 2012 Express. Just today, when I backup the database, the .bak file size doubles to what it was from the previous backup just minutes before. I have done ...
0
votes
1answer
243 views

Breaking up long running query into batches runs fine for a while and then produces fatal error

I'm using a variation of this post which details using "careful batching" to delete records in batches from a table that contains 38MM records. The script below runs for a while and shows results ...
1
vote
1answer
3k 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 ...
0
votes
1answer
338 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 ...