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

learn more… | top users | synonyms (3)

0
votes
0answers
4 views

Issue with Linked Server query

I have a job which fetches data from an Oracle 12c database and inserts into a SQL Server 2012 database, via a linked server from the SQL side. It's a simple Select * statement and just pulls in any ...
0
votes
1answer
1k views

DB2 Linked Server on SQL Server 2012 - Grant Access to Users

I have a linked server on SQL Server 2012 instance pointing to a DB2 database and I have Sys Admin access to that instance. I am unable to test connection to that DB2OLEDB database as I get below ...
1
vote
2answers
25 views

Execute stored procedure remotely using Linked Server

We have 3 MSSQL 2012 instances, 2 of them we're not db_owner. Some of our SPs use DMV and sys tables and SPs that only work when executed locally. I'd like to centralize the execution of these (our) ...
0
votes
0answers
93 views

Cannot Update a System Collection Set

I'm trying to tweak the "Server Activity" Data Collection set as outlined in this blog post (I wrote the post, btw. Sorry--it's kinda long). It is working in SQL 2008 R2 and also in SQL 2014. However,...
4
votes
1answer
175 views

Scenario of huge SQL Server Database backup

I use SQL Server and have a huge database with large compressed backup size (about 250 GB). The backup scenario of this database is: Create full backup at the first day of each month. Create ...
1
vote
2answers
162 views

Get first and last record for each date and calculate their difference

I need to calculate the DATEDIFF in seconds between the First record for each date with EventCode = 1 and the last record for each date with EventCode = 2. I have posted a sample data set for 2 days ...
0
votes
0answers
15 views

Finding records only when all ids present in a group

Having these two tables id | val TableA -------- 1 | A 2 | B 3 | A 4 | B 5 | A 6 | C 7 | D id_A | data TableB ----------- 1 | a 2 | b 3 | c 5 | d 7 | e First I ...
0
votes
1answer
40 views

Update empty values with null

I create a Job that runs the query below for all databases in a server in order to update empty values with null in all columns for all tables. The problem I'm facing is this query literally killed ...
2
votes
2answers
19 views

Concurrent backups (full and transaction) and testing recovery model

My intent is to test my recovery model and setup log shipping to replicate a database on another server. I have a database called AdventureWorks on a primary sql server. Presently SQL Backup performs ...
5
votes
1answer
301 views

Move content between filestream containers

I have a server running SQL Server 2012 with Multiple Filestream containers on a single table. I need to split one of the existing filestream containers into two parts by creating a new filestream ...
9
votes
1answer
431 views

Update queries slower after enabling SQL Server Full-Text Index

I have an asp.net website with many insert, update, and delete queries running against my database. A few days ago I create a Full-Text Index on two columns of one of tables. After that I realized ...
1
vote
2answers
59 views

SQL Server 2012 database in suspect mode after upgrade from Developer to Standard Edition

SQL Server database is in suspect mode after an upgrade from developer to standard edition 2012 version. In the log file there are two errors: 933 and error 905. Following error occurred when we tried ...
7
votes
2answers
4k views

AlwaysOn Availability Group Automatic Failover does not work

Playing with AG setup I have the WSFC up and configured with two nodes in one availability group called DevClusterOnline. Both nodes (DEV-AWEB5 primary, DEV-AWEB6 secondary) are running Windows Server ...
16
votes
1answer
16k views

Why does SQL Server 2012 Express use 9.5GB of RAM on my server?

I am building an application in which I plan to embed SQL Server 2012 Express as the primary datastore. When testing on my development machine (Win7-32 with 3GB RAM), I never observed the sqlservr....
1
vote
0answers
56 views

Logical read when use Offset in SQL

When I execute this script SET STATISTICS IO ON SELECT *, ROW_NUMBER() OVER (ORDER BY [Date] DESC) AS [ROW_NO] FROM vwTblTest WHERE ([Factor] >= 139501 AND [Factor] < ...
0
votes
1answer
319 views

delete WSFC 2012 cluster role/group fails

PS C:\Windows\system32> get-cluster Name ---- sql2012poc_cl1 PS C:\Windows\system32> get-clustergroup Name OwnerNode State ---...
-1
votes
1answer
36 views
1
vote
1answer
49 views

Matching empty string is not working

I have the following query SELECT Ice.IceId, Ice.Code, Box.Ice, LEN(Box.Ice) AS IceCharLength, DATALENGTH(Box.Ice) AS DataLength, Box.Ice, ASCII(Box.Ice) AS ASCII, CAST(Box.ice AS ...
0
votes
2answers
83 views

Tiny query used to be sub-second speed, now takes 60+ seconds

Ok, I've got a monitoring process that runs the following query to make sure the databases are backing up regularly. This process used to take 1-2 seconds for connection, query execution, and ...
0
votes
0answers
17 views

Querying Table from another Database using Synonyms

I have two databases(A,B). on database "A" i created synonyms CREATE SYNONYM [dbo].[Names] FOR [server1].[B].[dbo].[Names] I should now be able to query the table "Names" from within database "A" ...
0
votes
1answer
24 views

Call to sysmail_delete_mailitems_sp keeps deadlocking

I run SQL Server 2012. I have a maintenance job that runs every night. At the end of the maintenance, I do some cleanup and call this: Begin try Exec msdb.dbo.sysmail_delete_log_sp @logged_before = '...
1
vote
1answer
160 views

Indexed view doesn't exist on the subscriber

I am configuring transactional replication in SQL Server. The subscription is configured as push from 2008R2 publisher (distributor is the same server) to 2012 subscriber. The object I want to ...
3
votes
0answers
35 views

Concurrent Merge Issues

A (simplified) model of my application has several processes dumping data into the table below: CREATE TABLE [dbo].[InputData] ( [InputId] [int] NOT NULL, [Dts] [datetime] NOT NULL, [...
1
vote
1answer
232 views

SQL Server Management Studio 2012 Application Cannot Start

I need someone's help. I'm trying to install SQL Server Management Studio on my Laptop Operating System: Windows 7 Service Pack 1 But I got an error message saying: The application cannot start. ...
0
votes
0answers
9 views

Multi Purpose Witness/Master Data Services SQL Server

I currently have a Master Data Services SQL Server instance that I use to execute SSIS packages, moving and consolidating data from a few OLTP servers to a Data Warehouse. It currently just runs its ...
7
votes
1answer
235 views

Will a Full-Text Catalog with Track changes: AUTO automatically update if Change Tracking for that table is not enabled?

I have this database table that is suppose to keep the full-text index up-to-date. However I am not seeing it happening at all (no error in the log because the last log I see was when I triggered it ...
0
votes
1answer
29 views

Select 1 Row Per Day For Each Database

I have a table with over 60 million rows. Snapshots taken at multiple times a day for all databases across all instances. I am trying to reduce the rows in my select by only returning 1 snapshot per ...
3
votes
2answers
32 views

ALTER TABLE SWITCH

I have two columns that I want to convert from computed to non computed. I have the code for that. However, it was suggested to me to use the ALTER TABLE SWITCH. I believe the individual who ...
0
votes
1answer
176 views

How to specify localhost for SSIS package source server?

I have a job running on SQL Server 2012, where one of the steps is of type "SQL Server Integration Services Package". For the "Package source" I choose SSIS Catalog. For the "Server", if I type in the ...
3
votes
1answer
117 views

Trigger/Event that fires when a Transaction finishes

I have a query that pulls from about 15 different tables. I am looking to materialize this into a table that stores it in xml/json. (To improve performance.) The problem I have is that these tables ...
0
votes
0answers
22 views

SQL Server 2012 sp3 error and SNAC

It is a client server with only the Management Tools basic/complete and Client Tools connectivity. While it appears that some the of SP3 took based on items in the Add/Remove Programs having a .6020 ...
5
votes
1answer
5k views

AlwaysOn Availability Groups go to Resolving status

We have a two-node cluster set up running SQL Server 2012 on Windows Server 2012 R2. The base cluster consists of only those two nodes. The quorum is set up as node + disk majority, with a shared ...
3
votes
2answers
2k views

Removing secondary replica from SQL Availability Group causes large log file

Due to an unforeseen hardware error, I had to take our secondary replicas down for maintenance. This was really due to a storage issue and, it was decided at a higher level, to purchase a new storage ...
0
votes
0answers
6 views

How to move SSAS tabular instance databases?

We have a SQL Server 2012 SSAS tabular instance in our environment that is sitting in domain1. We need to move these SSAS databases in a different SQL server 2012 that is on domain2 which has no trust ...
2
votes
2answers
3k 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 SQLINSTANCE) on a cluster. I also have 2 network interfaces for this instance: - SQLINSTANCE.my.network - SQLINSTANCE.mgt....
5
votes
1answer
223 views

ORDER BY and comparison of mixed strings of letters and numbers

We need to do some reporting on values that are usually mixed strings of numbers and letters that need to be sorted 'naturally'. Things like, e.g. "P7B18" or "P12B3". @The strings will mostly be ...
0
votes
0answers
78 views

SQL query runs fast on local computers but slow on production server

I am running a fairly basic query on my local development machine which runs almost instantly. However on the server its taking around 3-4 seconds to return results. I have ran Client Statistics on ...
1
vote
1answer
139 views

Database Restore Not Working

I am trying to restore an empty MS SQL database 'Rental' to a new updated version of it. The backup of the database (named Rental_2) was taken from the 2012 version of SQL Server and I am trying to ...
1
vote
1answer
156 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
1answer
1k views

Error when trying to deploy SSIS package

I am trying to deploy my 2012 SSIS project to the Integration Services catalog on the SSIS server (also 2012). I am getting the error below. I checked that there is plenty of space in SSISDB and ...
1
vote
1answer
33 views

First and last records in a string of linked rows

I have been handed an (ancient) database in SQLServer format containing rental records. These records can be modified by the customer while the rental is still in flight, if they want the drill for ...
7
votes
1answer
68 views

SSIS proxy/credentials not working from within SQL Agent job step

I have been looking around and found similar questions but nothing specific to what I am having trouble with. Problem: I cannot get the SSIS proxy and SQL credentials configured correctly to ...
3
votes
1answer
115 views

SQL, SQLCLR objects & effective memory utilization

We've recently converted our ERP system from IBM Universe to SQL Server. Application performance is generally tolerable but occasionally degrades to terrible. We're running the database on Win ...
1
vote
2answers
31 views

Maximum Attachment Size in database mail

Good Afternoon, I am trying to send an attachment via database mail. declare @mail_recipients VARCHAR(4000) = 'abc@123.com' , @mail_subject VARCHAR(500) = 'subject' , ...
0
votes
2answers
51 views

How do I script SQL Server 2012 replication to turn it off during a deployment and then turn it back on after the deployment?

The scenario that I'm in is: We have a database that is replicated but its objects (tables, etc.) are updated via Entity Framework. Whenever a schema change is made to the database by the SEs, we ...
1
vote
1answer
108 views

Why wouldn't statistics update if all rows in a table were replaced?

We have several "reporting" tables in a SQL Server 2012 SP1 instance. Every hour, a job runs procedures that delete all the rows from these tables and then insert current data (involving lots of ...
3
votes
1answer
32 views

how to change the file directory of your log and data files and what are the effects

I have inherited a SQL server 2012 instance where the file directories of the log and data files are on the same folder on the same drive(all are in the C:\ drive). My task that I will be doing is ...
0
votes
2answers
156 views

Sync two SQL Server databases

So I've got a hosting package from hostgator with an MS SQL database and a local SQL Express 2012 database running. I'm trying to investigate syncing the two together, two-way syncing, and I'm unable ...
12
votes
13answers
15k views

Sql Server Management Studio slow opening new windows

After upgrading both sql server and management studio from 2008 to 2012, the management studio 2012 is very slow when new query windows and dialog boxes are opened. Even right click on tables is slow. ...
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? ...