Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jQXas-0007zS-OO for pgsql-admin@arkaria.postgresql.org; Mon, 20 Apr 2020 14:40:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jQXaL-00046p-AV for pgsql-admin@arkaria.postgresql.org; Mon, 20 Apr 2020 14:39:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jQXaL-00046i-31 for pgsql-admin@lists.postgresql.org; Mon, 20 Apr 2020 14:39:45 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jQXaI-0001Ig-QY for pgsql-admin@lists.postgresql.org; Mon, 20 Apr 2020 14:39:44 +0000 Received: by mail-wr1-x443.google.com with SMTP id f13so12465583wrm.13 for ; Mon, 20 Apr 2020 07:39:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=qP0RwVsBpVmUbo9AyiidN11HlWI3Tely8LTmoKsrbnQ=; b=hCUerMFwj1Oa8FYV9zGq+LrMnFORRcVWEHIuQkTGw+12f/LLiDp73dyMtgsQr9EzAh +vdnr47sICIvRsMXVG1Ew6QLaIOs60ozULLR5I5xunmd8vfqqUuGxhqbWlIInvn0HZWv CKNlGbe5dkCQE8doNH1Ol1ZfSx7nwIseqTSLs3KVjWPmXhLtbibE66Z+Oa7z1BjyBw8i MiZBTLadWoo6NP+pF+da/AwvQH3WuTXpvTCm7dv/nMpKQWqxuDVkbStGHdYP9s985CDj BoZh+jxiQWZ+vKebMVMN8dLJG7JzQOqjgud875lt4zKXeZ7JEtEW7Ge4fl5esbpHWHhn E37g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=qP0RwVsBpVmUbo9AyiidN11HlWI3Tely8LTmoKsrbnQ=; b=AJS3NFXirz1ZDE3Zz0CgCGq7imBA9Ze58G7/rBTlFhYIdfBlusGK/641v//4Pf8PTw hP4H+uAtSITKJkMJS1HY4qZ43+BZUWaZq5c0HDqW8/9gjOlrznGM0lzmBtjCjT/Eq6HJ Uw7EoYock6WwvcZhI9jwbWpNiFYHNqwKrhys/V6Gk0YM4wfDfa02awvnVVQZT+STVGNz qtyPNUep3KjXIUS1j9HNsmTVwq3+wBwQl4IxxXMURIhhYcPWXmbA5CgDe+Tq+lRxAzFO nPG1Pp/9WnD+pkFfqAdcdQybc9wHOgnFtgaX68R+zb26c0kEohGY0fm1SLt2kR/VsvHl pORg== X-Gm-Message-State: AGi0Pua1peT80g1dgPWFecF/tZ92iT938ejs9cF0k0f3Spz16blPy+BC dNNkeEzIEXAbX+VVeYT7AOmpwA== X-Google-Smtp-Source: APiQypJ9lsTerPhyDDeTZ9ZSOX7/uEF5z5Ee4Oit2klVEG+r8krazsvedH21GhD0X8oK9NKvcBdusQ== X-Received: by 2002:adf:e486:: with SMTP id i6mr18338469wrm.377.1587393581392; Mon, 20 Apr 2020 07:39:41 -0700 (PDT) Received: from dynamic-eoa1xw1q44qdjznxo-pd01.res.v6.highway.a1.net (dynamic-eoa1xw1q44qdjznxo-pd01.res.v6.highway.a1.net. [2001:871:60:9afb:eb30:1de6:8277:4aec]) by smtp.gmail.com with ESMTPSA id a1sm1510315wrn.80.2020.04.20.07.39.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 07:39:40 -0700 (PDT) Message-ID: Subject: Re: Exporting TBs of data in Oracle schema/database into CSV format to migrate into PostgreSQL From: Laurenz Albe To: Pepe TD Vo , pgsql-admin@lists.postgresql.org, Thomas Kellerer Date: Mon, 20 Apr 2020 16:39:39 +0200 In-Reply-To: <172687860.2288957.1587391373846@mail.yahoo.com> References: <172687860.2288957.1587391373846@mail.yahoo.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, 2020-04-20 at 14:02 +0000, Pepe TD Vo wrote: > we can access Oracle table within Postgres? How? Need to create a database link > and/or how can both talk to each other? That would be the Oracle foreign data wrapper: https://laurenz.github.io/oracle_fdw/ > My data is from production, can turn off the foreign key. Is there a way to copy > data from Oracle to Postgres faster? Should I export the Oracle data table via > dump file as text/csv and insert it into Postgres? Can we use an oracle dump file? You cannot use an Oracle dump, because that is in a proprietary format. Using the foreign data wrapper, you define a foreign table in PostgreSQL. When you select from that table, the data are directly fetched from Oracle. Then you can do INSERT INTO localtable SELECT * FROM foreign_table; to transfer the data, without any intermediary file storage. In a way, the data are streamed from Oracle to PostgreSQL. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com