Execute SQL When You Start a Server

You can configure a GemFire XD server or peer to execute SQL scripts during its boot process. You can also use initialization scripts as an alternative to data dictionary persistence.

You specify SQL scripts by using the -init-scripts argument to the gfxd server command, or the init-sql-scripts connection property when using the FabricServer interface. Scipts are executed after the initial DDL execution, during the boot procedure. Use initialization scripts to load data into existing tables or to execute DDL statements that depend on other DDL statements delivered from other peers or servers.

Note: If you use initialization scripts as an alternative to data dictionary persistence (not common), ensure that the first peer or server that you start in the cluster first execute the required DDLs for your application. All other peers and servers can then use initialization scripts to finish executing dependent DDL and to populate your schema with data.