Page 1 of 1

PgSqlDump to remote db on Linux

Posted: Tue 17 Sep 2013 03:21
by genii90
I have the following code that is executed against a database that is located on a linux server.

Code: Select all

using (PgSqlConnection conn = new PgSqlConnection(Constants.ConnectionString))
                {
                    conn.Open();
                    using (PgSqlDump pgSqlDump = new PgSqlDump { Connection = conn, Schema = "myschema", IncludeDrop = false, Mode = Devart.Common.DumpMode.Data })
                    {
                        pgSqlDump.Backup();
                        using (StreamWriter stream = new StreamWriter(file))
                        {
                            stream.WriteLine(pgSqlDump.DumpText);
                            stream.Close();
                        }
                    }
                    conn.Close();
                }
The call completes but the dumped text has just the following data:

SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET default_tablespace = '';
SET default_with_oids = false;


Is PgSqlDump able to get data from Linux hosted database? Note, the code ran successfully before on Windows postgres database.

Re: PgSqlDump to remote db on Linux

Posted: Wed 18 Sep 2013 02:13
by genii90
I am using Devart.Data.dll v5.0.781.0 and Devart.Data.Postgres.dll v6.8.322.0

Re: PgSqlDump to remote db on Linux

Posted: Thu 19 Sep 2013 02:30
by genii90
Solved.
My Schema property of PgSqlDump object was incorrect.