Create a new database in SQL Add a new table and log the start time of each step there

I want to create a logic to

Create a new database in SQL Add a new table and log the start time of each step there.

can someone help me to create this logic

@imumeriqbal

Create db must be done manually…

Then you can use connect to connect to the db

And then use execute non query to create table syntax is same as any sql table

And then use insert query to insert the data as needed

Cheers

like I want to send log start time of each step there.

@imumeriqbal

User insert query… when ever you want to insert a new row into table using execute non query

Cheers

Hi @imumeriqbal

Try this-

  1. Drag and drop a “Sequence” activity onto the workflow.
  2. Inside the Sequence, add a “SQL Connection” activity to establish a connection to your SQL Server.
  3. Configure the SQL Connection activity with the appropriate connection details (server name, database name, credentials).
  4. Add a “SQL Execute” activity below the SQL Connection activity.
  5. In the SQL Execute activity, enter the SQL script to create the new database:

CREATE DATABASE YourDatabaseName;

  1. Add another “SQL Execute” activity below the previous one.
  2. In the second SQL Execute activity, enter the SQL script to use the newly created database:

USE YourDatabaseName;

  1. Add a third “SQL Execute” activity below the previous one.
  2. In the third SQL Execute activity, enter the SQL script to create the table for logging the start time:

CREATE TABLE LogTable ( StepNumber INT, StartTime DATETIME )

  1. For each step, add a “SQL Execute” activity after the previous one and set the SQL script to insert a record into the log table for that step:

INSERT INTO LogTable (StepNumber, StartTime) VALUES (StepNumberValue, GETDATE());

Replace StepNumberValue with the step number for that specific activity.

Thanks!!

i can extract the all information from here like activity name or execution


right

i am on 10th step now my question is how i can put all activty name in database