May 26, 2022 at 6:00 pm
Hello,
Looking for a guidance to form a script to extract a specific substring (change tables) from a sql server table column and put them to another table to know the distinct tables.
Here is the task which I'm performing:
So captured through extended events all the strings which has the extended events. Now have to read from the statement table to identify the distinct change tables and put into a table so that would know the distinct tables are part of the change tracking.
Now, the statement columns many have multiple change tracking tables, so need to maintain a history or some mechanism to loop through the entire string.
If anyone has written similar script or used/any guidance please provide.
Thanks.
May 26, 2022 at 8:42 pm
Not exactly clear what you're trying to do yet...
Are you talking about SQL Server's built-in change tracking, or some custom-built approach?
If built-in, and you want to identify the distinct change tables, you could just use something like the following -- not clear why you'd need to refer to extended events
SELECT
OBJECT_SCHEMA_NAME(object_id) AS SchemaName,
OBJECT_NAME(object_id) AS ObjectName,
*
FROM sys.change_tracking_tables
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy