Questions tagged [sql-server]

All versions of Microsoft SQL Server (not MySQL). Please also add a version-specific tag, like sql-server-2016, since it is often relevant to the question.

Filter by
Sorted by
Tagged with
0
votes
3answers
95 views

SQL Server - Login failed. The login is from an untrusted domain and cannot be used with Windows authentication [duplicate]

I am getting below error while trying to connect SQL from remote server. Local login is working fine. Can anyone help on this. Thanks in advance. "Login failed. The login is from an untrusted ...
1
vote
1answer
148 views

What is non-page data structure in SQL Server

I was monitoring one of the SQL Server in my client evnironment and I can see there is momentary blocking on SQL Server sessions with wait type as LATCH_EX and with wait resource as ...
0
votes
0answers
34 views

Decrypt the DSN section of RsReportServer.config file

The DSN section of the RsReportServer.config file contains the encrypted connection string to the PowerBI Report server databases. I noticed that the DSN string changes everytime I make any changes ...
0
votes
1answer
44 views

SQL Server Data Refresh

I need to be able to restore around 6TB of data from one MS SQL 2008 instance into another SQL Instance. DBA's and backup folk are estimating between 36 and 48 hours for the restore. I can't afford ...
3
votes
2answers
238 views

SSRS Azure SQL Database Active Directory - Universal with MFA

Does anyone know when support for Active Directory - Universal with MFA will be included in Reporting Services? It's available in SSMS. Visual Studio 2017 Data Source Properties Reporting Server ...
0
votes
0answers
32 views

BCP cannot read table created in the same transaction when executed from Control-M

How to export global temp table using BCP when original process locks table for BCP? We created our own exporting procedure where we provide SELECT or table_name and procedure stores data to global ...
5
votes
1answer
97 views

Why MS SQL bigint type is implicitly mapped to float64 python type, and what is the best way to handle it? [closed]

Python integer type has unlimited precision so it is more than capable to hold a bigint value of MS SQL (64 bit). Still it is implicitly mapped to float64 python type, when passed to an external ...
0
votes
1answer
331 views

how to install mssql on to ubuntu

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Can't open lib '/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.2.so.0.1' : file not found. pugazhl@pugazhl-LIFEBOOK-LH532:~$ # sqlcmd -S ...
1
vote
1answer
217 views

Different Date format in predicate when comparing against a date or datetime

I have the following query: SELECT CAST(MyDateTimeCol AS DATE) AS MyDate, Col1, Col2 FROM MyTable WHERE MyDateTimeCol >= '2019-11-25' AND MyDateTimeCol < '2019-11-26' ...
0
votes
1answer
89 views

The connection is no longer usable because the server response for a previously executed statement was incorrectly formatted

One of our application AX2013 is connecting to our DB's in an Availability group spanning three SQL2016 nodes. End users are getting some error in the application that always point to the same error ...
1
vote
1answer
835 views

INSERT/SELECT xml column from one table to another

First off I apologize for asking a question I'm sure is well answered, however I cannot quite understand what I'm reading. I have an existing table with an xml column. I have a second table with the ...
0
votes
0answers
55 views

SQL Server lose a days worth of Transaction [closed]

I've written an application using Dev XAF for a client and the client had a program, which I removed, called Macrium Reflect I assumed was doing a mirror copy from 1 hard drive to another. The first ...
1
vote
1answer
8k views

Non-yielding Scheduler Error with dump caused by heavy queries on SQL 2016

After bringing our databases to new servers with new hardware and new os (2012 server) and new SQL Server version (2016 sp1) we face the following issue: During nightly reporting database update runs,...
6
votes
3answers
2k views

Recommended mirroring alternative?

SETUP 2 Amazon EC2 SQL 2014 servers in different availability regions. Synchronous mirroring S3 for archiving full backups & logs at night Right now for simplicity, nightly full compressed ...
1
vote
1answer
126 views

Configure Connection String to Use Target Machine Credentials

I am trying to develop an SSIS package that will be run on several different machines. I am stuck because I do not understand how to create a connection string that doesn't explicitly point to one ...
2
votes
2answers
48 views

MSQL - Switching rows to columns

I've been stuck on the following for quite a while, it seems like it should be relatively simple but I can't quite get my head round it.
1
vote
3answers
53 views

Microsoft SQL Server 2016 Restore command many files

I have a question regarding proper syntax for restoring a 2016 SQL Server database. One database 1 mdf no issue. But I need to restore a database that has 3 mdf files and 73 ndf files and then apply 2 ...
5
votes
3answers
49k views

Select MIN value from multiple columns

I have a very basic database for keeping track of point scores for 6 different events. Each event has 4 events within it. My Current SQL query is very basic, and looks very similar to what is below; ...
0
votes
1answer
229 views

SQL Job Fails Logging In to Integration Services

I have a SQL Server 2012 where all databases are set up in instances. I created a DTS package that accesses a table in a database, let's say MyDB\MyInstance and CSV files in a network folder. ...
0
votes
1answer
1k 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 ...
0
votes
2answers
29 views

How to update the time of each row and check if its updated or not

Name Time Status T1 9/12/2020 12:12:09 expected T2 8/06/2020 11:09:12 expected These are table name and updated time in the DB I want to get the status and time of updation of specific tables .Set ...
5
votes
2answers
2k views

SQL Server Wildcardless LIKE Optimization

In a web application using SQL Server 2008 R2 as the backend, I have several fields, that if present, add WHERE clauses to the query. If I was to have all queries generated as like clauses, such as: ...
1
vote
1answer
287 views

Best way to transfer a few tables from reserve server to production

We have two MS SQL Servers (2012 Standard Edition on Windows 2012 Server) which are located in the same subnet. One is production server. Another is reserve server. Currently there is a ...
0
votes
1answer
225 views

How to create multiple azure sql database in an elastic pool using powershell script?

I want to create a sql server and deploy the elastic pool on that server. Then create multiple azure sql database in that elastic pool using powershell script.
-2
votes
1answer
27 views

Exception Message: Unable to connect to the remote server

I am trying to backup a database in azure storage and I keep getting the below messages Msg 3271, Level 16, State 1, Line 1 A nonrecoverable I/O error occurred on file "azure storage backup ...
1
vote
1answer
41 views

sql command utility version is not working

I have two versions of SQL Command Utility installed on my system as mentioned below(I checked the versions by going to Control Pannel->ProgramsandFeatures). Microsoft Command Line Utilities 11 ...
0
votes
1answer
20 views

Reverse-proxy for SQL Server

Context: For our testing environment, we were migrating from on-premise SQL Server 2017 to Docker Linux SQL 2017 container. There is a large number of TestScripts in windows that try to connect to ...
0
votes
1answer
49 views

Cannot fetch a row from OLE DB provider “SQLNCLI11” for linked server

I have two SQL Servers on two different machines somewhere in the cloud (maybe Azure). One is Microsoft SQL Server 2012 (SP3-CU10) (KB4025925) - 11.0.6607.3 (X64) Jul 8 2017 16:43:40 Copyright (c) ...
-1
votes
2answers
58 views

SQL used memory exceed to its max memory [duplicate]

I have 32GB server running a SQL Server instance and I have set the max server memory to 22 GB which is 75% of the total memory. What is the reason for SQL Server to exceed its allocated max server ...
7
votes
1answer
199 views

Missing rows under read committed isolation

It's well known that Read Committed isolation is prone to different anomalies. I read a great Paul White's series on isolation levels (the one relevant to the discussion is this one: https://...
0
votes
2answers
46 views

What could be the reason for shrinking the transaction log file before and after the database backup?

I'm an accidental DBA. I'm the only person in a company who has some experience with SQL Server and I have to deal with a system inherited from another company after it was acquired. People who ...
0
votes
1answer
103 views

Improving Speed of Cross Apply

I posted a question on how to create a relation between 2 tables based on a spatial field https://stackoverflow.com/questions/63769885/t-sql-passing-column-to-subquery-for-filtering The performance is ...
0
votes
1answer
948 views

powershell command enable-alwayson not work for SQL Server Named instance

Hi all, I installed a SQL server 2016 default instance and a SQL Server 2017 named instance (instance name is SQL17) on my Windows 2012 Server. I opened a powershell windows with administrator mode, ...
1
vote
1answer
378 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=...
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 ...
2
votes
2answers
1k views

SQL Server Internal Memory Error

I am using SQL Server 2016 Standard Edition that shows the following errors on DBCC CHECKDB and also on updating statistics. Version: Microsoft SQL Server 2016 (SP2-CU2) (KB4340355) - 13.0.5153.0 (...
1
vote
1answer
302 views

SQL Server - error running 'sp_addsubscription' when not sysadmin

Windows 2008 R2 MSSQLSERVER 2012 (SP1) Standard When running sp_addsubscription under account within db_owner role of both user and distribution databases, I get the following error: Msg 14260, ...
0
votes
2answers
68 views

Best way to copy tables without a primary key or unique constraint?

Looking into synchronizing tables in a database across multiple servers using a DML method like MERGE, only to realize that some of the largest tables that take up the majority of the total size of ...
1
vote
1answer
794 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
524 views

Mirroring issue with mirror server

I am running two Windows Servers 2012 R2 with SQL Server 2014 Standard Edition. I have strange issue on mirroring. I configured mirroring on for 15 databases, no Witness server. The Principal server ...
9
votes
1answer
241 views

2019 Enterprise - NOLOCK without NOLOCK, page latch time-out on tempdb and finally a dump

We have a very strange problem with a new SQL Server 2019 on 2 new physical machines: Infrastructure: Starting a new installation of SQL Server 2019 Enterprise (15.0.2000.5 / X64 on Windows Server ...
1
vote
1answer
25 views

SQL Server Secure and Unsecure Traffic Configuration Help

I have a SQL Server 2017 instance that I have configured to listen on multiple ports 1433 and 1234. I would like to know if its possible to have one port (1234) accept only secure connections while ...
26
votes
18answers
69k views

How can I compare the schema of two databases?

Is there a way to find the differences in two SQL Server databases (schema only). One is local and the second is at a customer's site. We are experiencing problems with crystal reports running some ...
0
votes
1answer
101 views

SQL Server 2019 - Polybase -> Cosmos DB (MongoDB Mode) Error with dates

I'm new to polybase. I have linked my SQL Serer 2019 to a third parties Azure cosmos and i am able to query data out of my collection. I am getting an error out when i try to query date fields though. ...
2
votes
1answer
681 views

DPM transaction log backups of SQL Server partially contained databases

I am trying to use Microsoft System Center Data Protection Manager (DPM) 2016 (5.0.342.0) to protect SQL Server 2017 Standard CU8 (14.0.3029.16) on Windows Server Std 2016. I have a named instance ...
9
votes
2answers
256 views

Microsoft SQL Server 2014 Nested From Query in Cross-Apply

When selecting from a nested query in an OUTER APPLY statement the nested query seems to be evaluated only once in certain circumstances. Bug reported to Azure Feedback Forum: https://feedback.azure....
0
votes
1answer
285 views

How can I create a readable/writable clone of a log shipped standby/read only database?

I need to take adhoc copies of a development database (on SQL Server 2005) to another SQL Server and be able to read/write to that cloned database. As the SQL Servers are in different data centres, ...
-2
votes
1answer
22 views

Query that flattens many tables, but now want to concatinate one set of strings into a single string [closed]

I have an SP that flattens a bunch of tables. I recently refactored so that instead of a single description in one table I now have a one to many relationship with a descriptions table. I can inner ...
1
vote
1answer
198 views

SQL Server 2014 AG Listener

I have built a two node SQL Server 2014 Always On cluster on the same subnet. I need to create two availability groups/listeners in the same instance for two sets of databases. Do I need two separate ...
3
votes
3answers
149 views

Error 297, Severity 19 trying to create new table as sysadmin

I am completely scratching my head right now. I have two database instances that I am trying to add a table to, and both give me the same error: The user does not have permission to perform this ...