Comments
Sort by recent activity
yes you can create a synonym which points at a system object ; but obviously you need to give the synonym a different name so that it doesn't clash with the name of that system object on the referencing database. USE [tempdb] GO CREATE SYNONYM systables FOR sys.tables go SELECT TOP (1) * from systables DROP SYNONYM systables GO CREATE SYNONYM systables FOR master.sys.tables go SELECT TOP (1) * from systables DROP SYNONYM systables / comments
yes you can create a synonym which points at a system object ; but obviously you need to give the synonym a different name so that it doesn't clash with the name of that system object on the refere...
No i don't think you can synonym a system object but you could encapsulate that reference in your own view. When your developer changed wanted to change the particular dataset he was referencing locally he could then amend the local view only rather than the procedure : therefore code comparison of the procedure would show only the code differences you wanted to focus on. I now try and adhere to the rule of not explicitly referencing a separate database from my codebase - especially now that SQL Prompt code analysis flags when i do - and always make cross database references via synonyms. So in your example if your production code in the first place didn't have the cross db reference
( MyStaging.sys.tables ) but instead referenced your own view (MyStagingSysTables as select * from mystaging.sys.tables) then when the developer wanted to repoint locally they wouldn't change the proc they would change the view (of course, this would mean all other objects referencing the view would be repointed too, but this would be only on their local db) This doesn't solve the exact issue you want to in ignoring specific text, but does alleviate the need to, so your code comparison just flags up the changes you want to focus on. Also means when you approve the changes the developer doesn't need to then amend all their bastardised/personalized object references. Like i say, just the way I navigate round your issue.
/ comments
No i don't think you can synonym a system object but you could encapsulate that reference in your own view. When your developer changed wanted to change the particular dataset he was referencing...
Just a suggestion but I get round a similar problem by using synonyms. if i need a separate version of my codebase to point to a separate dataset then i will set up MyGoodData_ab and MyGoodData_cd wherever there are but have the realname of the object as a synonym pointing to the dataset i want to use. When i then run a code comparison on the proc i will therefore pick up only logic changes. NB: do need to keep track of what synonyms you have set up and only deviate where they point on non-production databases / comments
Just a suggestion but I get round a similar problem by using synonyms. if i need a separate version of my codebase to point to a separate dataset then i will set up MyGoodData_ab and MyGoodData_cd ...
And within dynamic sql I tend to remove whitespace in the query to reduce the length of the overall text so would have text as JOIN[dbo].[MyTable] : Searching for [dbo].[MyTable] doesn't find such instances with the match whole words on. But if i were to search for MyTable then i would get additional results i may not want for MyTableId (column including the search test) or MyTableExtension (a different table that contains the search text) / comments
And within dynamic sql I tend to remove whitespace in the query to reduce the length of the overall text so would have text as JOIN[dbo].[MyTable] : Searching for [dbo].[MyTable] doesn't find such ...
if you have same table name on different schemas then you cannot use the match whole words for the table-name as you need to include the schema, and then the search will return only the results for the single specified schema / comments
if you have same table name on different schemas then you cannot use the match whole words for the table-name as you need to include the schema, and then the search will return only the results for...
Thank you : that's back working for me now. / comments
Thank you : that's back working for me now.
Thank you Rob : driving me mad so good to know it's going to be addressed. / comments
Thank you Rob : driving me mad so good to know it's going to be addressed.
Hi Richard, Thanks for your prompt reply I'm on V3.1.5 so i will look to update over the weekend and get the benefit of this change. / comments
Hi Richard, Thanks for your prompt replyI'm on V3.1.5 so i will look to update over the weekend and get the benefit of this change.
Hi Torsten, I for one have adopted the strategy of posting question and submitting request if I find what i think is a bug - the question might make other users aware of it and the request should get it looked at quicker. I can't always find my support list so rely on the links in the emails that get sent, but when you ask a question it does give an option to send a ticket [image] https://productsupport.red-gate.com/hc/en-us [image] / comments
Hi Torsten,I for one have adopted the strategy of posting question and submitting request if I find what i think is a bug - the question might make other users aware of it and the request should ge...