Обсуждение: extremely newbie questions
I'm very new when it comes to databases, and I'd like to try out pgAdmin on my Windows NT to create, configure and manage some databases on a remote linux server. I'm using pgAdmin 7.05 and PostgreSQL ODBC driver v6.50.00.00. I've installed the above two as well as MDAC v2.6 And i'm running Windows NT Workstation with Service Pack v6a 1) I want to test out PostgreSQL on a windows platform, so is there anything else I have to install other than the software I have mentioned above? I assume that pgAdmin is something like MSSQL server, or am I wrong? is it just a frontend? 2) where can I find a sample database which can be used for pgAdmin? Can any regular database created by Microsoft Accessbe used? (*.mdb) 3) i've tried creating a PostgreSQL ODBC connection with a Microsoft Access database, but when I start pgAdmin and connectto the source i've specified, this error message appears: Error Details ************* Error Number: -2147467259 Error Description: Could not connect to the server; Could not connect to remote socket. Error Source: Microsoft OLE DB Provider for ODBC Drivers Subroutine of Function: frmODBCLogon, cmdOK_Click Any help would be very much appreciated. I can't even seem to open the main pgAdmin program! And thanks in advance. Warmest regards, Nicholas Chan
> -----Original Message----- > From: Nicholas Chan [mailto:yumin@pl.jaring.my] > Sent: 22 January 2001 02:53 > To: Postgresql Interfaces > Subject: [INTERFACES] extremely newbie questions > > > > I'm very new when it comes to databases, and I'd like to try out > pgAdmin on my Windows NT to create, configure and manage some > databases on a remote linux server. > > I'm using pgAdmin 7.05 and PostgreSQL ODBC driver v6.50.00.00. > I've installed the above two as well as MDAC v2.6 > And i'm running Windows NT Workstation with Service Pack v6a You will also need to install the PostgreSQL ODBC driver which can be obtained from ftp.postgresql.org > 1) I want to test out PostgreSQL on a windows platform, so is there > anything else I have to install other than the software > I have mentioned above? I assume that pgAdmin is something like > MSSQL server, or am I wrong? is it just a frontend? pgAdmin is more like SQL's Enterprise Manager (in function, not design) - it is not the dbms itself. > 2) where can I find a sample database which can be used for pgAdmin? > Can any regular database created by Microsoft Access be used? > (*.mdb) No, you you can't use mdb's (though pgAdmin can migrate them for you). You need to install PostgreSQL on your linux box - you can get this from ftp.postgresql.org, or some distros such as Suse and Redhat come with rpms. > 3) i've tried creating a PostgreSQL ODBC connection with a Microsoft > Access database, but when I start pgAdmin and connect to the > source i've specified, this error message appears: Yes, that will happen because pgAdmin is expecting to be connected to PostgreSQL. Regards, Dave.
Thanks for your reply, Dave. > > 2) where can I find a sample database which can be used for pgAdmin? > > Can any regular database created by Microsoft Access be used? > > (*.mdb) > > No, you you can't use mdb's (though pgAdmin can migrate them for you). You > need to install PostgreSQL on your linux box - you can get this from > ftp.postgresql.org, or some distros such as Suse and Redhat come with rpms. So this means that I can't use pgAdmin unless my pc is connected to a linux box? Oh :( So are there any other alternativeson using PostgreSQL on a standalone windows based PC? And are there any converters around to convert microsoft based databases to a PostgreSQL readableformat? Thanks.
> -----Original Message----- > From: Nicholas Chan [mailto:yumin@pl.jaring.my] > Sent: 22 January 2001 14:26 > To: Postgresql Interfaces > Subject: [INTERFACES] Re: extremely newbie questions > > > > Thanks for your reply, Dave. > > > > > 2) where can I find a sample database which can be used > for pgAdmin? > > > Can any regular database created by Microsoft Access be used? > > > (*.mdb) > > > > No, you you can't use mdb's (though pgAdmin can migrate > them for you). You > > need to install PostgreSQL on your linux box - you can get this from > > ftp.postgresql.org, or some distros such as Suse and Redhat > come with rpms. > > So this means that I can't use pgAdmin unless my pc is > connected to a > linux box? Oh :( You can compile PostgreSQL to run on your PC if you are running NT4 or W2K (that's how I develop pgAdmin when I'm parked in front of the telly at home with my laptop!). You need to use the Cygwin package - there are instructions in the PostgreSQL tarball. > So are there any other alternatives on using PostgreSQL on a > standalone > windows based PC? And are there any converters around to convert > microsoft based databases to a PostgreSQL readable format? Yes, pgAdmin does that (converts Access tables/indexes but *not* programs to PostgreSQL). I think a little clarification is needed here: pgAdmin is an admin/design tool for the PostgreSQL database system. PostgreSQL is *not* just a file like a simple Access database, it is a program that accepts and processes SQL queries and returns resultsets when appropriate. It has it's own data files that pgAdmin knows nothing about. Typically PostgreSQL will run on a server and accept connections from 1 or many (perhaps hundereds) of client programs (or people running the same program). pgAdmin is one such program that just happens to be designed to help manage and build your databases. Check out www.postgresql.org for more info. Regards, Dave.
Again, thanks for your reply! > You can compile PostgreSQL to run on your PC if you are running NT4 or W2K > (that's how I develop pgAdmin when I'm parked in front of the telly at home > with my laptop!). You need to use the Cygwin package - there are > instructions in the PostgreSQL tarball. Are there any readily compiled windows NT versions to be downloaded? > Yes, pgAdmin does that (converts Access tables/indexes but *not* programs to > PostgreSQL). I think a little clarification is needed here: pgAdmin is an > admin/design tool for the PostgreSQL database system. PostgreSQL is *not* > just a file like a simple Access database, it is a program that accepts and > processes SQL queries and returns resultsets when appropriate. It has it's > own data files that pgAdmin knows nothing about. > > Typically PostgreSQL will run on a server and accept connections from 1 or > many (perhaps hundereds) of client programs (or people running the same > program). pgAdmin is one such program that just happens to be designed to > help manage and build your databases. Thanks for the clarification, Dave. That explains a lot of things! And are there any database converters out there whichcan convert windows based databases, especially Microsoft Access, to PostgreSQL database readable files other than pgAdmin?
1) You need to create a Data Source Name (DSN) using the ODBC driver manager. This can be done by opening ODBC32 in the Control Panel. Once this is done, Access will allow you add tables via your new ODBC data source. You should have a primary key installed on each table. 2) With Access you can databases that store data and databases that store code and reference the data. If you are using code, then just link to the PostgreSQL tables as described above and they will look and act exactly like Access tables. You can even link Access table to PostgreSQL tables using Access. If you are referring to data stored in Access97, then PostgreSQL will not be able to access this data directly. You will have to export your Access data and import it into PostgreSQL. 3) Looks like you did not do item 1 above and you choose a Data Source for another database. If you complete item 1 above, and select it as your data source, then it should work. Hope this helps. -----Original Message----- From: Nicholas Chan [SMTP:yumin@pl.jaring.my] Sent: Sunday, January 21, 2001 7:53 PM To: Postgresql Interfaces Subject: extremely newbie questions I'm very new when it comes to databases, and I'd like to try out pgAdmin on my Windows NT to create, configure and manage some databases on a remote linux server. I'm using pgAdmin 7.05 and PostgreSQL ODBC driver v6.50.00.00. I've installed the above two as well as MDAC v2.6 And i'm running Windows NT Workstation with Service Pack v6a 1) I want to test out PostgreSQL on a windows platform, so is there anything else I have to install other than the software I have mentioned above? I assume that pgAdmin is something like MSSQL server, or am I wrong? is it just a frontend? 2) where can I find a sample database which can be used for pgAdmin? Can any regular database created by Microsoft Accessbe used? (*.mdb) 3) i've tried creating a PostgreSQL ODBC connection with a Microsoft Access database, but when I start pgAdmin and connectto the source i've specified, this error message appears: Error Details ************* Error Number: -2147467259 Error Description: Could not connect to the server; Could not connect to remote socket. Error Source: Microsoft OLE DB Provider for ODBC Drivers Subroutine of Function: frmODBCLogon, cmdOK_Click Any help would be very much appreciated. I can't even seem to open the main pgAdmin program! And thanks in advance. Warmest regards, Nicholas Chan
> -----Original Message----- > From: Nicholas Chan [mailto:yumin@pl.jaring.my] > Sent: 22 January 2001 17:40 > To: Postgresql Interfaces > Subject: [INTERFACES] Re: extremely newbie questions > > > > Again, thanks for your reply! > > > > You can compile PostgreSQL to run on your PC if you are > running NT4 or W2K > > (that's how I develop pgAdmin when I'm parked in front of > the telly at home > > with my laptop!). You need to use the Cygwin package - there are > > instructions in the PostgreSQL tarball. > > Are there any readily compiled windows NT versions to be > downloaded? Probably. I don't know where though. > > Yes, pgAdmin does that (converts Access tables/indexes but > *not* programs to > > PostgreSQL). I think a little clarification is needed here: > pgAdmin is an > > admin/design tool for the PostgreSQL database system. > PostgreSQL is *not* > > just a file like a simple Access database, it is a program > that accepts and > > processes SQL queries and returns resultsets when > appropriate. It has it's > > own data files that pgAdmin knows nothing about. > > > > Typically PostgreSQL will run on a server and accept > connections from 1 or > > many (perhaps hundereds) of client programs (or people > running the same > > program). pgAdmin is one such program that just happens to > be designed to > > help manage and build your databases. > > Thanks for the clarification, Dave. > That explains a lot of things! > And are there any database converters out there which can > convert windows based databases, especially Microsoft Access, > to PostgreSQL database readable files other than pgAdmin? I believe there was once some Access code that did it (though I don't know where it is). I doubt that it migrated tables, indexes, data as well as primary and foreign keys as the upcoming pgAdmin will! The current version does tables indexes and data BTW.
On Mon, 22 Jan 2001, Dave Page wrote: > > I believe there was once some Access code that did it (though I don't know > where it is). I doubt that it migrated tables, indexes, data as well as > primary and foreign keys as the upcoming pgAdmin will! The current version > does tables indexes and data BTW. Is this it? www.cynergi.net/prod/exportsql/ At the time I looked at it only mSQL v1, mSQL v2 or MySQL was supported but there is someone that added PG support. I ended up just hacking up some quick and not _so_ dirty code to get my data into PG. It lets the ODBC driver do the work. I've attached it for your amusement. -Cedar
> -----Original Message----- > From: Cedar Cox [mailto:cedarc@visionforisrael.com] > Sent: 23 January 2001 09:43 > To: Dave Page > Cc: 'Nicholas Chan'; Postgresql Interfaces > Subject: RE: [INTERFACES] Re: extremely newbie questions > > > > On Mon, 22 Jan 2001, Dave Page wrote: > > > > I believe there was once some Access code that did it > (though I don't know > > where it is). I doubt that it migrated tables, indexes, > data as well as > > primary and foreign keys as the upcoming pgAdmin will! The > current version > > does tables indexes and data BTW. > > Is this it? www.cynergi.net/prod/exportsql/ > At the time I looked at it only mSQL v1, mSQL v2 or MySQL was > supported > but there is someone that added PG support. I ended up just > hacking up > some quick and not _so_ dirty code to get my data into PG. > It lets the > ODBC driver do the work. I've attached it for your amusement. No it wasn't - I forget who wrote it but I recall that he/she did used to contribute to this list occasionally. Nice code BTW. It's easy to forget the joys of being able to SELECT INTO across databases! You should see the current code in the pgAdmin Migration Wizard - it's somewhat more complex to say the least!