Track Data Changes (SQL Server)

Works for SQL Server starting with 2008. Enable change data capture for a database: EXEC sys.sp_cdc_enable_db GO Check if it is enabled: SELECT [name], database_id, is_cdc_enabled   FROM sys.databases WHERE is_cdc_enabled = 1 GO Enable change data capture for a table: EXEC sys.sp_cdc_enable_table @source_schema = N'dbo', @source_name= N'MyTable', @role_name= NULL, @filegroup_name = N'CDC', @supports_net_changes = 0 GO Check if table is tracked: SELECT [name], is_tracked_by_cdc   FROM sys.tables WHERE is_tracked_by_cdc=1 GO Select changes: select * from [cdc].SchemaName_SourceTableName_CT Cleanup tracked changes: EXECUTE sys.sp_cdc_change_job     @job_type = N'cleanup',     @retention = 2880;  


Debugging Oracle PL/SQL procedures using SQL Developer

1. Start SQL Developer and connect to DBMS.2. Grant:GRANT DEBUG CONNECT SESSION TO some_user;GRANT DEBUG ANY PROCEDURE TO some_user;3. Start remote debug, enter Port and IP address which is accessible from DBMS.4. Execute "execute DBMS_DEBUG_JDWP.CONNECT_TCP('your ip',4000);".5. Select procedure, add breakpoint, compile for debug.6. debug procedure (ctrl+shif+f10), enter IP if needed.


End of content

No more pages to load