Questions tagged [sql-server-2012]

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

622 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
1answer
137 views

Text file report is not generating of Availability Databases other Databases during auto backup through maintenance plans in MS SQL Server 2012

I have setup Automated backup in SQL Server 2012 Enterprise Database backup through 'Maintenance Plan'. I have also configure AlwaysOn High Availability to that server .There is 5 databases in the ...
0
votes
0answers
106 views

Filter hierarchical groups

Assume we have following table Id | ParentId | Timestamp | Status We also have another table, for each Status it shows if document can be deleted or not. This table produces several trees (parent ...
0
votes
1answer
27 views

Where did these dbo._trace_ Stored Procedures come from?

I'm looking at some databases at a new company and one in particular has a bunch of Stored Procedures named dbo._trace_* SQL Default Trace is ON, but I'm not sure if these are related, and if they ...
0
votes
0answers
397 views

OLE DB provider “MSDASQL” for linked server returned message “ERROR: reserve exceeded : Out of memory ”

We have SQL Server 2012 database which pulls data using a linked server to a Netezza database. We have had a memory issue reported in an overnight batch. Error message: OLE DB provider "MSDASQL" for ...
0
votes
1answer
469 views

SSIS OnError propagating when it shouldn't

I have an SSIS package with a data flow task that uses a script component as its data source. The script component retrieves its data from a web service. The call to the web service sometimes fails, ...
0
votes
1answer
44 views

HOW to impliment SQL 2012 send_dbmail with OAuth2

Situation: we currently send emails from our sql 2012/asp app using the msdb.dbo.sp_send_dbmail process and implement multiple different domain accounts. It works (worked) well for us to send ...
0
votes
3answers
97 views

Need to configure Availability Groups between three different SQL failover instance

We have total 6 Nodes and 3 failover cluster (Each with two node). Cluster1.TestAD.com(Node1,Node2) - SQL Failover Instance (SQL1) - 1 TB Shared storage Cluster2.TestAD.com(Node3,Node4) - SQL ...
0
votes
0answers
116 views

Ran a Index Rebuild offline but DB is still highly fragmented

Over the weekend I placed my databases into Single User Mode and ran the index rebuild script found at this site. It took the script about half an hour to run against my database and reported it ...
0
votes
1answer
328 views

SQL Server AUDIT/event_time

I am using SQL Server 2012 Audit and when I look through the captured events I can see that even_time does not show the correct time. Actually it shows 5 hours earlier than time on the server. Do you ...
0
votes
0answers
593 views

SQL Query to calculate total time worked and total distance travelled

I am trying to write an SQL Query which calculates the Total Time worked and Total Distance Traveled by a Driver for each date. The StartOfDay is the MIN(LogDateTime) WHERE EventCode = 1 The EndOfDay ...
0
votes
1answer
107 views

Trigger on replicated DB

If I have database db1 with schema sch1. I want to create another schema sch2 which will be used by different application and the tables in sch2 will be populated from tables in sch1. So my approach ...
0
votes
0answers
727 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 ...
0
votes
0answers
89 views

What is the VERSIONING_COMMITTING wait type in SQL Server 2012?

I have a fairly large SQL Server 2012 database in an availability group that experienced performance problems for about an hour, with the bulk of the wait in HADR_SYNC_COMMIT (waiting for synchronous ...
0
votes
0answers
45 views

Restoring a backup of 1 database to another puts both databases into Restoring mode

We have a 2 databases- Staging Test At times, we refresh out Test environment with a copy of Staging. We do this by taking a full backup of the Staging database and restoring it over the Test ...
0
votes
0answers
532 views

SQL query too slow to fetch single row of data

we have this SP, running extremely slow to fetch a single row of data from tables within 100K rows, which seems not that big. It takes onn avg 15-20 mins to complete. We have tried to remove all ...
0
votes
0answers
390 views

Is it possible to configure exceptions for SQL Server Agent tasks?

I use SQL Agents tasks to execute my backup, maintenance & ETL tasks. IT would like to have a regular maintenance window to apply server patches. They're suggesting the 3rd Tuesday of every month ...
0
votes
0answers
2k views

automate import and export of process EXCEL -> SQL SERVER - > EXCEL without using SSIS

I have an ETL process that is entirely written using T-SQL scripts. The script grabs an Excel spreadsheet and imports it using openrowset. Once I get the transformed data I copy with headers and paste ...
0
votes
1answer
69 views

Implementing a Scalable shared reporting platform

Im starting to implement a Shared Platform that will host multiple BI/Reporting applications. The platform is required to be as scalable as possible and im also thinking how to achieve Load Balancing ...
0
votes
0answers
154 views

Can we track data changes on all SQL Server tables based on primary-foreign key relationships?

Let's say I have a Customers table with primary key as Customer_ID and 10 more SQL Server tables with Customer_ID as foreign key. Without keeping triggers on all 11 tables, is there a way to track ...
0
votes
0answers
2k views

SQL Server 2012 service will not start after each server reboot - corrupt SQLBOOT.DLL

When I tried to start the service manually from a command prompt, I get a dialog stating: Your SQL Server installation is either corrupt or has been tampered with (Unable to load SQLBOOT.DLL (HRESULT ...
0
votes
0answers
128 views

Creating clustered primary key index with ONLINE option

I have primary key clustered index which is constantly modified (insert and update) and read (select). Now, in order to change one of the types of the columns from which it is composed I need to re-...
0
votes
1answer
78 views

Point in time restore fails - backup file from before the restore point not available (why does this matter)

I have tried to do a point-in-time restore of a database through the management studio gui, the point-in-time being yesterday morning (2016-04-12). This fails with the error "...cannot open ...
0
votes
1answer
26 views

SQL Query for searching table 'C' records only if records from table 'A' has specific values

I Have Three Tables, TBL-A, TBL-B, TBL-C, TBL-D TBL A has records for userstatus RECID USRID USERSTAT USRNAME 1 1 1 JOHN 2 5 1 HARRY 3 ...
0
votes
0answers
1k views

Cluster network name resource 'XYZ' cannot be brought online

I have given wrong name for listener while configuring the always on in SQL Server management studio. One option I can see is deleting and re-creating the listener, But is it right way of doing it? ...
0
votes
1answer
22 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
0answers
181 views

SSIS buffer size and table with many columns

I have an Oracle view with around 10 million rows, each row has about 130 columns, I wrote a SSIS 2012 package which uploads the data of this view into a SQL Server table. The SSIS package fails each ...
0
votes
0answers
100 views

Odd service broker behavior

I have an established service broker relationship between two databases in our production environment. We do a weekly restore of these databases to another server for the purposes of testing our ...
0
votes
0answers
931 views

Why does OpenQuery hang for hours before raising Query timeout expired when query timeout on Linked Server is set much shorter?

In production have two SQL 2012 instances on separate servers, with a Linked Server set up between them. No problems there. In development, I have the databases for both in one 2012 instance, and have ...
0
votes
1answer
1k views

How to implement SQL Server Service Broker with external activator

I am trying to execute an external app using SQL Server Service Broker and the External Activator provided by Microsoft. I have created the following script: IF EXISTS (SELECT * FROM sys.databases ...
0
votes
1answer
74 views

SQL Server 2012 Transactional Replication - twin subscriptions on same machine

Server A publishes Pub1, Server B subscribes to Pub1. Server A and Server B are both SQL Server 2012 Standard Edition, default instances. When I use Replication Monitor to drop-in a Tracer Token, ...
0
votes
0answers
116 views

bcp copy from snapshot failed due to snap being in transition

We have a SQL job that runs each night to perform a data extract and import function. The job performs against a snapshot and copies from several tables in a serial loop. Today the job reported the ...
0
votes
0answers
802 views

Microsoft.ACE.OLEDB.12.0 Error when querying Excel

I am running the following query: SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 8.0;Database=D:\GSS.xlsx;HDR=YES', '...
0
votes
0answers
119 views

Which Azure service for use as data warehouse/analysis store?

We currently have a database running in SQL Server 2012 Standard. We need to export data periodically (a "data dump") of a particular set of data to "a location to be decided" where the client's ...
0
votes
0answers
1k views

How to import data from Sqlite into SQL Server 2012

I need to import data from sqlite into SQL Server so we can include it in our data warehouse. Based on previous system volume. Id expect there to be 50-100,000 rows after a couple of years. For ...
0
votes
0answers
242 views

Index Reorganize Generates a Non-Primary Filegroup is Full Error

First chance at a new job to do some much needed index maintenance on a system. 2-node cluster, W2K12R2, 512GB RAM, 64 logical cores, Fusion-IO, NetApp SQL Server 2012 Ent SP1 3.5TB db 4 ...
0
votes
1answer
76 views

Sql Server 2012 Failover Replica in Synchronous Mode between Primary-Secondary on VPN is very slow

I have installed SQL Server 2012 Clustered HA with Replica in Sync mode between two nodes connected by an high-speed VPN. The DB is encrypted. Everything works fine, but to do the replication, the HA ...
0
votes
0answers
144 views

Recovered database files can't be attached

I have recovered my hard drive with my databases mdf and ldf files. When I want to attach them I get a 9004 error: Error: 9004, Severity: 21, State: 1. An error occurred while processing the log ...
0
votes
0answers
9k views

Oracle:Test connection failed because of an error in initializing provider. ORA-12170: TNS:Connect timeout occurred

We have Migrated SQL server 2008R2 to SQL server 2012 from Windows 2008R2 onto Windows 2012R2. Everything went well , except for the Oracle database connection: We have a SSIS package created on SQL ...
0
votes
0answers
705 views

SQL Server randomly slow to respond to complete query

We have a SQL Server 2012 server. Randomly a query which normally takes 0 seconds will take 30-50 to return results. SELECT TransactionId, ItemNumber FROM Transactions WHERE CompanyId = '...
0
votes
1answer
176 views

SQL Server 2012 AlwaysOn Availability Group

We have an application that needs access to the database all the time to work properly and we are planning on deploying SQL Server 2012 AlwaysOn Availability Groups on Windows Server 2012. We have ...
0
votes
1answer
294 views

SQL Server DeleteFolder Job ran successfully but it doesn't deleted the folder

I have a job to delete past 15 days folder in SQL Server. The job run successfully and delete the folder in local SQL Server. But it runs successfully and does not delete the folder in another SQL ...
0
votes
0answers
364 views

Troubleshooting Memory-Pressure on SQL Server with 80+Gb RAM

I have a SQL Server cluster with 80+Gb of RAM and multiple production enterprise databases and applications running. We are encountering memory-pressure errors and are trying to troubleshoot what's ...
0
votes
1answer
49 views

Replicate a database to one secondary replica, but not the other secondary replica using Availability Group

I have a 3 nodes cluster in an availability group. There are two databases on the primary node. One database I want to replicate to the 2 secondary nodes. Another database I just want to replicate ...
0
votes
1answer
38 views

Using * to enforce the need to update both tables together

I am a Java Programmer and definitely NOT a DBA. I am just an "accidental helper" to a DBA as we try to troubleshot an inherited VB.NET application situation. The guy that wrote this MS SQL got fired ...
0
votes
2answers
123 views

Options for structuring multiple associations to a record

This is 101 level stuff and I promise to read a book later, but in the meantime, given the following three tables: Product --------- ProductId (uniqueidentifier) User --------- UserId (...
0
votes
1answer
31 views

How do I merge two rows only if there is the TagWidgetIds are same but the tagValues are different?

I have this stored procedure which generates the following output. The query which generates the output from the stored procedure is as follows: SELECT tat.[agent-id], tat.[agent-...
0
votes
0answers
2k views

DB_STARTUP blocking on spid 7

I have a sql server 2012 instance that I'm installing a new license on that had previously had an evaluation license. I've did this on two other servers with out incident, but this server is giving me ...
0
votes
0answers
882 views

Backup Mirror database

I have database mirroring setup between two SQL 2012 servers in two different datacenters. For testing purposes in the "mirrored" datacenter I would like to create a working copy of the database. ...
0
votes
1answer
61 views

Dimension design and MDX query issue

I'm new to MDX and SSAS but trying to learn. I'm on SQL Server 2012. I have the following table setup. My dimension relationships look like this: +-----------+----------+-------------------+---------...
0
votes
0answers
371 views

Columnstore Index Scan Cardinality Estimates

In SQL Server 2012, I am seeing large cardinality estimate discrepancies for a columnstore index scan. It looks like statistics have been generated for the index, but I don't see any details in DBCC ...