Viewing 15 posts - 271 through 285 (of 7,191 total)
Jo
A query (or certainly one that doesn't involve a remote server) will never time out - it will be the application that kills it, not SQL Server. You need to...
December 19, 2019 at 9:14 am
Good point. I don't know whether this would work, but you could try creating a stored procedure that calls sp_update_job with the @owner_login_name parameter, and give your login permission to...
December 18, 2019 at 4:42 pm
What you have provided doesn't help me to test the code I wrote. CREATE TABLE and INSERT statements are easier for us to work with and hence will get you...
December 18, 2019 at 3:42 pm
You can't store a whole column in a scalar variable. Since you haven't provided table DDL and sample data, this is not tested:
SELECT
DATEPART(week, CONVERT(datetime,filedate))
,COUNT(*)
FROM TableUpdateStats
GROUP BY DATEPART(week,...
December 18, 2019 at 10:31 am
You could try using xp_cmdshell instead of SQLCMD mode, something like this:
DECLARE @cmd varchar(500);
DECLARE @Script varchar(200) = 'X:\MyFolder\Ola.sql';
SET @cmd = 'sqlcmd -E -S ' + @servers +...
December 18, 2019 at 10:20 am
Sam
Have a read about SQL Server Agent Fixed Database Roles - I think that's what you need here.
John
December 18, 2019 at 10:03 am
An interesting problem, because you need to group/partition by team and categories to get each team's sales figures per category, and then just by team to get the top categories...
December 18, 2019 at 10:01 am
If you could show us some DDL and sample data for the CDR table, and some examples of the output you'd like to see, it would be easier to help...
December 18, 2019 at 9:56 am
There's no such thing. You should set the autogrowth for each database based on a number of factors, including, but not limited to:
December 18, 2019 at 9:51 am
If you're going to allow NULLs in your data then you need to handle them where they occur. Try changing the penultimate line like this:
and COALESCE(x.Ordering_Dealer_ID_Prev,0) =...
December 18, 2019 at 9:39 am
Yes, we have automated test restores and DBCC checks running constantly. That's for native backups. Unfortunately some of our databases are backed up with a SAN-based snapshot technology, which we...
December 16, 2019 at 4:27 pm
You can't use SSMS 2005 to connect to SQL Server 2008 R2. Why would you want to? Download the most recent version from the Microsoft website. (I suspect the same...
December 16, 2019 at 1:36 pm
What do you want the output to look like when an individual has three or more addresses?
John
December 16, 2019 at 9:42 am
as1981 is right - there is nothing to link the server name to the tool name. A table is an unordered set, so SQL Server can't assume that "VM" goes...
December 13, 2019 at 4:26 pm
Viewing 15 posts - 271 through 285 (of 7,191 total)