hellblazeruk
asked on
dbisql
Hi,
I have a sql query that works in Interactive SQL, I would like to automate the query so I can the results in a file at the same time each day using dbisql.
I have the batch file (export.bat)
When I run this I get the error
Unable to open database connection.
[Sybase][ODBC Driver][SQL Anywhere]Database server not found[Sybase][ODBC Driver
][SQL Anywhere]Database server not found
SalesExport1.sql
I have tried these two connection also:
dbisql.exe "UID=custom;PWD=custom";
CONNECT
USING 'UID=custom;PWD=custom;DBN =micros';
I am running Interactive SQL Version 11.0.1, build 2596
What should the connection string be?
I have a sql query that works in Interactive SQL, I would like to automate the query so I can the results in a file at the same time each day using dbisql.
I have the batch file (export.bat)
REM Generate File
d:
cd \Export\
dbisql -q SalesExport1.sql
REM End of Script
d:
cd \Export\
dbisql -q SalesExport1.sql
REM End of Script
When I run this I get the error
Unable to open database connection.
[Sybase][ODBC Driver][SQL Anywhere]Database server not found[Sybase][ODBC Driver
][SQL Anywhere]Database server not found
SalesExport1.sql
//Import Routine
connect custom identified by custom;
SELECT item…………………….
connect custom identified by custom;
SELECT item…………………….
I have tried these two connection also:
dbisql.exe "UID=custom;PWD=custom";
CONNECT
USING 'UID=custom;PWD=custom;DBN
I am running Interactive SQL Version 11.0.1, build 2596
What should the connection string be?
try this: 'DSN=micros;UID=custom;PWD =custom'
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
and also a side note, if you're using odbc, you have to make sure that you have an odbc data source named micros that has your server name in it
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Wilcoxon, just need to adjust your solution.