The Oracle database service has been started, but the sys user fails to access the database through PL/SQL Developer.
Step 1 Restart the server before reinstalling the Oracle database.
Step 2 Set the database service name and port number in the tnsnames.ora file to the actual values.
The Oracle database port is not the default port 1521. (The sys user uninstalls the Oracle database and reinstalls it without restarting the server. The port of the reinstalled Oracle database is not 1521.)