Validating the 'SBSPACENAME' sblobspace
Posted in 2006
Topics: Storage & Space Management, Connectivity: ODBC / JDBC / .NET, Server Administration, Platform-Specific Issues
Hello, Question: My application is a simple application that connects to the Informix instance, validates that some preconditions are fulfilled and starts creating a database (including dbspaces and such) and enables datablades for the database. Now one of the datablades needs the default sbspace to be present, and thus will fail to enable if not. What I'd like my program to do, is to validate that the sbspace stated in the onconfig SBSPACENAME parameter has been created. One way I could do it, is to parse the onconfig file, fetch the SBSPACENAME and create a lookup in the SYSDBSPACES table of sysmaster. BUT: I'd much rather do it entirely without file system access (reading the onconfig file). So, do any of you have an idea on how to either: A. Read parameters from the onconfig file via SQL. B. Perform a call (could be either command-line or SQL) that will give the name of the default SBSPACE. Thanks in advance! Server Info: Platform: Windows Server 2003 Database is Informix Dynamic Server 10...TC3 Application info: Connecting through JDBC only. Full access to the file system, including INFORMIXDIR
I would expect the variable to be sysmaster:sysconfig table, so you can join on sysdbspaces and see if the SBSPACENAME is there. Thor Kristensen wrote: > Hello, > > Question: > My application is a simple application that connects to the Informix > instance, validates that some preconditions are fulfilled and starts > creating a database (including dbspaces and such) and enables datablades for > the database. > Now one of the datablades needs the default sbspace to be present, and thus > will fail to enable if not. > What I'd like my program to do, is to validate that the sbspace stated in > the onconfig SBSPACENAME parameter has been created. > One way I could do it, is to parse the onconfig file, fetch the SBSPACENAME > and create a lookup in the SYSDBSPACES table of sysmaster. BUT: I'd much > rather do it entirely without file system access (reading the onconfig > file). > So, do any of you have an idea on how to either: > A. Read parameters from the onconfig file via SQL. > B. Perform a call (could be either command-line or SQL) that will give the > name of the default SBSPACE. > > Thanks in advance! > > Server Info: > Platform: Windows Server 2003 > Database is Informix Dynamic Server 10...TC3 > > Application info: > Connecting through JDBC only. > Full access to the file system, including INFORMIXDIR > >