Jump to content

Clearing SQL database with Scribe

Roy Brandt

Recommended Posts

Recently working on a migration project using Scribe, we load big volumes of testdata in SQL staging tables, but when we want to clear the tables it takes a very long time to clear all records for reloading data.

Is there a quicker way to clear a SQL database table using Scribe without deleting records one by one

Link to comment
Share on other sites

1) With the Scribe Microsoft SQL Server Connector:

Use the "Native Query" Block with a double SQL statement and add "for each result Block", make sure you test and validate your native query and save your map.



DELETE FROM [dbo].[mytablename];


2) Alternatively, you can use storedprocedures(to clear the data faster)and call/trigger them from a Scribe map using

Scribelabs Tools connector Query block to trigger one scribe run with current timestamp then call the storedprocedureonce.


See Scribe Tools Connector documentation here:https://support.tibco.com/s/article/Scribe-Labs-Tools

See SQL Server Connector documentation on using Storedprocedures:https://help.scribesoft.com/scribe/en/index.htm#sol/conn/sqlserver.htm

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...