Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to i convert a Postgre SQL database to SQL Server ????

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a postgre SQL database running on the server. I need to import the data from postGre Sql to SQL server database. Which tool do i use ??? Please help
 
There is no single complete easy step, because the two are very different.

Your best bet is to use ODBC to download the tables and views. I don't think ODBC will properly transmit your table relationships and other things such as triggers, functions, etc..., though, so you will have to re-create them in SQL server.

Also, I suppose you could also just do a database dump, and edit the resulting SQL creation statements to use SQL server keywords instead of PostgreSQL's.

The only area that will be truly different is with auto_incremented fields, because SQL server (AFAIK) doesn't use SEQUENCE generation the way PostgreSQL does.

Once you get the SQL creation statements done right, I am fairly sure that your INSERT statements will be no problem.

If your database is fairly standard, it should be a fairly painless process. If you have many triggers and functions, it will probably be a little more difficult, but even then, I'm willing to bet 95% of the syntax will be similar. -------------------------------------------

"Now, this might cause some discomfort..."
(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top