spike [-<option> . . .]
Spikes (i.e. logical deletes) objects. See also srv4 spike.
Options
[-ids] <comma-separated database ids>
List of object id(s)
-code <spike code>
Code specifying the type of deleting
-conditions <string>
Name of the file or of the search configuration containing the search conditions used to select the objects to spike
-pars <list of name-value pairs in the format 'name1:value1;name2:value2...'; e.g. 'folderId:30;cmd:up' to define a 'folderId' parameter with value 30 and a 'cmd' parameter with value 'up'.>
Optional parameters used to replace variables in the search conditions
-extend <comma-separated list of attribute types - specified using their full name>
Spike also all the objects that reference the specified ones via these attributes
-extendunref <comma-separated list of attribute types - specified using their full name>
Spike or eliminate references from all the objects that reference the specified ones via these attributes. Referencing objects that do not reference any other non-deleted object and that belongs to partitions with the 'extendSpike' attribute set are deleted, all other objects are un-referenced.
-recurse
When extending the list of objects to be deleted to the referencing one consider also indirect references - up to any depth (i.e. objects referencing an object that references an object . . . that references one of the objects to be deleted)
-unref <comma-separated list of attribute types - specified using their full name>
Eliminate references to the objects being deleted from the specified attributes
-purge <time-span; e.g. 4:30 for 4 hours and 30 minutes, 2.06:00 for 2 days and 6 hours>
Used to compute a 'purge date-time' for the objects equal to the spike date-time plus the time-span. Specifies for how long the objects will be kept in the system before they are purged (permanently deleted). If not specified the objects will be kept for the default time defined at system level
-by <integer>
Number of objects to spike together in a single operation. Greater the number quicker the operation is, and longer locks are put on the database. Optional, default value 0 (i.e. all items).
-username <string>
The optional user name to use to login into the system. If not specified the Web service login is used. Ignored in interactive mode.
-password <string>
The user password to use to login into the system. Ignored if no system user name is specified. Ignored in interactive mode.
-lang <string>
User-interface language, e.g. 'en-US' for English, US version. Ignored in interactive mode.
-srvname <string>
The name of the Web service connection parameters to use, as defined in the user configuration file (USERCONFIG.XML file, typically stored in C:\Users\<yourWindowsname>\AppData\Roaming\TeraDP\GN4\ on Windows 10 / 8 / 7 / Vista and in c:\Documents and Settings\<user name>\Application Data on Windows XP / Server 2003). If not specified the first connection in the configuration file is used. Ignored in interactive mode.
Notes:
•When using this parameter, have in mind that there is no way to ensure that the same name in the USERCONFIG.XML file gets used coherently on all network computers. Therefore, this is not a safe method unless you are using it only on well known computers.
•Use either -srvname or -srvurl, but not both.
-srvurl <string>
The URL of Web service to connect to, e.g. http://myhost.com/GN4/Adminsrv.asmx. Ignored in interactive mode.
Notes:
•When using this parameter, have in mind that it is independent of the USERCONFIG.XML settings, therefore, much safer.
•Use either -srvname or -srvurl, but not both.
-srvusername <string>
The Windows user name to use to login to the Web service. If not specified the current Windows login is used, and the password and domain options are ignored. Ignored in interactive mode.
-srvpassword <string>
The Windows user password to use to login to the Web service. Ignored ininteractive mode.
-srvdomain <string>
The domain of the user to use to login to the Web service. Ignored in interactive mode.
-srvpassphrase <string>
Pass-phrase used to encrypt/decrypt data transferred to and from the server. Ignored in interactive mode.
Examples
(all text in one line!)
cmd4 spike -ids [id of the edition]
-extend master.editionRef,page.editionRef,extDoc.editionRef,pageLayer.pages,txtGeometry.txtRef,txtGeometry.jumps,pagePreview.pageRef
-extendunref linkObject.pageLayers.editionRef,linkObject.pageLayers.pageRef,linkObject.pageLayers.layerRef,pageLayer.txtGeos
-unref linkObject.assigns,linkObject.assigns.pageRef,linkObject.assigns.extDocRef
-recurse
Remove images from folder 1922999 based on modified date range, unreferencing from related articles and from the custom attribute relImage:
cmd4 spike -conditions "gn4:image[gn4:folderRef/@idref='obj192299'
and @modifiedDate >= '2012-01-01T11:00:00Z' and @modifiedDate < '2015-12-31T11:00:00Z']"
-unref article.related,img.relImage
See also
srv4 spike