Quantcast
Channel: SQL Server Database Engine forum
Viewing all 12963 articles
Browse latest View live

SQL2017 Linked Server to Azure SQL (PaaS)

$
0
0

Hello, 

I've setup a linked server from SQL 2017 (IaaS) using a SQL authenticated account with the target being a Azure SQL database (PaaS)  and it works fine, I can query this remote PaaS using four-part naming convention.  

I've now tried using AD authentication as my local VM (SQL) and the PaaS are in the same domain, however this throws an error saying 

Windows logins are not supported in this version of SQL Server. (Microsoft SQL Server, Error: 40607)

I know the PaaS can accept connections from my SSMS and I can see the user is valid in the PaaS.  So I wonder, is this not possible using AD authenticated accounts or am I missing something. 

I have tried the account as domain\user and user@domain.com, neither of these work. 

 

Azure SQL Managed Instance xp_cmdshell 'unsupported' or simply won't work?

$
0
0

Hi

Looking to move to a SQL Managed Instance and establishing what changes we'll need to make to our internal monitoring code and see that xp_cmdshell is unsupported in MI does this mean it will work still but isn't supported or it simply will not work in a MI?

...asking here as opposed to Azure forum as there isn't a MI section as yet!

Thanks

The limitation to 16 logical processors for the Standard edition of SQL Server, does it impact the number of "Work Threads"?

$
0
0

I have a server with 128 logical processors, 64 bits server, and with a Standard edition of SQL Server 2014, and my question is this:

Considering that SQL Server connects an ERP with a high number of simultaneous connections (approximately 1,000), and the characteristic "Maximum calculation capacity" for each of the editions of SQL Server, the standard edition indicates 16 logical processors as the maximum supported, I understand that this has an impact on the "Workers Threads", that is, instead of supporting "4480", it is using only "704". Is what I'm saying about Workers Threads correct?

I leave the links with the features of SQL Server, and the configuration on the "Work Threads":

Thanks in advance.



BCP from X server table to Y server table

$
0
0

Hi Guys,

We want to BCP view from x server to y server what would be t-sql query?

any specify configure to be changed to make sure BCP works, we want to use Service account, Let know if we need to provide any folder access permission for Bcp?

Is below approach the only option?

exec xp_cmdshell ‘BCP “SELECT * FROM \\ServerPath\FolderPath\FileName.dat WITH(NOLOCK)  WHERE  Condition”  queryout “\\ServerPath\FolderPath\FileName.dat” -T -c -t -r’

exec xp_cmdshell ‘bcp DBName.SchemaName.TableName in “\\ServerPath\FolderPath\FileName.dat” -T -c -t -r’

Regards,

Navin


Navin.D http://dnavin.wordpress.com

Always on AG's

$
0
0
Hi All,

Using Server 2012 Enterprise Edition.
We have 2 node Availability groups for high Availability purpose. One node as primary and one for secondary.
Now the plan is to have a DR setup which is a standalone sql instance which is remotely located.
Can we setup log shipping between an AG and a standalone sql instance? if it is possible, where will be log shipping jobs gets created?
What are the things do we need to take care of?

Thanks,
Sam

How to open SQL.mdmp

$
0
0

I have a SQL mdmp copied out.

and when opening with windbg there is error , any hints

Design Preview ( data tool design view VS Browser view)

$
0
0

team,

constructed and design one SSRS report using sql Datatool,

but the design part,


while check in datatool preview it shows correct fit , 


while check in browser it shows gap between two boxes (highlighted in YELLOW)

how to align all boxes in equal and fit in screen ?

Installing SQL Server 2019 on Linux side-by-side with 2017?

$
0
0

The release notes say side-by-side installations are a new feature of SQL Server 2019 on Linux, but when I followed the install instructions, version 2019 was installed and 2017 removed automatically.  I don't see any other instructions such as specifically for installing side-by-side versus nuking earlier installs.  I'm running RHEL 7.6.

The install command for both versions is the same: yum install mssql-server.  However, since there are two yum repos for 2017 and 2019 preview, each version has its own package.  For example: mssql-server-14.0.3162.1-1.x86_64 for SQL Server 2017 and mssql-server-15.0.1700.37-2.x86_64 for SQL Server 2019.  But, both packages install the same file names in the same locations such as the database engine file /opt/mssql/bin/sqlservr.  Well, since there's only one location and the file names don't have version numbers, how do we run two or more versions side-by-side?  (Yes, I checked /etc/alternatives, but I found nothing for sql).


sqlservr.exe process shows suspended in task manager

$
0
0
I was reviewing Task Manager and notice that I have 2 sqlservr.exe processes running.  One has a high PID number (260132) and the status shows suspended.  My SQL Server is up and running and everything looks fine.  I'm not sure what this process is for.  Anybody seen this before or know how to track this down?  I only have 1 instance on this system.

SQLServer 2016 AlwaysOn Availability Group and Service Broker Queue Issue

$
0
0

All,

We are having Availability Group issues on our SQLServer 2016 Production environment which we have been able to recreate successfully in our Development & Staging environments also.

The problem is related to the Service Broker Queue and AlwaysOn Availability Group (AAG). For some reason, the Queue gets disabled and when we re-enable the Queue sqlserver creates crash dump and makes the AAG unstable putting in Resolving state and putting the user database in “Not Synchronizing“ state. Eventually the database becomes unavailable and the Queue shuts off (disable).  The SQLServer was initially on SP2+CU4 and on Development/Stage we applied CU7 hoping that it would address the issue but it did not.

We created a Microsoft ticket and they asked us to disable Sophos (reboot after disabling) and re-enable the Queue but the same problem persists which means Sophos is not the cause.

Has anyone come across this issue or can point me in the right direction.

rgn

Microsoft SQL Server 2016 (SP2-CU7) (KB4495256) - 13.0.5337.0 (X64)  May 16 2019 02:24:21   Copyright (c) Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2012 R2 Standard 6.3 <X64> (Build 9600: ) (Hypervisor)

Nonqualified transactions are being rolled back.

$
0
0
We have a nightly SQL job that have the following commands.

ALTER DATABASE [MyDB]SET SINGLE_USER
WITH ROLLBACK IMMEDIATE 

Most of the time, it runs without any problem. However, sometimes, we got the following error:
 
Executed as user: domain\domainuser.
Nonqualified transactions are being rolled back. Estimated rollback completion: 100%. [SQLSTATE 01000] (Message 5060)  Database 'MyDB' is already open and can only have one user at a time. [SQLSTATE 42000] (Error 924).  The step failed.

Is there anything we can do?

Thanks,

Suspended Status transactions blocking by itself

$
0
0

Hello,

I have SQL Server 2016 Always On Cluster. There are 3 nodes on cluster. One of node has asynchronous connection (DR) other two nodes has synchronize connection. I have 90+ databases on 9 availability groups. These databases replicating to node2 synchronise and node 3 async.

I 'm receiving "The Percentage of Worker Threads used (100)%" alarm mesage from my monitor tool every day. I  have also executed the command "sp_who2", it returned results like some trancastions blocked by itself, because same transaction is running more than 20 in paralell. You can see results below. So they block itself.

What do you think that to have paralel suspended sessions blocked by itsef in SQL Server instance. Is it normal?

Microsoft.ACE.OLEDB.16.0 provider is not registered on the local machine. (System.data)

$
0
0

Trying to import data from Excel is giving this message.

Office365 64-bit

Here's what I tried:

1) I installed the 64-bit Access database engine 2016

2) I tried the 2010 & 2007 versions as well

3) I reinstalled Office365

I'm out of ideas. What else could be going on here?

Merging two tables

$
0
0

Hi everyone

I have two tables with data for year. First table have data with date, item name, item type and data, other has similar structure.

I wanted to merge these tables by date but with different conditions for each table.  I tried this approach:

select 
month(a.date), 
sum(a.date),
sum(b.data) 
from table1 as a

left join table2 as b on b.date=a.date and b.item_type = 'type_for_table2'

where a.item_type = 'type_for_table1'
group by month(a.date)

However, I got wrong data. How I can merge them?

Regards,

Yerkhan

Database log file and two volumes.

$
0
0

Hi everyone!

  We have two storage volumes, one faster than another. Where should we put the database log file?

Thanks.


Doria


sp_OACreate failing sometimes

$
0
0

Can anybody help me on this issue?

I have jobs calling stored procedures where sp_OACreate is used, and sometimes jobs are failing with the following error:

[SQLSTATE 42000] (Error 262)  sp_OACreate has not yet been called successfully for this command batch. [SQLSTATE 42000] (Error 10019)  Error whilst opening the File System Object

This happens once in a while, but calling stored procedure from Management Studio works.

Multiple instances of CDC on same DB?

$
0
0

SQL Server 2014 on Windows 2012 R2.

We have a database in production that is using Oracle Golden Gate Replication to replicate to a reporting DB.  Oracle GG uses CDC (Change Data Capture) to implement replication.  I also want to use CDC for my own synchronization tasks.  I'm guessing that I shuoldn't mess with the Oracle GG created cdc schema objects.  Can I implement another CDC implementation in addition to the existing one?

For some background, I'm looking at a horizontally filtered synchronization system that will grab incremental changes after the initial filtered extract and load.  Essentially, its a sharding system.

TIA,

-Peter

SSRS report - with dynamic email configuration sql 2016

$
0
0

team,

how to change this email configuration dynamically, instead of wizard interaction. in Report server configuration,

i need to send reports  with 2    sender address  ,  first 15days  using donotreply@xyz.com,  then next 15days using reply@xyz.com.

as of now i just manually change this report server configuration wizard.  is it possible to do in automated process?

  

Limit CPU consumption for a scalar function

$
0
0

I have a scalar-valued function that takes up too much of CPU. I want to limit this function to only use no more than, say, 10% of the CPU. How can it be done?

Below is that function:

CREATE FUNCTION [dbo].[CallWebAPI]
(
	@Url VARCHAR(MAX)
)
RETURNS VARCHAR(MAX)
WITH EXECUTE AS OWNER
AS
BEGIN
    DECLARE @Object AS INT;
	DECLARE @ResponseText AS VARCHAR(8000), @Source VARCHAR(2000), @Desc VARCHAR(2000)
	DECLARE @R VARCHAR(2000)

	EXEC sp_OACreate 'MSXML2.ServerXMLHTTP.6.0', @Object OUT;
	EXEC sp_OAGetErrorInfo @Object, @Source OUT, @Desc OUT
	EXEC sp_OAMethod @Object, 'setTimeouts', NULL, 3000, 3000, 3000, 3000
	EXEC sp_OAMethod @Object, 'open', NULL, 'get', @Url, 'false'
	EXEC sp_OAGetErrorInfo @Object, @Source OUT, @Desc OUT
	EXEC sp_OAMethod @Object, 'send'
	Exec sp_OAMethod @Object, 'responseText', @ResponseText OUTPUT
	EXEC sp_OADestroy @Object

	RETURN @ResponseText
END
GO

Problem with MSDTC

$
0
0

I've got several instances of sql server on the same windows machine.

I try to configure MSDTC to work correctly with distributed transaciton.

When I try to 

BEGIN DISTRIBUTED TRANSACTION;

SELECT * FROM SERVER1.DATABASE1.dbo.TAB1;

I get following error:

Location:viperrm.cpp:1748
Expression:!m_irm && !m_idtm && !m_rmSink && !m_tmAddress && !m_iti && !m_ittf && !m_itrf
SPID:53
Process ID:4768
Msg 596, Level 21, State 1, Line 1
Cannot continue the execution because the session is in the kill state.
Msg 3624, Level 20, State 1, Line 2
A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support.

Do you have any recommendations what to check? Also how MSDTC should be configure in this scenario.

Viewing all 12963 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>