Thread: Importing Microsoft Sql Server 2000
Hi, I have a simple question: does anybody knows a good util for importing databases from MS Sql 2000? Best regards, Aleksandar Dezelin -- Linux is like wigwam - no windows, no gates and apache inside. ...
Ryan Riehle wrote: >I have some experience with that so feel free to contact me if you run >into any snags. Hopefully you are on your way by now. > > -RYAN > > > > I have a problem with converting a MSSQL database to PostgreSQL. I saw in the data types list that PostgreSQL doesn't support Guid (uniqueidentifier) as a built-in type. So I'm just currious what data type to use instead of MSSQL uniqueidentifier? Best regards, Aleksandar Dezelin -- Linux is like wigwam - no windows, no gates and apache inside. ...
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Aleksandar Dezelin wrote: | Ryan Riehle wrote: | |> I have some experience with that so feel free to contact me if you run |> into any snags. Hopefully you are on your way by now. |> |> -RYAN |> |> |> |> | I have a problem with converting a MSSQL database to PostgreSQL. I saw | in the data types list that PostgreSQL doesn't support Guid | (uniqueidentifier) as a built-in type. So I'm just currious what data | type to use instead of MSSQL uniqueidentifier? Well, you've got some choices. If the behaviour you want is "a guaranteed unique, auto-incrementing integer value" Then the easiest way to do this is to use the SERIAL type. So for example, you could write this: CREATE TABLE foo ( ~ foo_id SERIAL PRIMARY KEY, ~ ... ); Which is like CREATE SEQUENCE foo_id_seq; CREATE TABLE foo ( ~ foo_id int4 UNIQUE NOT NULL DEFAULT (nextval('foo_id_seq')), ~ ... ~ PRIMARY KEY (foo_id) ); Actually the PRIMARY KEY constraint implies UNIQUE (and I think NOT NULL too), but I figured it's good to be clear. - -- Andrew Hammond 416-673-4138 ahammond@ca.afilias.info Database Administrator, Afilias Canada Corp. CB83 2838 4B67 D40F D086 3568 81FC E7E5 27AF 4A9A -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBh9zSgfzn5SevSpoRAkwqAJwMfwy/H56FkxB7S4VqVgjizX+FjwCfWxhu aEfaymQy4iYfiTkm0e7oF1M= =SxtF -----END PGP SIGNATURE-----
--- Aleksandar Dezelin <dezelin32@fastmail.fm> wrote: > Ryan Riehle wrote: > > >I have some experience with that so feel free to > contact me if you run > >into any snags. Hopefully you are on your way by > now. > > > > -RYAN > > > > > > > > > I have a problem with converting a MSSQL database to > PostgreSQL. I saw > in the data types list that PostgreSQL doesn't > support Guid > (uniqueidentifier) as a built-in type. So I'm just > currious what data > type to use instead of MSSQL uniqueidentifier? This may do the job for you. I have no experience with it, so I can't say how well it works. http://gborg.postgresql.org/project/uniqueidentifier/projdisplay.php > > Best regards, > Aleksandar Dezelin > > -- > Linux is like wigwam - no windows, no gates and > apache inside. ... > > > ---------------------------(end of > broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > __________________________________ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com
Aleksandar Dezelin wrote: > Hi, > > I have a simple question: does anybody knows a good util for importing > databases from MS Sql 2000? > > Best regards, > Aleksandar Dezelin > this might help: http://techdocs.postgresql.org/techdocs/convertsqlsvr2pgsql.php