Set_property_value

SQL

function Set_property_value(IN owner CHAR(32), IN name CHAR(36), IN num INT, IN buffer CHAR(254)); RETURNS BOOLEAN;


Parametry

owner
property owner
name
property name
num
number of the property value


Od verze

8.0

Popis

This function writes the new value of the property name of the owner owner specified in the buffer character into the system tables. If the property has more tha one value (e.g. Dir1, Dir2), then the value number is specified by the num parameter, otherwise the num parameter must equal 0.

The property value is specified as a character string. If it's a property with numberc values, the buffer parameter contains the decadic notation of the value.

The name and owner parameters are not case-sensitive.

The SQL server property owner is designated by the "@SQLSERVER" string. Most SQL server properties may be set by the configuration administrator, other properties by the security administrator. All modification to SQL server properties will take efferct once the server is restarted.



Návratová hodnota

FALSE if successful, TRUE otherwise.



Příklad

Set the backup properties and disable anonymous access withou using the Client developer interface:

  CALL Set_property_value("@SQLSERVER","BackupDirectory",0,"Z:\backup");
  CALL Set_property_value("@SQLSERVER","BackupFilesLimit",0,"7");

// make backups each midnight
  CALL Set_property_value("@SQLSERVER","BackupIntervalHours",0,"0");   
  CALL Set_property_value("@SQLSERVER","BackupIntervalMinutes",0,"0"); 
  CALL Set_property_value("@SQLSERVER","BackupTimeDay1",0,"1");
  CALL Set_property_value("@SQLSERVER","BackupTimeHour1",0,"23");
  CALL Set_property_value("@SQLSERVER","BackupTimeMin1",0,"59");
  CALL Set_property_value("@SQLSERVER","BackupTimeDay2",0,"0");
  CALL Set_property_value("@SQLSERVER","BackupTimeHour2",0,"0");
  CALL Set_property_value("@SQLSERVER","BackupTimeMin2",0,"0");

// disable anonymous access
  CALL Set_property_value("@SQLSERVER","DisableAnonymous",0,"1");

Viz