Import / Export Database failure (Advice)

Welcome User Forums Software Problems Import / Export Database failure (Advice)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #93
    Chris
    Keymaster

    Due to the complex nature of network connection permissions and different PostgreSQL installations, it is possible for TScore to fail to export or import competition databases.
    If an import fails, you will normally get a popup message saying “.. relation ‘tsversion’ does not exist ..”.
    This means that although the database was created (which is done directly from within TScore), the import process itself did not (this is done using an external PostgreSQL utility, pg_dump or pgsql ).
    Similarly, when you try to export the current database, you bay file that you just have an empty .tsc file (it reports a size of about 160 bytes and when you open it in Notepad, it is empty).
    There are 3 possible reasons for the batch import to fail in an otherwise functioning installation.
    1. TScore is unable to locate the PostgreSQL executable needed to perform the import.
    2. The server is demanding a password for the batch file connection
    3. The import file is empty or damaged
    To work out what is the actual cause, you just need to run the batch command directly in a command shell. (Don’t worry – it’s not complicated!)
    Step 1: Run TScore, open a working competition, click Import/Export, then ‘Copy competition database’ and ‘Ok’.
    Step 2: Find the folder that has the batch file in. This is simply a folder called ‘Temp’ located inside the ‘entries’ folder for your current competition. (That’s the one shown in the Edit Competition screen.)
    Step 3: Using Windows Explorer, go to this folder. Then, click in the Explorer address bar, type ‘cmd’ and .
    Step 4: The previous action should launch a command prompt windows (black box). In here, type ‘temp.bat’ and
    .
    The batch file will run and try to perform the export again. If it fails, it will report one of the following messages:
    a) ‘The system cannot find the path specified’
    b) Password:
    c) ‘connection to database “XXXX” failed: FATAL password authentication failed for user “postgres”
    Now that we know the cause, we can fix it.
    a) This means that TScore cannot locate a PostgreSQL server installation on the local computer. So,
    a. Did you install it here, or does it only have the client connector? (you will need to install it, or do the export/import on the computer with PostgreSQL server on)
    b. It may be an unsupported version or a strange installation of PostgreSQL that TScore is unable to locate. It is possible to fix this, but it needs a registry edit at present. Please contact support for help with this.
    b) The server is asking for a password, but none is given (should only happen for Export in TScore versions older than 10.0.15 or import for versions older than 9.9.48). Either:
    a. Upgrade to a newer version of TScore, or
    b. Fix your PostgreSQL configuration file to trust connections from this computer (see post on ‘PostgreSQL connection configuration’).

    c) The wrong password has been set for your PostgreSQL server. You can either:
    a. Change the password in the TScore ‘Connect’ dialog or
    b. Fix the PostgreSQL configuration file as above.

    It is possible but highly unusual to have other failures when connecting to PostgreSQL from TScore. In these cases, you may have to resort to logging details of connection failures using the PostgreSQL tools. Contact support for help with this.

    • This topic was modified 7 years, 1 month ago by Chris.
    #137
    Chris
    Keymaster

    Update – improved error reporting has now been added to Version 10.0.15.
    You should now be told in more detail why an Import or Export attempt failed, so you can fix the problem.
    If there are any messages that don’t lead you to a solution in the above post, just put them into this thread and we will sort them out!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.