Questions tagged [sql-server-2012]

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

Filter by
Sorted by
Tagged with
4
votes
0answers
46 views

FORMAT 'G17' vs 'G'

I have a question about this fiddle: DECLARE @TestVal AS float = 8.88; SELECT flt = @TestVal , xml = (SELECT Value = @TestVal FOR XML PATH(''), TYPE) , fmt17 = FORMAT(@TestVal, 'G17') , ...
1
vote
2answers
94 views

Improving Backup Performance using SQL native methodology

I am trying to gather some stats on comparison of run time vs performance between Litespeed backups and sql native backups. As we are no longer going to use Lite Speed [even though i personally loved ...
-2
votes
1answer
21 views

is it a good idea to migrate a SQL Server database that uses a lot of linked servers and external conenctions with different databases to Azure?

We have a 1tb database that use information from other 4 or 5 databases. It has hundreds of procedures using external databases to calculate and etc. we have 0 problems inside SQL Server. I would like ...
0
votes
1answer
14 views

SQL Server: Differential Maintenance Plan “fails” . No other message

I have created Backup Maintenance Plans for full, differential, and transaction logs. I notice that the rest run without a hitch. The differential file is created, but get the following error: ...
3
votes
2answers
441 views

what is the best approach to send report by Email?

I've been requested to create some sql server reports ( create a report and send them by email ) for some poeple. I thought it would be like 2 or 3 but now that they know I can do it, every week I ...
1
vote
1answer
617 views

Fastest way to read data from single SQL Server table into java under single transaction

I need to read a large result set from SQL Server into a java program. I need to read a consistent data state, so its running under a single transaction. I don't want dirty reads. I can split the ...
0
votes
1answer
14 views

Find Unique Index that does not have Unique Constraint

I need to find list of unique indices that does not have unique constraint on that column. How to achieve this? I know, following query will give me unique constraints. SELECT * FROM ...
0
votes
1answer
96 views

Better approach to optimize query

We have a previously designed query that functions fairly well but I am thinking there has got to be a better way of performing the following. Here is the query... WITH CTE1 ( COL1, COL2) AS (...
1
vote
1answer
82 views

SQL Server Extended Events purging

How do we purge events older than a day in Extended Events in SQL Server 2012. Stopping and Starting the session is not helping. Target : asynchronous_file_target Trying to create a job which will ...
3
votes
2answers
8k views

Agent Xps getting disabled automatically

In one of SQL Server 2012 server, agent Xps is getting disabled automatically. There is no set pattern for the same and the issue started all of a sudden. Through profiler it was found that ...
0
votes
1answer
295 views

LSN numbers query regarding Differential backups

We have the following backup regime in place which I am not 100% sure about. Full backup each night at 18:00 taking approx. 6 hours Transaction log backup upon completion of full generally about 10 ...
2
votes
1answer
139 views

Notification of row entries

I have SQL Server 2012 machine housing a database running an off the shelf application with a users table. This users table contains PII enterable fields. Per requirement none of our databases can ...
2
votes
0answers
25 views

Is it OK to restore master db backup, after changing WSFC clustered instance into non-clustered instance

I'm converting WSFC fail-over clustered SQL Server 2012 instance into non-clustered one. My question in short: Is it OK to restore a master database backup taken from the clustered instance, into the ...
-3
votes
1answer
66 views

SQL Server Integrity Check error

I’ve Implemented Ola's SQL Server Integrity Check on one of my SQL 2012 Servers and created a SQL Agent job to run it. The job fails every time I run it, but when I run the code below manually it ...
2
votes
3answers
406 views

Need help to understand tuning up a slow SQL server query [closed]

For one of our databases the query like below is extremely slow. Due to security reasons I am not able to share the actual query or plan but just to give an idea how query is written is below SELECT [...
-1
votes
0answers
12 views

Extended Events Perfmon Counters

I'd like to use the perfmon OS counters from Extended Events if possible as they require less intervention from other teams, I've created a session with perfobject_process, perfobject_logicaldisk, ...
0
votes
1answer
77 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 ...
-2
votes
0answers
24 views

Rearrange Month Wise data in sql query

Currently I am retrieving data month wise from below query select month(EntryDate) as m, sum(QTY) as QTY,Sum(IWeight) as Weight from ConIssuance where delid is null group by month(EntryDate) Order ...
0
votes
1answer
175 views

Error: change in schema version between compile time and run time - SQLNCLI11

This is a head scratcher. I've searched the forums and no one has been able to answer this. Not even GilaMonster on SQLServerCentral has chimed in on this one! One user suggested that it may be ...
0
votes
1answer
473 views

SQL - Update certain database records with a loop

I have a certain IDs in a table that I would like to change a column value from false to true. How can I do a loop that goes through the specific IDs given and changes a column value from false to ...
0
votes
1answer
31 views

Need to upgrade SQL Server from 2012 to 2017 on a Server 2008 box

I have been asked to upgrade SQL Server from 2012 to 2017, it is currently installed on a server with Windows 2008 OS. My thinking from what I've researched is this: Take a snapshot of the server ...
0
votes
2answers
17 views

SQL server alwayson 3 Node Primary Down

I am using three node alwayson Availability Group SQL 2012 Enterprise Edition. 2 Node in DC with File Share Witness quorum also in DC and third node to be setup in DR I need to perform a DR switchover ...
1
vote
1answer
437 views

Mirroring on-premise SQL Server to AWS EC2 SQL Server

Trying to mirror an on-premise SQL Server instance to EC2 instance, but not much information is available on this topic. The closest one I managed to find is: Implement SQL Server High Availability ...
-4
votes
1answer
43 views

Updating Multiple rows of the same column [closed]

I have this query UPDATE users SET objectName = CASE WHEN VideoID =2 AND MusicID = 13 THEN 'Sing with Me!!!' END, CASE WHEN VideoID =2 AND MusicID = 2 THEN 'Awe!!!' END, WHERE ...
1
vote
1answer
197 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 ...
-1
votes
0answers
9 views

Forgot Windows service account passwords

We have multiple Sql servers (PROD/DEV/TEST) running under service accounts. now we want to create one more server but we dont have service account passwords, even windows admin also don't have ...
0
votes
0answers
33 views

List of databases present in specific maintenance plan

I have two maintenance plans and also I have two user-defined databases demo1 and demo2. The first maintenance plan is used to take the backup of all the databases. the second maintenance plan is used ...
0
votes
1answer
29 views

“Cannot continue the execution because the session is in the kill state” when querying system tables

This is a snippet from some code I run on a 2012 (SP3-CU9) (KB4016762) - 11.0.6598.0 (X64) system that I just inherited and have not yet had a chance to fully patch. AlwaysOn AG are not enabled, and ...
0
votes
1answer
106 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 ...
2
votes
1answer
437 views

SS2012 Export Wizard Access is denied

When a user exports to a flat file she gets an access denied error. The wizard allows her to preview the data so she has access on the db side. From Windows she can create a new file in the target ...
1
vote
1answer
41 views

What would be the best way to show table/database growth?

I've created a table that stores top 10 biggest tables on a database. it's schema is like this: (example with 3 tables only) | Table | size_mb | Date | |-------|---------|------------| | tb1 | ...
0
votes
2answers
6k views

SQL server agent unable to open step output file the step failed - mapped drives

I have used Ola Hallengren's maintenance script to create backup scripts and schedules, originally both to a local folder and this worked fine. Then I set it up to send the backup files to a mapped ...
0
votes
1answer
25 views

Collecting VLF information on all versions of SQL server

Based on my monitoring collection, i am having an issue while collecting info regarding how many VLF' i have for # of databases in SQL instance. 1st issue - Is there a single script which can be used ...
0
votes
0answers
16 views

Using SQL Agent Job to execute a script from a UNC path

I need to execute a script located on an UNC share. I've setup my SQL job to use CMDExec and to execute the following command: PowerShell -NOPROFILE -ExecutionPolicy Bypass -File \\Server\...
0
votes
1answer
27 views

How do get correct instance name on Multi instance cluster

Just a quick question and somehow unable to figure it out. We have a Active Active cluster or should i say Multi instance cluster as below. node A and B are part of same window cluster Node A --> ...
5
votes
1answer
134 views

Why does my server have thousands of “HIDDEN ONLINE” schedulers?

We have a SQL Server 2012 instance with 16 CPU cores. When looking in sys.dm_os_schedulers we see the expected 16 rows that are "VISIBLE ONLINE", one per core. The error log shows the ...
0
votes
0answers
29 views

Strange wait types after enabling CDC

We recently enabled CDC on four tables in a busy database and since then we are capturing a lot of sessions that are waiting on XE_BUFFERMGR_FREEBUF_EVENT. When we see this wait type CDC is trying to ...
1
vote
1answer
101 views

Changing the login name for user dbo

I have a database where the owner is Login1 but the username dbo is assigned to Login - login2. I understand in order to change the login name for the username dbo to sa I will have to use the below ...
0
votes
1answer
322 views

Mssql query problem. Column '' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause

There is a problem I have experienced in mssql. ( but I don't have this problem in mysql. ) They know two different engines. but I could not find a solution. Do you think I can fix this error? My ...
0
votes
1answer
871 views

Pulling data on SSL expiration from SQL server

I am trying to figure this out and seems to be out of thoughts and need your inputs to help me figure out on this. We have implemented SSL across our 200+ servers, SQL2012 & 2014. These cert are ...
-1
votes
0answers
21 views

How to write a query for all table size for all databases in sql server?

How to write a t-sql to get top 3 table size for all databases in sql server. This query needs to be run on multiple servers using likned server.
2
votes
1answer
674 views

Add shared folder to AlwaysOn AG Failover

We have setup a 2 node Synchronous AG with automatic failover to provide HA for our ERP application (Dynamics GP) The GP desktop client loads a number of shared reports and dictionaries from a file ...
0
votes
1answer
320 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 ...
1
vote
1answer
2k views

Server Local Connection Provider has stopped listening on local pipe due to a failure

All, I'm looking at a database where every so often, connections to it will fail. The event viewer and SQL Logs have the following error in them: Server local connection provider has stopped ...
1
vote
1answer
623 views

Always On shared network location

To use the wizard from SSMS, we had to provide full access to "everyone" to the shared network location. Is there a way to avoid this and just limit the access to a specific user? Already tried the ...
1
vote
1answer
62 views

Query cycles between suspended and runnable without ever completing

I have an insert statement, extracting data through multiple inner joins from around 8 tables. It is getting into suspended state then runnable and vice versa forever; never coming back to running ...
1
vote
1answer
201 views

How can I configure a connection string in SSRS 2012 using named pipes?

I have SQL Sever 2012 and I want to create a data source that uses named pipes rather than TCP. This is when I have tried: Data Source=np:\\.\pipe\MSSQL$MSSQLSERVER02\sql\query;Initial Catalog=...
3
votes
1answer
308 views

SQL Server High Availability and Sharepoint - log file grows when no database activity

Just started as a dba with a company running SQL Server 2012 High Availability and SharePoint. Short description: Database with no user activity still has growing log file. Long description: They ...
1
vote
1answer
818 views

Renaming a column with sp_rename hangs SQL Server 2012

I was attempting to remove a column from a table within SQL Server 2012 for one of our developers. As a precaution, before dropping the column, we rename them to make sure that everything continues ...
1
vote
1answer
282 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,...

1
2 3 4 5
88