I need to execute a SQL Server system stored procedure, programmatically, and since it executes in the current schema, I need to change it on the fly.
Like this
Statement st = connection.createStatement(); st.execute("EXEC SP_ADDUSER ' ', ' '");
But SP_ADDUSER only executes on the current schema set for the connection, so if I wanted to create users in various schemas, I'd need to change it, and that's what I am looking for.