on 2020 Jan 22 6:14 AM
I installed odbc driver in linux and in docker with local server I have no problem but I couldn't connect to remote server in the container
When I run container I get the error.
pyodbc.OperationalError: ('08001', '[08001] [unixODBC] [SAP] [ODBC Driver] [SQL Anywhere] Database server not found (-100) (SQLDriverConnect)')
connect is with sqlalchemy
connectionString = Driver = {/ opt / sqlanywhere17 / lib64 / libdbodbc17.so}: SERVER = server: HOST = 160.112.23.175: PORT = 18000: UID = user11: PWD = user11sql
quoted = quote_plus(connectionString)
new_con = 'sybase+pyodbc:///?odbc_connect={}'.format(quoted)
engine = create__engine(new_con)
I really don't know what to do, I've been going round in circles with this for over a day now. Some help would be greatly appreciated!
Request clarification before answering.
I guess you specified HOST and PORT in an inappropriate manner, the syntax for the HOST connection parameter with specified port is
HOST = 160.112.23.175:18000
there is no separate PORT connection parameter.
AFAIK, "PORT=" is only supported when not using the HOST connection parameter but using the LINKS connection parameter which has a PORT protocol option as part of the network options, i.e. "LINKS=TCPIP(HOST=160.112.23.175;PORT=18000)".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
30 | |
10 | |
8 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.