babelfish-for-postgresql/babelfish_extensions

Not able to see schema after restoring babelfish_db to another server.

kranthi1385 opened this issue · 10 comments

Hi Experts,

After restoring babelfish_db from one server to another server we are not able to see all tables schema using SSMS is there any settings that we need to setup please confirm

Can you please give more details, such as a. which version is being used and b. all parameters on source and target, c. was it multi-db or single-db mode, d. was everything identical where you are backing up and where its being restored etc?

@jsudrik i have restored babelfish_db from server A to Server B.

In Server A i am able to see all the tables which are created using different schemas, But in Server B I am able to see only dbo schema tables. I want to see all the schemas that are created in the database. please find the screenshot attached below.

2024-07-30_19-17-26

please find attachment for postgres here i can see all the schemas where as in SSMS tool I am not able to see schemas.
2024-07-30_19-22-46

Hi @kranthi1385, can you please provide the command which you have used to dump and restore the database? Also, what version of babelfish are you trying this on? This will help us to reproduce this issue on our side.

@rishabhtanwar29 I used the following dump to restore
pg_restore -h localhost -U postgres -d babelfish_db -v /home/backup/backup.bak

babelfish version is

locale is "C.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Setting master as default database in login packet
Changed database context to 'master'.
version
Babelfish for PostgreSQL with SQL Server Compatibility - 12.0.2000.8
Jul 22 2024 09:30:10
Copyright (c) Amazon Web Services
PostgreSQL 16.2 on x86_64-pc-linux-gnu (Babelfish 4.1.1)
(1 row affected)

@kranthi1385 Are both the source and target versions the same? What is the value of babelfishpg_tsql.migration_mode GUC in both source and target servers? Both version and migration_mode must be same between source and target servers. Can you please check out this wiki https://github.com/babelfish-for-postgresql/babelfish-for-postgresql/wiki/Babelfish-dump-and-restore and verify if you have followed all the dump/restore steps correctly and you have used the correct CLI options etc?

@rishabhtanwar29 I am not able to install bbf_dump in ubuntu server can you please help me on this.

@rishabhtanwar29 I am getting this error when i try to install BabelfishDump

[root@ip-10-300-101-156 ~]# sudo yum install -y BabelfishDump
Updating Subscription Management repositories.
Unable to read consumer identity
Last metadata expiration check: 0:01:28 ago on Wed 31 Jul 2024 06:43:13 PM UTC.
No match for argument: BabelfishDump
Error: Unable to find a match: BabelfishDump

@kranthi1385 Currently, BabelfishDump is available only on Amazon Linux 2023 machines so that's why you weren't able to install it on ubuntu. You can either launch an Amazon Linux 2023 EC2 machine and install it there or you can directly use pg_dump/pg_dumpall/pg_restore binaries built from postgresql_modified_for_babelfish source. You can get the source code for Babelfish 4.1.1 from here.

ok @rishabhtanwar29 thanks for the confirmation will try to setup in amazon linux 2023