import PyPDF2 with open("myfile.pdf", "rb") as f: reader = PyPDF2.PdfReader(f) text = "" for page in reader.pages: text += page.extract_text()
Server: 192.168.1.100 Port: 1521 Database: ORCLPDB Open (or create) tnsnames.ora (usually in $ORACLE_HOME/network/admin or ~/oracle/ ). convertir pdf a tns
A PDF is a document format. A TNS file ( tnsnames.ora ) is a plain text configuration file for Oracle databases. There is no direct conversion from a PDF to a TNS file — you cannot magically extract database connection info from a random PDF. import PyPDF2 with open("myfile
MYDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.100)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORCLPDB) ) ) Replace MYDB , HOST , PORT , SERVICE_NAME with values from your PDF. tnsping MYDB Or connect with SQL*Plus: There is no direct conversion from a PDF
import PyPDF2 with open("myfile.pdf", "rb") as f: reader = PyPDF2.PdfReader(f) text = "" for page in reader.pages: text += page.extract_text()
Server: 192.168.1.100 Port: 1521 Database: ORCLPDB Open (or create) tnsnames.ora (usually in $ORACLE_HOME/network/admin or ~/oracle/ ).
A PDF is a document format. A TNS file ( tnsnames.ora ) is a plain text configuration file for Oracle databases. There is no direct conversion from a PDF to a TNS file — you cannot magically extract database connection info from a random PDF.
MYDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.100)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORCLPDB) ) ) Replace MYDB , HOST , PORT , SERVICE_NAME with values from your PDF. tnsping MYDB Or connect with SQL*Plus: