Activity overview
Latest activity by Phil_Fact0r
(I'm only a FoRG, not a Redgate employee.) The Error handling system in a SQL Compare script is there to prevent the script from carrying on after an error. Generally, you really shouldn't want it to carry on. The option removes this system in the scripts that catches those errors that do not otherwise automatically stop the batch or the entire script from being executed. The idea is to ensure that even an apparently trivial error rolls the script back. Unfortunately, some SQL Server errors can't be caught this way. The only way to prevent more serious errors, up to level 20 stopping the script is to use a try...catch block for every block or batch, but even then, you won't catch all errors, and I doubt whether it would have caught the one you had. . An object name resolution error is not caught by the TRY...CATCH construct. / comments
(I'm only a FoRG, not a Redgate employee.) The Error handling system in a SQL Compare script is there to prevent the script from carrying on after an error. Generally, you really shouldn't want it ...
What Monitored Objects can be assigned to a group?
I've always just assigned servers to groups, but I read in the documentation that you can't assign instances to groups but you can assign a cluster. you can, of course assign a group. What other r...
I'll answer my own question about how to get a group. There is another Cmdlet called Get-SQLMonitorMainGroups that seems to do what I want. One then gets subgroups using Get-SqlMonitorSubGroups. I'm still mystified about what Get-SQLMonitorGroup does. / comments
I'll answer my own question about how to get a group. There is another Cmdlet called Get-SQLMonitorMainGroups that seems to do what I want. One then gets subgroups using Get-SqlMonitorSubGroups. I'...
Get-SQLMonitorGroup doesn't do what one would expect.
I have three groups, Staging, Development and ProductionYour documentation says this.... <div> -------------------------- EXAMPLE 1 --------------------------</div><div> </...
This should do it. Sorry about the quotename stuff. I hardly ever seem to use columns with illegal characters in them. I meant to add something clever that added the quotes only when necessary but never got around to it. This should work nicely
/**
Summary: >
This is a temporary batch for creating such things as table variable,
temporary tables or anything else that needs a column list
Author: Phil Factor
**/
Declare @TheExpressionNVARCHAR(MAX)=
N'$SELECTEDTEXT$'
SELECT 'DECLARE @$NameOfVariable$ table ('+
Stuff ((SELECT ',
'+QuoteName(Coalesce(DetectDuplicateNames.name+'_'+Convert(VARCHAR(5),f.column_ordinal),f.name))
+ ' '+ System_type_name + CASE WHEN is_nullable = 0 THEN ' NOT' ELSE ''END+' NULL'
--+ CASE WHEN collation_name IS NULL THEN '' ELSE ' COLLATE '+collation_name END
AS ThePath
FROM sys.dm_exec_describe_first_result_set
(@TheExpression, NULL, 1)AS f
-- use sys.sp_describe_first_result_set for a batch
LEFT OUTER JOIN
(SELECT name AS name FROM sys.dm_exec_describe_first_result_set
(@TheExpression, NULL, 0) WHERE is_hidden=0
GROUP BY name HAVING Count(*)>1) AS DetectDuplicateNames
ON DetectDuplicateNames.name=f.name
WHERE f.is_hidden=0
ORDER BY column_ordinal
FOR XML PATH (''), TYPE).value('.', 'varchar(max)'),1,1,'')+')' / comments
This should do it. Sorry about the quotename stuff. I hardly ever seem to use columns with illegal characters in them. I meant to add something clever that added the quotes only when necessary but...
Yes, it is certainly good to cater for those application developers who are more comfortable with a migrations approach, and Flyway is a popular system. I hope that Redgate continues to ensure that SCA offers give first-class features and support for the 'static' approach to database deployment, which is more popular with database developers / comments
Yes, it is certainly good to cater for those application developers who are more comfortable with a migrations approach, and Flyway is a popular system. I hope that Redgate continues to ensure that...
(Later) reinstalled the SCA in SSMS in its latest version. This time it worked when one hit 'refresh'. and produced a scripts directory just like the good old days. I generally use SQL Compare for this, but this could be handy. / comments
(Later) reinstalled the SCA in SSMS in its latest version. This time it worked when one hit 'refresh'. and produced a scripts directory just like the good old days. I generally use SQL Compare for...
I tried clicking the link but that is talking about Visual Studio, which I don't use. I have SQL Change Automation in SSMS. Does this do the same thing? I've tried starting a workspace and putting a development database in it but I can't find a way of generating the object-level scripts (I think you call this the offline schema model) / comments
I tried clicking the link but that is talking about Visual Studio, which I don't use. I have SQL Change Automation in SSMS. Does this do the same thing? I've tried starting a workspace and putting...
I'd still be grateful to know whether SCA will remain eclectic, and support conventional object-level scripts as well as migration scripts? / comments
I'd still be grateful to know whether SCA will remain eclectic, and support conventional object-level scripts as well as migration scripts?