Hello Readers
How do you usually delete objects from repository?
- Navigate across tabs in "Local Object Library"
- Visually identify object names
- Hit delete button & click yes for delete confirmation
That becomes a tedious work if you have to delete hundreds of objects from thousands in the object library.
al_engine.exe became our super hero when we discovered that it can delete objects for us when provided with certain parameters.
Here is an example to delete a job with the name JOB1 which is in Microsoft SQL server repository:
"%Link_Dir%\bin\al_engine.exe" -NMicrosoft_SQL_Server -U<UserName> -P<Password> -S<HostName> -Q<databaseName> -XRJ@Job1
- Text in angular brackets are database logon information
- Red text is object type
- Blue text is object name
Based on the same pattern, command generator in excel can be built to delete many objects easily.
Formula in B9 is
="""%Link_Dir%\bin\al_engine.exe"" -NMicrosoft_SQL_Server -U" & $B$3 &" -P" & $B$4 & " -S"&$B$1&" -Q" & $B$2 & " -XR" & $B$5 & "@" & A9
Object types can be any of the following
Object Type | Object |
P | Project |
J | Job |
W | Workflow |
D | Dataflow |
T | ABAP Transform |
F | File format |
X | XML Schema or DTD Message format |
S | Datastore |
C | Custom function |
B | COBOL Copybook |
E | Excel workbook |
p | System Profile |
v | Substitution Parameter Configuration |
K | SDK Transform Configuration |
t | Table or Template Table |
f | Stored procedure or function |
h | Hierarchy |
d | Domain |
i | IDOC |
a | BW Master Transfer Structure |
b | BW Master Text Transfer Structure |
c | BW Master Transaction Transfer Structure |
e | BW Hiearchy Transfer |
x | SAP Extractor |
Object Name can be "datastore"."owner"."name" in case of objects contained in a datastore.
For example, table, stored procedure, domain, hierarchy, or IDOC.
Once commands are generated, we just have to copy all and paste it in command prompt.
Also note that the delete confirmation will not be asked. Object gets deleted as soon as command is executed.
Make sure you take repository backup before executing delete commands. Of course, al_engine can do it for you. Execute the below command to take complete repository back up in single ATL file "repo_export.atl" in %Link_Dir%\log directory.
"%Link_Dir%\bin\al_engine.exe" -NMicrosoft_SQL_Server -U<UserName> -P<Password> -S<HostName> -Q<databaseName> -X
Hope it helps you save your time and effort.
Cheers