Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uon3S-00AFgw-Jw for pgsql-general@arkaria.postgresql.org; Wed, 20 Aug 2025 17:56:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uon3P-00AeOR-NF for pgsql-general@arkaria.postgresql.org; Wed, 20 Aug 2025 17:56:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uon3P-00AeNc-Bm for pgsql-general@lists.postgresql.org; Wed, 20 Aug 2025 17:56:55 +0000 Received: from fhigh-a2-smtp.messagingengine.com ([103.168.172.153]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uon3N-000x8K-0j for pgsql-general@lists.postgresql.org; Wed, 20 Aug 2025 17:56:55 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id BD44E1400403; Wed, 20 Aug 2025 13:56:50 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Wed, 20 Aug 2025 13:56:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1755712610; x=1755799010; bh=CHJt4ngYNfrLetaJ5ZqLxs896hbTy3zlpOvAuGR/U7g=; b= OmoNNXasqo7EKeoYJS9+ctLSxQGuDKaHC5MulG5N0pP/SVKOdxarZmbmCuQf0/vW fNwVfHHWWfJ2Q1THL4syyBMlBS2uXh8/Ox0HD6sdIkbhZ954iGhWG7mMIsoMrBcx 20OlZut04AdwMG39SlWrBQ6zB4cpKzfYxUsMnN5O2By2qnpeTXnc+30QJ5pr3CQn OEdQ8QsTa8rBkE4ycCwQyNv77I6ULRv4ckEZYCJkDQ+fqXZ5Usqiq7Ll8ugXduR7 Ul1Bs0RKCp9/a+74sSrELuE1L+I8AdQ79qyKSVV7l6E+NY54qfwwXEmDoMAtKZY/ VuZUz9juCHm5f22waGS0wA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1755712610; x=1755799010; bh=C HJt4ngYNfrLetaJ5ZqLxs896hbTy3zlpOvAuGR/U7g=; b=XbeYES28llRaLcLPK aJbOqXrd/UmZVuVIx7lV3oK4CNeZCRyXp43sJF+4cx8GDdpMU0LwBu4y9mqpBUlj qqTYOxkGCaIn3cn1eUlp8o9AiLdBoG5Lo3Ufaz81uN+6TWRFOnRZDbrXcfaAfXIn UQGKPxSFAPTd6WMWUTofCrjiZclLtgYPxhrXnKZAv8L3yRd9cvCW4TpONTz/MAn1 X/FZcKol5q2kLxBFGqDguqJu9bCH+kYEGjENePBYt2RsxlAzIJ4huc00mXX1fMTQ DUVpI1OMLx9qE4NugFB3QuHsr9NTY6ByUtsab9GZWkLibY02STHL5vO29sJnl/yl TBq1A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduheeltddvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertd dtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgr vhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnheptdejvedtleelke eiueeltdefueeiteejheeuhfegteehueefleekveffhedtjeevnecuffhomhgrihhnpehp ghhlohgruggvrhdrihhonecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnhgs pghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepkhhktghhnh drihhnsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlhes lhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Aug 2025 13:56:49 -0400 (EDT) Message-ID: Date: Wed, 20 Aug 2025 10:56:49 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: MS SQL to Postgres To: KK CHN , pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/20/25 10:25, KK CHN wrote: > Hi, > > I am in search of the best practices to migrate from an MS SQL database > server to PostgreSQL 16 > > Existing DB server MSSQL with 6 Million records and 3.5 TB  with 424 > Tables running from 2019 onwards. > > Each table has 5 to 16 columns ( basically text, numbers, lat long > coordinates , time stamps, and images/voice file (stored in archive > folders)reference links, etc.  ). > > I am in need to port / migrate all this data from this MS SQL server to > Postgres16 . > Up front, I have not moved data from MSSQL to Postgres. What follows will be generic. > 1. What are the best methods and practices folks employ to do this kind > of data porting operations? Planning and patience. It is a matter of drawing a map/diagram of where you are now(MSSQL) and where you want to end up(Postgres) with steps to get from A to B. > 2. what are the tools and techniques to explored / employed for this One that I know of: https://pgloader.io/ > 3. How much time is consumed by employing the right tools, the entire > porting of 6 million records of 3.5 TB size to Postgres 16 takes Unknowable at this point. I will say it depends on how many MSSQL specific features you use and whether there are Postgres direct equivalents or you whether you will need to do extensive modifications. > 4. Any hurdles or challenges or risks Changing database vendors. > > Kindly enlighten me with the best practices and  reference materials / > links or tutorials to perform these operations successfully. > > Thank you, > Krishane > -- Adrian Klaver adrian.klaver@aklaver.com