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
-3 votes
0 answers
18 views

how to update master table counts in tracker table [closed]

Master tables list : TableA,TableB,TableC Main table : Trackertable Tracker table having columns CountUpdatedDate,TableA,TableB,TableC i want each and every time with date master tables counts are ...
user avatar
0 votes
0 answers
51 views

Unable to attach other 2nd MDF file Error It is not a primary Database

The windows got crashed and we copied the file from hdd to other machine..... Let me explain you .. We have this db since many years one day the c:drive got full so the dba make changes and create new ...
user avatar
0 votes
2 answers
33 views

Changing table name from upper to lower case

Can I alter a table name in upper case to lower case? Would it be reflected in its references also? My project is already done.
user avatar
-2 votes
1 answer
15 views

Do we have to implement syspolicy_purge_history job in case of azure database, as there is no msdb

I migrated from sql server to Azure db. While migrating I found a job named syspolicy_purge_history (sp_syspolicy_purge_history), do I also need to implement it on Azure db. As I found the ...
user avatar
0 votes
1 answer
61 views

When Insert Press Name Tech Id Take Wrong Number Where Press Name Exist?

I work on SQL server 2017 I have table #Pressfeature as below create table #Pressfeature ( PartId int, PressName varchar(300), TechId int ) insert into #Pressfeature(PartId,PressName,...
user avatar
-3 votes
1 answer
17 views

How a DNS alias works if I create a new server with a named instance?

we had a server with a listener point to it: Listener: database_db server: Server123 The sql server here was without a named instance so you can just connect with Server123. but now the server died ...
user avatar
  • 7,104
1 vote
1 answer
88 views

Cannot connect to SQL Server, cannot start SQLEXPRESS service

There are 2 issues at the same time. I cannot connect to the database (SQL Server 2012) using SSMS - I'm getting error 1225 I cannot start the SQLEXPRESS service - getting error 3414 Earlier last ...
user avatar
0 votes
0 answers
20 views

SQL Server lock resource error

I use SQL server 2012. One of my sql job got failed yesterday due to the Lock resource issue. And I checked the lock memory, it looks like first three use lots of lock memory, is this normal or do I ...
user avatar
  • 1
0 votes
0 answers
60 views

SQL Server reducing log file size that is already full

Server A has 700GB disk space. With multiple databases, one particular database's log size is taking up 310 GB. Even when I change the initial size, it goes back to where it was. Is there a way to ...
user avatar
  • 9
0 votes
1 answer
58 views

Cannot execute as the server principal... with Windows (Active Directory) Group login

I'm running SQL Server 2012 (I know, ancient...) and trying to work out why users don't have permission to execute some procedures. I'm logged in as sa, just in case my own id doesn't have sufficient ...
user avatar
  • 103
1 vote
1 answer
70 views

Run MSSQL stored procedures containing SSIS packages using Windows Authentication from another computer

I am new to MSSQL. I have a question about executing MSSQL Stored Procedure. Let me briefly talk about my development environment first: PC400 (Computer/Server A), where SQL Server 2012 is installed ...
user avatar
-2 votes
1 answer
28 views

BOM query combining components on 1 row

I am trying to build a BOM query that shows all components on 1 row rather than split out each on it's own row. All Parent items have either 2 or 3 components. The structure is: select * from ...
user avatar
1 vote
0 answers
94 views

Any benefit creating temp tables with random prefixes in SQL Server to control latch waits on tempdb database

Recently I came across reading in one of the blogs that if a temp table name is prefixed with different/random names (in different procedures) that could benefit in reducing the concurrency issues / ...
user avatar
1 vote
1 answer
17 views

How do I safely drop a table under replication

I have newly set up replication on my Sql 2012 Server. It is working OK. I occasionally have sql scripts that drop existing tables and recreate them. However, I cannot drop any table currently under ...
user avatar
  • 73
0 votes
2 answers
98 views

Split Brain scenario Always on Availability group

Due to maintenance our primary site will be offline for few hours. I have an availability group where there are 2 nodes at the primary site and one node at the DR Site. Since the Primary site will be ...
user avatar
  • 1,007
0 votes
0 answers
23 views

Move two or more columns as starting columns in TSQL depending on values

AnimalId Date Remark Number PA PCountA PB PCountB PC PCountC PD PCountD AN001 2022-01-25 LR 22025002 coli 100 Strep ag 100 Strep s 100 Staph a 100 AN001 2022-01-25 12:10am 22025002 coli 300 Staph a ...
user avatar
1 vote
1 answer
79 views

How to modify the Replication Subscription Job/script to make it point an IP Address and a Port number?

I have an SQL Server 2012 server set up replicating one Database. It is behind a firewall. I have poked a hole in the firewall so I can access the server on Port 1433. I am using an IP Address and a ...
user avatar
  • 73
0 votes
0 answers
31 views

The configuration Option for a column is not unique error - sql server

I have a table with 5 columns. regionId is the primary key. One of the columns, regionKey, is a sql_variant type. Create Table #Region ( regionId int identity(1,1), regionName varchar(100), regionKey ...
user avatar
0 votes
0 answers
17 views

Capture Exclusive Data into Separate Defining Columns

I have one Master Database table and a Separate Exclusions Database table. I want to compare the two and have a new DB Table that lists the Resulting Data less the Exclusions in Defined columns. ...
user avatar
  • 1
1 vote
1 answer
41 views

Is there any rules between the LDF file size and MDF file size?

I am using SQL Server. I am creating a program to copy the data from one source database to a target database, and need to prepare enough disk space for the target database files, including MDF file ...
user avatar
  • 165
1 vote
1 answer
66 views

dbcc checkdb errors, or msg 601 when restoring SQL 2012 backup to SQL 2016

I need to move two databases, WES and WILL from a Win2012/SQL2012 instance to a Win2016/SQL2016 instance for a software upgrade. I'm using the full backup files from the SQL2012 maintenance plans. I'...
user avatar
  • 11
0 votes
1 answer
65 views

Updating DNS on Availability Group database servers

We have always on availability group that spans across different data centers. Our network team has decommissioned some DNS servers and those servers will need to be updated with the active ones on ...
user avatar
  • 1,007
0 votes
1 answer
63 views

How to make SQL Server Database Mail use "PLAIN" authentication (instead of "LOGIN" authentication)?

I'm having issues sending Database Mail with "PLAIN" authentication on two different versions MSSQL Server. SQL Server 2012 SQL Server 2019 Context I have created backup jobs which ...
user avatar
  • 111
0 votes
1 answer
84 views

Detecting whether a varchar value is already encrypted by EncryptByPassPhrase() in SQL Server

Starting with a varchar(100) column named Password in a table Users with one record in it, after performing an update on the column to encrypt it with EncryptByPassPhrase() on the Password column the ...
user avatar
  • 153
0 votes
1 answer
38 views

Rolling Upgrade Win2012R2/SQL2012 Availability Group to Win2019/SQL2019

To do a rolling upgrade of an Availability Group from Windows 2012R2, SQL 2012 to Windows 2019, SQL 2019 do I have to have an intermediary set of servers on Windows 2016? Based on the documentation ...
user avatar
0 votes
0 answers
57 views

Microsoft SQL Server - Recovery MASTER Database

I have backuped "master" database from 1 server and need to recovery it to another server. In "master" database or in another database - not matter. Just i need access data. When i ...
user avatar
0 votes
1 answer
280 views

SQL Install Fail - 2012 on Win11 [duplicate]

Cannot use file 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\Template Data\master.mdf' because it was originally formatted with sector size 4096 and is now on a volume with sector ...
user avatar
0 votes
0 answers
35 views

How to get first row group by partid and compliance typeid and document type?

I work on SQL server 2014 I face issue I can't get only one row based on part id and compliance type id and document type . so if have part id as 3581935 and compliance type id 1 and document type Web ...
user avatar
0 votes
1 answer
270 views

SQL Server RAM usage - how to find out where it is going?

Short Version SQL Server is using 34 GB of RAM. But when query the Memory Consumption Report, the buffer pool size, and the ad-hoc query size, it only adds up to around 2 GB. What is the other 32 GB ...
user avatar
  • 896
0 votes
0 answers
51 views

Multiple Date rows into One single Date row(date range)

An employee was sick during different period of time, when there is not a single day difference between the multiple dates range, or the date is continuous then it should be shown in one row covering ...
user avatar
  • 1
0 votes
1 answer
57 views

How can I improve the run time of a query that groups / display same date data in one row?

I currently have a view that contains about 1k rows of user information. currently i have a query that groups all the same user information by date into one row. Currently this query takes between 20 ...
user avatar
  • 15
-1 votes
2 answers
271 views

WHEN run query on SQL Server, it is very slow. How to solve execution plan issues?

I work with SQL Server and face an issue that a query is very slow. INSERT INTO [ExtractReports].[dbo].[TradeCodesDelete] (PartID, Code, ...
user avatar
0 votes
1 answer
46 views

Scheduling Next Run date for weekly agent jobs

On SQL Server I used maintenance plan wizard to create three jobs: Job Schedule Job 1 Every 3 week on Sunday Job 2 Every 3 week on Sunday Job 3 Every 3 week on Sunday I want the three jobs to run ...
user avatar
  • 411
11 votes
2 answers
2k views

SQL Server is using a lot more RAM than it should

I have a SQL Server 2012 instance using more RAM that it should. The SQL Server process is using about 22.5GB RAM: The instance is configured to use a maximum of 10GB: Which is way more then ...
user avatar
0 votes
1 answer
35 views

Insert taking less than 1 second to run, but it keeps looping in the same SPID

I'm looking for a behaviour that I'm not sure how to explain. Using sp_whoisactive, I can see an insert going on for hours: But each time , it takes less than 1 second but it's still using the same ...
user avatar
  • 7,104
0 votes
2 answers
86 views

SQL Server Try_Cast returns Null value

Related Questions ,TRY_CAST(Question_Text AS xml).value('(/p/text())[1]','nvarchar(1000)') AS Question_Text2 With the help of CharlieFace on my previous post I discovered the use of Try_Cast ...
user avatar
0 votes
0 answers
54 views

Select Max record from last 6 hours from the table

I have multiple records for sample locationId for Same date. But createDate and time different. I need to take the max record from the last 6 hours. If the same locationId has record which is time is ...
user avatar
0 votes
1 answer
43 views

Help with Replacing characters with text string chops of last character of string

I need assistance with fixing a replace statement that truncates the last character of the string. The original string (Question_Text) contains HTML characters and other erroneous characters that ...
user avatar
1 vote
0 answers
31 views

FT CRAWL on SQL Server 2012 holds up too many connections

We are facing an issue with Full-Text service on our SQL Server 2012, it seems that it's behind crawling several dbs and once it's running it holds up too many connections, I can confirm that with ...
user avatar
1 vote
2 answers
57 views

Execution time/cost of function in assembly

I have a query calling XmlTransform from Microsoft.MasterDataServices.DataQuality on about 1000 rows or so and it takes 30s to do the whole set (the XSL is in a fixed variable), is there any way to ...
user avatar
  • 6,592
2 votes
0 answers
38 views

Extended Event Failing To Capture Intent Locks

I have a SQL server with many unused databases and followed the linked article to set up an extended event to track intent locks and identify which DB's are actively being used, and which aren't and ...
user avatar
  • 143
0 votes
1 answer
40 views

TSQL to Extract Time Value and Reformat while excluding non numbers eg 'Apr 2 2018 12:36PM' to '1236'

I have an nvarchar field which contains Date and Time data in the format 'Apr 2 2018 12:36PM' I need to extract the value as '1236'. While I have used combinations of substring and right I still need ...
user avatar
0 votes
0 answers
59 views

Accounting Program Loses Connection to SQL Server Database

We have an accounting system that uses SQL Server 2012 and every now and then we lose connection to the SQL Server and can not access our accounting system. On the surface there appears to be no ...
user avatar
0 votes
1 answer
39 views

How can I group / display same date data in one row?

I have a table that gets inserted into every night that is a snapshot of the data. At any point in time, the data might change in the columns (AccountNo stays the same, RunKey is incremented by 1, and ...
user avatar
  • 15
1 vote
1 answer
16 views

Publication Properties window in SSMS hung when attempting to update

We have a SQL 2012 Database that is mirrored. It also has one publication with 3 subscribers. After a problem occurred (a view that couldn't replicate) during a snapshot push to one of the ...
user avatar
2 votes
0 answers
92 views

SQL Server full text indexing shows considerable increase in logical IO after upgrade from 2008 R2 to 2012

Summary I have two vanilla SQL Server instances running on identical (Win2012) VMs, one is SQL Server 2008 R2, the other is SQL Server 2012. I run the same DDL script on each to create a single DB ...
user avatar
2 votes
2 answers
34 views

Microsoft SQL Standard 2012 DB recovery without .BAK file?

Morning, I'm posting for some guidance on an issue we're up against. We had a server crash and don't have .BAK file for our SQL DB (the backup/images failed). Anyhow, we DO have a file level backup of ...
user avatar
  • 21
3 votes
1 answer
171 views

How to reverse only English words?

I've an nvarchar column with English and Hebrew letters in some fields. In the fields where the English and Hebrew are together, the English letters are in reverse order (this is how the ERP program ...
user avatar
  • 81
0 votes
1 answer
45 views

I want to pull a report from multiple sql servers, where the Database owner and job owner is not SA

I want to pull a report from multiple sql servers, where the Database owner and job owner is not SA. I need a report from a Central monitoring server, if the database owner and job owner is not SA, I ...
user avatar
0 votes
1 answer
51 views

If Primary Data Centre DC1 goes down how to activate secondary DC2

We are planning to activate our secondary DC2 site and bring down our primary Data Centre DC1. We have three node cluster with AG's ON. Two nodes SQL07P & SQL08P which are in automatic failover (...
user avatar
  • 1

1
2 3 4 5
91