Exporting data from a database to a file that can be shared is surely a rather common task, and ogr2ogr is a great tool for it. If that is not enough, you can also easily use it to transfer data from one database to another. Here is how to transfer data from PostGIS to SQL Server:
ogr2ogr -f "MSSQLSpatial" MSSQL:" server=CM_DOM\MSSQLSERVER12;database=mastering_postgis;trusted_connection=yes;" PG:"host=localhost port=5434 user=postgres dbname=mastering_postgis" -sql "SELECT name, ST_SetSRID(ST_Point(easting, norting), 27700) as geom FROM data_import.osgb_poi" -s_srs EPSG:27700 -t_srs EPSG:4326 -lco GEOM_TYPE=GEOMETRY -nln osgb_poi
The preceding command does a few things, so let's have a closer look at it. Basically, it transfers data from a PostGIS-enabled PostgreSQL databasen defined in the PG connection string to a Microsoft SQL Server spatial databasen defined in the MS SQL connection string.
Data is extracted using an SQL command and passed to a table in another database; data is also transformed from EPSG:27700 (OSGB 1936 / British National Grid) to EPSG:4326. Because a select query is used to extract the data, a -nln parameter allows us to specify the output table name so that it does not become sql_statement. I have also used a GEOM_TYPE layer creation option to specify that I was after the GEOMETRY type for my spatial data (GEOMETRY is the default, but I wanted to highlight this option).