Auto reload PREPARE statement after Couchbase Server restart

Hi Atom_yang,
no built-in support for auto loading scripts/n1ql commands.
Here is an excerpt from docs (Couchbase SDKs):

Prepared statements are stored in memory until you restart the Couchbase Server.
After restarting the server, you must prepare the statements again before you can
execute the prepared statements.

You may use shell scripting techniques to auto-run any shell/n1ql commands along with starting couchbase server. Also, Couchbase 4.5 comes with cbq tool that supports scripting. Couchbase SDKs

-Prasad