Questions tagged [sql-server-2012]
SQL Server 2012 (major build version 11.00.xxxx). Please also tag sql-server.
4,533 questions
3
votes
2
answers
342
views
How to import an image from a file, using OPENROWSET, to a table record?
I am trying to import a small image from a file located on my MS SQL Server to a column in a database setup as VARBINARY(MAX). I have declared a variable as VARBINARY(MAX) and would like to assign ...
0
votes
1
answer
79
views
Split columns into hierarchy
I have a table that is structured in the following manner that we have imported from another source into SQL Server:
Tier 0
Tier 1
Tier 2
Tier 3
AA;AB;BB
T1A;T1B
T1A2A;T1A2B;T1B2A
T1A2A3A;T1A2B3A;...
-3
votes
1
answer
61
views
i am getting error of The column 'AEDAT' was specified multiple times for 'd' [closed]
---===============DATA WORKING LEVEL======================-----------------
DECLARE @date NVARCHAR(8), @to NVARCHAR(8);
SET @date = '202412';
SET @to = '202501';
with
dn as
(
select substring(...
5
votes
1
answer
418
views
What is a good way to handle an error while parsing a T-SQL command that doesn't exist on an older version of SQL Server?
I am trying to grant the [CONNECT ANY DATABASE] permission to a specific SQL account on multiple instances. However, one server is running SQL Server 2012 and that permission was not introduced until ...
0
votes
1
answer
63
views
Database replication - multi hop
We currently have a SQL 2016 database replicating to a SQL 2012 database and we are upgrading our SQL 2016 instance to SQL 2019. According to the compatibility documentation, replication between the ...
0
votes
2
answers
241
views
Cannot shrink log file
I cannot shrink a log file, for a database that is in Simple recovery model (used to be in Full , and was changed to Simple).
I have tried every solution I can find on the internet, even the mighty ...
6
votes
1
answer
552
views
How to Determine if a Stored Procedure is Being Recompiled on Every Execution in SQL Server 2012
What query can I use to determine if a stored procedure is being recompiled every time it is executed in SQL Server 2012? I suspect that some of our stored procedures might be getting recompiled, but ...
1
vote
1
answer
116
views
Does Postgres have anything analogous to Microsoft SQL Server's Batch Mode?
In traditional usages of Microsoft SQL Server, exactly one row flows from one operator in a query plan to the next. In Batch Mode, huge performance gains are obtained by moving thousands of rows at a ...
0
votes
1
answer
173
views
Transactional replication Snapshot agent not starting
I am trying to consider all the options before setting up transactional replication on my 2008R2 server to 2012 distribution server to 2012 Subscriber server. All the three servers are on FULL ...
2
votes
1
answer
103
views
SQL Server Database I/O Consistency Error Disaster Recovery
I have a corrupted SQL Database that is inacessible by any means. It is to the point that simple commands, like USE MyDatabase, won't execute.
The error I get is: SQL Server detected a logical ...
1
vote
1
answer
54
views
SSMS Version of 2008R2 Publisher not compatible with 20012 Subscriber
I am setting up transactional replication on my 2008R2 server to 2012 distribution server to 2012 Subscriber server. All the three servers are on FULL recovery mode. Log backup is taken every 15 ...
1
vote
0
answers
132
views
sp_send_dbmail fails when query is included
I am running SQL Server 2022 Enterprise inside a company domain. I have a SQL Agent job that runs a stored procedure. The job runs under a domain account say 'domain\myuser' that is a member of '...
-1
votes
2
answers
245
views
Sql query result in a single row with multiple dynamic columns
i have multiple rows and want to make dynamic column i tried below code with case it work fine but i need the column to be dynamic based on the count of max Code
EventId
Code
Date
1
A12
12/12/2020
1
...
-1
votes
1
answer
175
views
Delete operation taking time from SQL Agent Job
I am running a job which deletes data from 7 tables, 2 of which contains 1-2 million records. But the job gets stuck at a point when deleting data from web_activity table which holds only 42 000 ...
0
votes
1
answer
120
views
What happens if the Subscriber goes down - will the t-logs keep accumulating on the publisher in Transactional Replication?
I am trying to consider all the options before setting up transactional replication on my 2008R2 server to 2012 distribution server to 2012 Subscriber server. All the three servers are on FULL ...