UpdateServerUrl
Syntax
The UpdateServerUrl method takes two arguments: the old server URL and the new server URL. These arguments mirror the entry boxes in the Update System dialog box. To gain access to this control from IBM Cognos, click the Options button on the IBM Cognos ribbon, then click Update System Utility.
The UpdateServerUrl method replaces the server information for existing reports. When running this command, the name of the package or data source remains the same. You can use this method to change only one server, such as a test server to a production server. The URL arguments can be full or partial URLs. If any argument is empty, this command does nothing, however, running this command with empty arguments has the potential to corrupt the report. Server information is stored in both the server property and the serialized report property. Running an empty command could cause these two instances to get out of sync.
UpdateServerUrl "old server URL string" "new server URL string"
Parameters
Argument |
Description |
Data type |
---|---|---|
old server URL string | Indicates the URL of the source or current system. |
String |
new server URL string | Indicates the URL of the target system. |
String |
Example
The following example uses the complete URL:
UpdateServerUrl "http://testserver1/bi/v1/disp"
"http://prodserver1/bi/v1/disp"
The following example uses only the part of the URL that is changing:
UpdateServerUrl "testserver1" "prodserver1"