# Using GenerateChangeLog with multiple SQLServer Schemas

**URL:** <https://forum.liquibase.org/t/using-generatechangelog-with-multiple-sqlserver-schemas/1755>\
**Category:** General Discussion\
**Created:** [December 6, 2011, 12:25am UTC](https://forum.liquibase.org/t/using-generatechangelog-with-multiple-sqlserver-schemas/1755 "2011-12-06T00:25:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [December 6, 2011, 12:25am UTC](https://forum.liquibase.org/t/using-generatechangelog-with-multiple-sqlserver-schemas/1755/1 "2011-12-06T00:25:00Z")

</div>

There is a defaultSchemaName parameter that should allow you to specify a different schema. You can’t specify multiple schemas at one time, currently, however.

Nathan

---

<div class="post-metadata">

**Author:** ![ianhop](https://avatars.discourse-cdn.com/v4/letter/i/df705f/32.png) [@ianhop](https://forum.liquibase.org/u/ianhop)\
**Post date:** [December 6, 2011, 12:25am UTC](https://forum.liquibase.org/t/using-generatechangelog-with-multiple-sqlserver-schemas/1755/2 "2011-12-06T00:25:00Z")

</div>

Hi, I’m connecting to a MS SQL Server DBMS to generate a changelog as the first step towards using Liquibase.&nbsp; Whilst it creates a changeLogFile correctly, it only does so for the ‘defaultSchema’ of ‘DBO’ (as shown by the log output here):  
  
liquibase generateChangeLog  
INFO 05/12/11 15:58:liquibase: Reading tables for XXX @ jdbc:sqlserver://DBMS:1433;responseBuffering=full;encrypt=false;databaseName=DBMSName  
1;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true; (Default Schema: dbo) …  
  
  
Is there a parameter I can set to specify the schema to generate for, please?&nbsp; Thanks.&nbsp; Ian

---

<div class="post-metadata">

**Author:** ![ianhop](https://avatars.discourse-cdn.com/v4/letter/i/df705f/32.png) [@ianhop](https://forum.liquibase.org/u/ianhop)\
**Post date:** [December 6, 2011, 12:25am UTC](https://forum.liquibase.org/t/using-generatechangelog-with-multiple-sqlserver-schemas/1755/3 "2011-12-06T00:25:00Z")

</div>

Thanks Nathan.&nbsp; I’ve tried using that:  
  
liquibase --defaultSchemaName=SCM --defaultsFile=liquibaseParty.properties generateChangeLog  
  
both in the command line and in the properties file, and whilst it no longer outputs the ‘dbo’ schema, it doesn’t output the ‘SCM’ schema either.&nbsp;&nbsp; I don’t suppose you have any more ideas - or can see if I’ve got the syntax wrong in the command line?&nbsp; Thanks for any help.&nbsp; Ian  
  
Just thought I should give you the debug output too:  
  
D:\liquibaseTrial\>…\liquibase\liquibase --logLevel=debug --defaultsFile=liquibaseSCM.properties generateChangeLog  
DEBUG 06/12/11 10:34:liquibase: Unable to load/access Apache Derby driver class org.apache.derby.tools.sysinfo to check version: org.apache.derby.tools.sys  
info  
DEBUG 06/12/11 10:34:liquibase: Connected to UserName@jdbc:sqlserver://MCName:1433;responseBuffering=full;encrypt=false;databaseName=DBName;selec  
tMethod=direct;trustServerCertificate=false;lastUpdateCount=true;  
DEBUG 06/12/11 10:34:liquibase: Reading tables for UserName @ jdbc:sqlserver://MCName:1433;responseBuffering=full;encrypt=false;databaseName=DBName;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true; (Default Schema: SCM) …  
INFO 06/12/11 10:34:liquibase: Reading tables for UserName @ jdbc:sqlserver://MCName:1433;responseBuffering=full;encrypt=false;databaseName=DBName;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true; (Default Schema: SCM) …  
DEBUG 06/12/11 10:34:liquibase: Reading views for UserName @ jdbc:sqlserver://MCName:1433;responseBuffering=full;encrypt=false;databaseName=DBName;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true; (Default Schema: SCM) …  
INFO 06/12/11 10:34:liquibase: Reading views for UserName @ jdbc:sqlserver://MCName:1433;responseBuffering=full;encrypt=false;databaseName=DBName  
;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true; (Default Schema: SCM) …  
DEBUG 06/12/11 10:34:liquibase: Reading foreign keys for UserName @ jdbc:sqlserver://MCName:1433;responseBuffering=full;encrypt=false;databaseName=DBName;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true; (Default Schema: SCM) …  
INFO 06/12/11 10:34:liquibase: Reading foreign keys for UserName @ jdbc:sqlserver://MCName:1433;responseBuffering=full;encrypt=false;databaseName=DBName;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true; (Default Schema: SCM) …  
DEBUG 06/12/11 10:34:liquibase: Reading primary keys for UserName @ jdbc:sqlserver://MCName:1433;responseBuffering=full;encrypt=false;databaseName=DBName;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true; (Default Schema: SCM) …  
INFO 06/12/11 10:34:liquibase: Reading primary keys for UserName @ jdbc:sqlserver://MCName:1433;responseBuffering=full;encrypt=false;databaseName=DBName;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true; (Default Schema: SCM) …  
DEBUG 06/12/11 10:34:liquibase: Reading columns for UserName @ jdbc:sqlserver://MCName:1433;responseBuffering=full;encrypt=false;databaseName=DBName;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true; (Default Schema: SCM) …  
INFO 06/12/11 10:34:liquibase: Reading columns for UserName @ jdbc:sqlserver://MCName:1433;responseBuffering=full;encrypt=false;databaseName=DBName;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true; (Default Schema: SCM) …  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view scaSCMClaimNarrat for column scaSID  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view scaSCMClaimNarrat for column scaQlfr  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view scaSCMClaimNarrat for column scaParaRef  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view scaSCMClaimNarrat for column scaSeq  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view scaSCMClaimNarrat for column scaNarrat  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view scaSCMClaimNarrat for column scaSIDscm  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view scaSCMClaimNarrat for column scaUpdDate  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view scaSCMClaimNarrat for column scaModVersn  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view scaSCMClaimNarrat for column scaUserLastUpdSIDusr  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view scaSCMClaimNarrat for column scaInsSIDusr  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view scaSCMClaimNarrat for column scaInsDate  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view sccSCMCtrl for column sccSID  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view sccSCMCtrl for column sccMsgSource  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view sccSCMCtrl for column sccMsgRefNmbr  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view sccSCMCtrl for column sccMsgVersnNmbr  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view sccSCMCtrl for column sccMsgRelseNmbr  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view sccSCMCtrl for column sccUsmUserNmbr  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view sccSCMCtrl for column sccEarliestOpenAcctngMonth  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view sccSCMCtrl for column sccMsgAcctngMonth  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view sccSCMCtrl for column sccMonthEndDate  
DEBUG 06/12/11 10:34:liquibase: Could not find table or view sccSCMCtrl for column sccDateLoadComplt  
—etc for each table in the SCM schema.&nbsp;

---

<div class="post-metadata">

**Author:** ![ianhop](https://avatars.discourse-cdn.com/v4/letter/i/df705f/32.png) [@ianhop](https://forum.liquibase.org/u/ianhop)\
**Post date:** [December 6, 2011, 12:25am UTC](https://forum.liquibase.org/t/using-generatechangelog-with-multiple-sqlserver-schemas/1755/4 "2011-12-06T00:25:00Z")

</div>

Ah, DBA’s given me wrong table permissions - now all working correctly.&nbsp; Very sorry, thanks for the reply.
