Questions tagged [sql-server-2012]

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

619 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
31 views

How to recalculate and adjust the entire row of time in and time out in sql server?

In SN = 1, I have an original schedule of 09:15:59 with my first time in is 09:50:57 so that I am late about 34 mins. In SN=2, 13:27:05 is my time out. In SN=4, I time in again of 15:40:13 that gives ...
0
votes
1answer
76 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
25 views

Restore previous version of database in sql server

I need your help on restoring previous version of database on SQL Server. In last week I restored database 'A' in DEV server with it's production copy and didn't realize that this database 'A' in ...
0
votes
0answers
23 views

Migrating SQL Server 2012 Web Edition to Azure

I am trying to migrate to Azure I have gone through this article Migrate SQL Server to a single database or pooled database in Azure SQL Database online using DMS, However since I am having SQL Server ...
0
votes
0answers
23 views

How do I create a query to show values in their relevent years

I have a table with records that have start and end dates per record. I need to create a query that based on the start and end date puts the relevent value into a financial year. For example | Record ...
0
votes
0answers
13 views

Transactional replication restore missing data

We have configured transactional replication. Today for some reason replication started to lock users running reports. By running sp_who2 I saw that replication job is constantly doing update and ...
0
votes
1answer
22 views

What will happen if master goes down in peer to peer replication?

In case of Peer to peer replication, if Master goes down, will the other two nodes continue synchronizing or not?
0
votes
0answers
17 views

Migrating AWS RDS SQL Server to a smaller RDS instance

I am in the process of migrating an AWS RDS SQL Server to another instance of AWS RDS SQL Server with lesser storage. AWS folks suggested using the native backup/restore option instead of DMS. Steps ...
0
votes
0answers
16 views

Under what circumstances would it be reasonable to choose a full index over a filtered one?

When I create the test case below, the filtered index is always chosen, even on the different versions of SQL Server with different configuration. create table #t (id int not null identity(1,1) ...
0
votes
1answer
39 views

Aggregating data in .net SQL

I'm converting a database originally written in MS Access VBA to .net and many of the SQL statements that worked in Access don't work in .net. My data set is standard stock market daily information ...
0
votes
0answers
65 views

exec sp_executesql N'BEGIN CONVERSATION TIMER

please let me know if any way to avoid below statement: exec sp_executesql N'BEGIN CONVERSATION TIMER (''f550457c-f181-e911-833b- 902b34ef3b40'') TIMEOUT = 120; WAITFOR(RECEIVE TOP (1) ...
0
votes
0answers
11 views

Is there anyway to automate DQS knowledge base discovery process, using SSIS or any SQL job?

We are implementing a data warehouse for our client and part of it requires the development of metadata repository. Now, that repository, other than metadata information, would also contain domain ...
0
votes
0answers
20 views

There is no column named id5093 in the table body_record. It is ignored for this operation

One of our Database - has been Error Spamming Event Logs for over 8 months stating the below Error: There is no column named id5093 in the table body_record. It is ignored for this operation. The ...
0
votes
1answer
21 views

MSX Job deployment: Not creating job on certain servers

I am deploying a new index maintenance jobs through MSX to about 100 servers, I am in the process of manually checking that each job has been created and I have already discovered that for some ...
0
votes
0answers
42 views

Performance difference between on-prem SQL Server and SQL Server running on Azure(IaaS)

We are comparing the performance of an on-prem SQL Server and SQL Server running on Azure VM. The Azure VM is created by Azure Site Recovery(ASR). For the testing purpose, we have executed following ...
0
votes
0answers
47 views

Writer vs writer deadlock and solution

Earlier we used to have reader vs writer and writer vs reader deadlock, which is resolved by setting isolation level at application configuration level from "Repeatable Read" to "Read Committed" which ...
0
votes
0answers
192 views

Create SQL Server Agent job for stored procedure with input parameter

Could you suggest please how to create SQL Server Agent job for a stored procedure that have 1 input parameter? The procedure is correctly created and i executed it using this code : EXECUTE dbo....
0
votes
1answer
144 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
0answers
36 views

SQL server 2014 new publication error “A generic failure occurred during Service Master Key encryption or decryption.”

I'm trying to create a new local publication (replication , Transactional Publcation) on my production data base but i'm getting an error A generic failure occurred during Service Master Key ...
0
votes
0answers
91 views

Regarding NIGHT SHIFT Employees

I have small issue on night shift of our employees. Shift timings are from 22:00 to 6:00. If the shift starts today at 11 PM it will end the next morning at 6:00 AM (7 Hours ). Here I want to know ...
0
votes
0answers
96 views

Loading 'Image Service Package' crashes Management Studio

I'm getting the following error on my SQL Server when I log into the system: I ran a repair on SSMS successfully, but it did not resolve the issue. The following error message is recorded in Event ...
0
votes
2answers
97 views

How to grant or allow a particular SQL Server Login/User to always view a Column Level Encrypted data?

I used Column Level Encryption to encrypt one of the columns in my SQL Server database. Now everytime I want to SELECT to see that encrypted data, I have to open the symmetric key to decrypt the ...
0
votes
1answer
46 views

Need Help in extended events SQL Server

I have created an extended event as below. I want to know how to query the historical data using T-SQL to see the issues at particular timestamps. The trace is running as of now CREATE EVENT SESSION [...
0
votes
2answers
47 views

SQL Server 2017 Express edition Bulk load

I am working on the SQL Server 2017. I need to import 20 text file into one table. Every text file has the same data type and column name. I have checked the data and they have in the same order also. ...
0
votes
0answers
24 views

Connect to SQL server from client

Currently, I am using the SQL Server 2012 Express version and it is installed on Windows Server 2012 R2. Now I just want to connect to this database from a Windows 7 client. The Windows 7 computer ...
0
votes
2answers
66 views

select query with where clause having variable taking more time to execute

I have a query which selects a couple of rows from a view based on the variables declared. I ran the same query in lower environments and to my surprise, I got the result in less than 3 minutes ...
0
votes
1answer
57 views

Select All Instances of Substring in a String

I have a varchar(max) column that holds a JSON request string. I need a SQL statement for a report that will select all of the instances of that substring. More specifically I need to grab the LoanId ...
0
votes
1answer
71 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
0answers
45 views

DDLTrigger_Audit error “The user does not have permission to perform this action”

I have a DDLTrigger_Audit enabled in my database when I try executing a stored procedure having Drop and Create index statement in it fails with the below error. database "XXX" failed on Jan 17 2019 ...
0
votes
0answers
40 views

CHECKDB run times issue

When using the PHYSICAL_ONLY option and NOINDEX with CHECKDB, my run times are longer! But, on the weekend, it is 1/4 the time without those options. Yes, there are more data changes during the week ...
0
votes
0answers
31 views

Maintenance plan changing from ALL USER DBs to SELECT DBs automatically

We came across an odd bug in Maintenance Plans on SSMS 2016 and 2017 for SQL Server versions 2012 and 2016 (at least). The setup is unusual, but I couldn't find anything about this or any similar ...
0
votes
0answers
23 views

SSRS version installation

I need to install two for two SSRS server system The questions are: Do I have to set up the servers according to the SQL version that the system works with? Can I consolidate systems? as is?, there ...
0
votes
1answer
189 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
0answers
36 views

Update stats as default or with a sample value

I have been reading many blogs on this and cannot come to a conclusion on update stats for VLDB;s On SQL server 2012Sp4 and 2014Sp2 we have databases over 15 TB with 4-5 tables covering most of the ...
0
votes
0answers
38 views

Archiving SQL Server data on disk to be pottentially restored

Right now, we are backing up data per table into text/CSV files per month. This works fine for fairly small tables. For bigtables, the text files become so big that the restore process for a month ...
0
votes
0answers
53 views

Doing bulk load on database and monitoring the growth

I have a small doubt on how this works. We came to know last night one of our sql databases had bulk load operation done with vendor giving that data of approx 300 GB would be bulk loaded. Before and ...
0
votes
0answers
41 views

Unable to select the table result in linked Server

As I have successfully created the Linked Server in SQL Server 2012 SP4 with MYSQL Server. Some of the small tables record able to fetch from the MySQL Server. And some of the big tables records when ...
0
votes
0answers
50 views

IO Test for SQL Server

I was trying to use DiskSpd to check IO subsystem performance but one thing I was confused about is regarding the -T switch, which (according to the documentation) is the number of threads per file. ...
0
votes
1answer
42 views

How to accomplish such insert-or-update strategy?

Programming stored procedures isn't my strongest point when it comes to programming, but I'm trying to get better. I've stumbled upon a business requirement that's kind of hard for me and I was ...
0
votes
1answer
50 views

What happens with a synonym if the table which its based on gets deleted?

we are working on a project to implement a large ERP system. We found out that one of the tables has a synonym to another database. Both databases are in the same instance. Our project leader has ...
0
votes
0answers
24 views

Snapshot replication from SQL Server 2012 to SQL Server 2008R2

We are using snapshot replication as a standby to replicate prod data for a month from 2012 to 2008R2 after migration from 8R2 to 2012, just as a rollback process. Using snapshot replication for 10 ...
0
votes
1answer
280 views

Is it possible to support multiple snapshots / store a snapshot / restore from a snapshot to a state with another snapshot?

So, I would like to have a snapshot structure like the following: A snapshot 1 is taken. Some code is run, then a snapshot 2 is taken. Then some more code is run, and the database is reverted to ...
0
votes
0answers
133 views

When restoring logs in log shipping, when does the restoring stop

We are using LS for reporting purpose. LS backup runs on primary every 15 minutes. On Secondary nightly restore via LS restore job is done daily at 10 PM. While the nightly restore job is running, ...
0
votes
1answer
77 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 (...
0
votes
2answers
217 views

Granting a SQL Server database only user execute on xp_instance_regread fails

So I'm not finding an answer to my specific issue. SQL Server 2012 database SSMS 17 admin tool Log on as a database (not domain) user foo. Receive sys.xp_instance_regread no permission errors. In ...
0
votes
0answers
207 views

Oracle to SQL Server Conversion help: sys_connect_by_path, listagg, regexp

I've been tasked with converting a process from Oracle to Sql Server 2012. I've converted most of the query over to SQL Server but am having a hard time translating over these queries to SQL Server ...
0
votes
1answer
26 views

Copy database wizard - any change in lsn number of source database

After Copy database wizard - database restore in another server . Any change in LSN number of source database . is it same as copy only backup?
0
votes
1answer
41 views

Getting replication status for snapshot replication

Is there a way we can get stats on how the snapshot replication is working in an easier report format to check on actually how many objects like tables or sps have been replicates followed by health ...
0
votes
1answer
33 views

Failover from Primary to Asyn Secondary Replica

In my environment we have 1 Primary 1 Synchornous Secondary and 1 Asynchronous Secondary Replica (Off site). We are planning to do a manual failover to the Asynchronous Secondary Replica (Off site) ...
0
votes
1answer
58 views

Change Data Capture SSIS not picking changes

I am trying to implement change data capture in SQL Server 2012. I enabled it at database and table level. when i try to update the table, CDC_CT captures the changes. However when i am using SSIS CDC ...