Comparing Local Instance and a Database schema - tsql

I am not able to compare a instance of the database which is mapped locally with a SQL Server database schema. I tried with Tools->SQL Server->New Schema Comparison but it only compares two database schema.
Can anyone please suggest something on this ?
Thanks in Advance.

Related

Migrate Data from MongoDB to Postgres

We have database in mongo for a long time and now we have decided to move to Postgres. Since these two are totally different we have started with table design and API migration first. Now it comes to the data part.
In mongo, we have the following schemas and we wanted to migrate the same data to Postgres. I have gone through a couple of articles that say you can export data from mongo in CSV and import in Postgres using COPY command or using pgAdmin.
Mongos used uuid which is basically a string but in postgres we have id as an integer. we have used crossed ref foreign key in mongo as well how we can migrate those without lossing the connection between tabeles ?
can anyone suggest any good method ?

Is it necessary to define entity file of the table if table already exists in typeorm(btw I am using postgres if it matters)?

If it is not necessary can anyone tell me the way? because I want to test a Typeorm query which actually has a lot of tables connected to it? defining all the tables will take a lot of time?

How to obtain the database schema from a Sybase ASA 11 Database

I am working on a project where I need to programmatically validate and/or compare a database schema between product releases.
I am using Perl and am looking for a cross-platform method to collect the database schema. I am currently able to perform database queries by utilizing the dbisql.exe command and then parsing the results.
I am wondering if there is potentially a stored procedure or set of queries that I can run to collect the database schema.
It appears that the dbunload.exe command could be used to generate a SQL regeneration script however I am thinking that this output may be difficult to parse.
Any feedback would be greatly appreciated.
If you would like to retrieve the DB schema data on a really low level you could query the corresponding system tables. They are in the SYS-Namespace, especially SYSTABLE (for all tables) and SYSCOLUMN for all fields in those tables.
Check the ASA SQL Reference Handbook for the schema of those system tables.
With Perl's DBI you can easily fire queries on those tables. But you will have to create some local storage for the schema to compare the query results with.
Sybase Central v3.0 has the possibility to export DDL with all DB objects;
and I think SC v6.0 can't connect to ASA 11 :(

Transact SQL - Information Schema

Is there a way to query an Information Schema from DB2 and dump the contents(tables - structure only),into another database? I'm looking for a way to create a shell model of a database schema from DB2 into a SQL Server database?
Thanks
You can use db2look to get the table structure (DDL) out of db2.
Once you've got it, however, I'm afraid you'll have to manually replace any db2-specific syntax (datatypes, storage parameters, etc.) with it's corresponding SQL Server syntax.
It doesn't look like Microsoft's Migration Tool works for db2 yet. :(

TPC-H schema and data someone has?

Has someone the TPC-H schema?
I try to compile but has some errors.
I need the sql schema file.
And if possible the data sql file.
Thanks
TPC-H have a DBGEN that generates a database.
You can see at : http://www.tpc.org/tpch/
I maintain a repo of the data generator and schema here: https://bitbucket.org/tkejser/tpch-dbgen. It is a bit nicer to work with than the one from TPC.
There is a postgres ready schema in the repo as well as a makefile that does The Right Thing for Postgres.