Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
Modify keys: Add Not Null
constraints to the first unique key in a table
To add a Not Null
constraint on a key by using the command line, enter the following command from the operating system command prompt:
Note
-
Make sure that Service Manager is offline before you execute this command. Otherwise, the "Not Null" constraint may be lost after you modify the dbdict. In this case, you would need run the command again.
-
Due to differences in how databases handle "Not Null" constraints, you should note the following behaviors:
For Oracle and DB2 databases: a "Not Null" constraint is added to the unique index.
For SQL Server database, a "Not Null" attribute is added to each field of the unique index.
sm -system_addconstraint:<target>:0
In this example, <target> represents the tables on which you wish to add the constraint, and 0 represents that you wish to add a Not Null
constraint on the first unique key of the <target>.
After you run this script, you will see information that resembles the following in the sm.log
file.
11508( 12940) 12/11/2012 11:24:59 RTE I Adding NOT NULL constraint for table 'Alertlog'. 11508( 12940) 12/11/2012 11:24:59 RTE I Adding NOT NULL constraint for mapped table 'ALERTLOGM1'. 11508( 12940) 12/11/2012 11:24:59 RTE I Add NOT NULL constraint for field 'ALERT_ID' successfully! 11508( 12940) 12/11/2012 11:24:59 RTE I Add NOT NULL constraint for mapped table successfully, updated to DBDICT! 11508( 12940) 12/11/2012 11:24:59 RTE I Adding NOT NULL constraint for table 'Approval'. 11508( 12940) 12/11/2012 11:24:59 RTE I Adding NOT NULL constraint for mapped table 'APPROVALM1'. 11508( 12940) 12/11/2012 11:24:59 RTE I Add NOT NULL constraint for field 'UNIQUE_KEY' successfully! 11508( 12940) 12/11/2012 11:24:59 RTE I Add NOT NULL constraint for field 'FILE_NAME' successfully! 11508( 12940) 12/11/2012 11:24:59 RTE I Add NOT NULL constraint for field 'NAME' successfully! 11508( 12940) 12/11/2012 11:24:59 RTE E Error: SQL code=2293 message=ORA-02293: cannot validate (SM930GA.APPROVALM18C1CC5FB) - check constraint violated 11508( 12940) 12/11/2012 11:24:59 RTE E API=OCIStmtExecute [in sqociExecOne], Statement=ALTER TABLE APPROVALM1 ADD CONSTRAINT APPROVALM18C1CC5FB CHECK( "COMPONENT" IS NOT NULL ) 11508( 12940) 12/11/2012 11:24:59 RTE W Adding NOT NULL constraint for field 'COMPONENT' failed, please change/remove the NULL values in records! 11508( 12940) 12/11/2012 11:24:59 RTE I Adding NOT NULL constraint for mapped table 'APPROVALA1'. 11508( 12940) 12/11/2012 11:24:59 RTE I Add NOT NULL constraint for field 'UNIQUE_KEY' successfully! 11508( 12940) 12/11/2012 11:24:59 RTE I Add NOT NULL constraint for field 'FILE_NAME' successfully! 11508( 12940) 12/11/2012 11:24:59 RTE I Add NOT NULL constraint for field 'NAME' successfully! 11508( 12940) 12/11/2012 11:24:59 RTE E Error: SQL code=2293 message=ORA-02293: cannot validate (SM930GA.APPROVALA153D2D5D4) - check constraint violated 11508( 12940) 12/11/2012 11:24:59 RTE E API=OCIStmtExecute [in sqociExecOne], Statement=ALTER TABLE APPROVALA1 ADD CONSTRAINT APPROVALA153D2D5D4 CHECK( "COMPONENT" IS NOT NULL ) 11508( 12940) 12/11/2012 11:24:59 RTE W Adding NOT NULL constraint for field 'COMPONENT' failed, please change/remove the NULL values in records!
Lines in blue mean Service Manager starts to add a NOT NULL
constraint for a logical table in SM.
Lines in dark yellow mean Service Manager starts to add a Not Null
constraint for a physical table in SM.
Lines in red mean Service Manager cannot add a Not Null
constraint to that field, because that field has NULL
values in records. Therefore, you should remove these NULL
values manually.
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to ovdoc-ITSM@hp.com.
Help Topic ID:
Product:
Topic Title:
Feedback: