New answers tagged

1

For those like me who got here from Google: pscp now has a -hostkey option which can be used like this: pscp -P 22 -hostkey "ssh-ed25519 255 aa:bb:cc..." ... This eliminates the need for an interactive PuTTY session to store the host key. Here's what the documentation has to say: -hostkey key Specify an acceptable host public key. This option may ...


0

I also could not find the plan until I come across this script, which finds the exact sql statement which originated that warning: Declare @ErrorLog Table (LogID int identity(1, 1) not null primary key, LogDate datetime null, ProcessInfo nvarchar(100) null, LogText nvarchar(4000) null); Insert Into @ErrorLog (LogDate, ProcessInfo, ...


0

use UNION instead of UNION ALL in this way: SELECT DESCRIPCION AS nodeText,'DEPA' + CAST(IDDEPARTAMENTO AS VARCHAR) AS nodeKey,''AS nodeParentKey FROM DEPARTAMENTO UNION ALL SELECT DESCRIPCION AS nodeText,'PROV' + CAST(IDPROVINCIA AS VARCHAR) AS nodeKey, 'DEPA' + CAST(IDDEPARTAMENTO AS VARCHAR) AS nodeParentKey FROM PROVINCIA UNION SELECT DESCRIPCION AS ...


1

There is a chance if the answer to all the below questions is NO Was the database name exactly identical in Prod and Dev? When restoring Database A on the Dev server, did you explicitly choose to move the data and the log files to the same path (and overwrite them) where the original dev Database A resided? Did you drop database A on the Dev box before ...


0

Even if you manage to accomplish EXEC master.dbo.sp_addlinkedserver and EXEC master.dbo.sp_addlinkedsrvlogin, you will face another problem: you won't be able to use OPENROWSET or OPENDATASOURCE unless you're a database administrator. You can create a registry setting on the database server that enables this AdHoc functionality.


7

Use datetime strings in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.mmm] YYYYMMDD[ hh:mm:ss[.mmm]] To use the ISO 8601 format, you must specify each element in the format, including the T, the colons (:), and the period (.) that are shown in the format. The brackets indicate that the fraction of second component is optional. The time component is specified in the ...


0

I also did search answer for similar problem and found solution from here: SQL Server Agent Job - Schedule daily except 1 day per month. Solution: I did create one more TSQL step and made it the first one to run. In the new step add something like this (change DATEPART logic as you need): IF DATEPART(weekday, GETDATE()) = 7 AND CAST(GETDATE() AS time) ...


3

My question is how can I check what in TempDB if it is would have caused this spike? To analyze what impact those queries have on tempdb you could use sp_whoisactive since one of the info it outputs is the use of tempdb: The most confusing of these columns are those related to tempdb. Each of the columns reports a number of 8 KB pages. The [...


1

My suggestion is to switch to SSIS packages that can handle this in a better way, with buffers at source and at destination, faster than linked servers. Please take a look at this: https://social.technet.microsoft.com/wiki/contents/articles/30703.ssis-implementing-a-faster-distinct-sort-or-aggregate-transformation.aspx


1

I assume ManyManyColumns is really multiple columns and not one column?...I see your comment states it's 110 actually. 10,000 rows is the default cardinality estimation for a Remote Scan operation in your version of SQL Server, so I don't think you can do much to change that, unfortunately. How slow is slow currently? Keep in mind even with perfectly ...


Top 50 recent answers are included