Using the community edition of Liquibase for our snowflake instances.
Running the diffChangeLog command generates a script with only Tables listed. Stored Procedures and Views are totally ignored.
Surely this isn't right.
As per the section "Output" near the bottom of this page: https://docs.liquibase.com/commands/community/diffchangelog.html it states:
The diffChangeLog command produces a list of all Objects and creates a changelog with a list of changesets.
Liquibase Community diffChangeLog categories:
Catalog
Column
Foreign Key
Index
Primary Key
Schema
Sequence
Procedure
Unique Constraints
View
Is there a bug?
I've downloaded and copied the latest jar files (liquibase-snowflake-4.4.1 and snowflake-jdbc-3.9.2).
This is because Snowflake database does not fully support all the liquibase commands.
If you see the note below, it says: Note: Not all database platforms support all stored logic types that are listed. and Snowflake is one of them.
Related
I have a scenario where we are migrating from Oracle DB to Postgres Sql, I know I can generate a change-log from Oracle schema using liquibase maven plugin and can use the same to create my schema in Postgres. What i want to know is if its possible to copy the data from oracle to postgresql too using liquibase. If so, how to do it.
Any help is much appreciated.
I'm not sure you can copy the data from one database to another using Liquibase changeSet directly.
But you can use generateChangeLog with --diffTypes=data attribute. It'll include data in the generated changeSets.
Check out the generateChangeLog docs
–diffTypes - List of diff types to include in changelog expressed as a
comma separated list from: tables, views, columns, indexes,
foreignkeys, primarykeys, uniqueconstraints, data.
And also check out this example
liquibase
--driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
--classpath="C:\\Program Files\\Microsoft JDBC Driver 6.0 for SQL Server\\sqljdbc_6.0\\enu\\jre8"
--url="jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks2017;integratedSecurity=false;"
--changeLogFile="D:\Source\generateChangeLog--PersonSchema.xml"
--username=liquibase
--password=liquibase#123
--logLevel=info
--defaultSchemaName=dbo
--diffTypes=data
generateChangeLog
I have a SQL Server 2016 database with in-memory tables. I'd like to use the database diagram feature to create a graphic to match.
Running SSMS 18.3.1. When I start a new diagram, the in-memory tables are not shown in the drop down. Is there another way to get them on the diagram?
Note: In the official documentation these are called memory-optimized tables. See Introduction to Memory-Optimized Tables
You can't add OLTP object in Database Diagram, not in even in SQL Server 2019.
I thought there should be a way to modify [definition] column in [dbo].[sysdiagrams] but it is HexString of unknown file type. (I tried many formats but its obviously an internal Microsoft type)
Unfortunately, there is no reference to mention that is a not-supported feature. (I send a comment to this page )
OLTP is not supported for database diagram. You do not have access to in-memory tables in the diagram because the diagram does not recognize the essence of a in-memory tables as a table, in fact SQL Server generates a DLL for each created Memory-Optimized Table Type that includes the functions required
for accessing the indexes and retrieving data from the related Memory-Optimized Table Variable
If you run the SQL Profiler tool you'll see there is a column name IsMemoryOptimized in the table data result set that is returned for the memory-optimized table. I think since the Database Diagrams functionality is older (since mssql 2000) and not updated regularly it does not support viewing the newer memory-optimized tables.
more info here:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/71aa7b6e-c281-4417-8149-2eb6f3830110/sql-server-2016-memory-optimized-tables-not-visible-in-database-diagrams?forum=sqlinmemory
I have a SQL Server database that uses schemas to logically group objects; there are ten schemas in the database.
If I baseline my database and create the schema history table in the “foo” schema, will Flyway apply a migration from the migration folder that operates on an object in the “bar” schema?
Do I need one folder of migration scripts for each schema in the database? The documentation explains how to specify schemas on the command line but doesn’t make it clear as to why I must.
The list of schemas on the command line has two effects:
the first named schema is where the history table goes
the named schemas are the ones that are cleaned by flyway clean
(Note - in 6.1 the command line defaultSchema parameter was introduced to separate these usages)
Migrations can refer to any schema in the database that you have access to - indeed, some objects may exist in one schema but depend on objects in another. If you're happy with the history table to go in dbo, and want to control the whole database with Flyway, just don't set these parameters. A folder of scripts per schema may help you with maintaining them but it is not necessary.
I want to take a snapshot of all table, view and procedure definitions, and diff this snapshot against another version of the same schema. (By snapshot I mean the schema definition stored in some text file.)
I am not interested in procedure bodies, only in what is relevant to my DAOs. (Maybe you could call that a schema interface...?)
Is there a one-command way of creating such snapshot for an Oracle schema?
You can use Oracle SQL Developer "Database Diff" to do this. You can select the two Oracle schemas to be compared and it produces all the differences
The good thing about this tool is that it allows you to select what to consider when differences are produced, and, then, you have the option of only comparing package specs
We're looking to migrate from MSSQL to Postgres. I'm intending on using sql servers bcp tool for generating csv that we'll import into postgres with the bulk copy features. We are however, having trouble getting the DDL migrated. We've. I've gotten it to work by massaging the DDL generated by MMSQL by hand but We need something automated since we have a moving target (still adding tables, columns etc.) and will need to do this more than once.
We're open to commercial and open source products but have not found anything that does everything we need: Tables, serial columns, indexes (unique, multi column etc), defaults and foreign key constraints.
Check this link http://dbconvert.com/convert-mssql-to-postgre-pro.php?DB=6
Specifically look at the "SQL Azure to PostgreSQL" feature. Hopefully that will handle your table DDL.
NOTE: I have not used this just ran across it at http://www.postgresql.org/ in the latest news section a few days ago.
Finally settled on using http://www.enterprisedb.com/products-services-training/products-overview/postgres-plus-solution-pack/migration-toolkit. It's the most thorough and does data and ddl. There have been some issues with escaping backslashes that are followed by numbers since postgres thinks these are unicode escape sequences.