PgSqlDump to remote db on Linux
Posted: Tue 17 Sep 2013 03:21
I have the following code that is executed against a database that is located on a linux server.
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.
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();
}
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.