|
|
|
|
Hello,
I have adaptive server anywhere network server version 9.0.2.2451 running
database on Windows 2000 server.
What I am trying to do is to make ODBC connection using SQL Anywhere 9.0
driver to the database mentioned above.
But the problem is my ODBC connection works only when iAnywhere on the
server is shutdown.
Is there any way to have iAnywhere running database on the server and at the
same time query/update it using
ODBC connection on the other PC for example from MSAccess or .NET?
Thank you.
--
YB
| |
| Chris Keating(iAnywhere Solutions) 2005-12-12, 8:24 pm |
| Are you running the network server -- dbsrv9?
What is the connection parameters for your current DSN configuration?
--
Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8
********************
********************
********************
*****************
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!
http://www.ianywhere.com/promos/deved/index.html
********************
********************
********************
*****************
iAnywhere Solutions http://www.iAnywhere.com
** Please only post to the newsgroup
** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use Case Express to report bugs http://case-express.sybase.com
********************
********************
********************
*****************
| |
|
| My network server starts like this:
dbsrv9 -c 4096 -n serverany -o message.txt dbany.db
And my DSN setting are as follows:
ODBC tab: Data source name - sqlany
Isolation level - blank
Prevent driver not capable errors - checked
Delay AuotCommit until statement close - checked
Describe cursor bahvior - If required
Login tab: User id - abc
password - 12345
Database tab: server name - serverany
start line - blank
database name - dbany
database file - L:\dbany.db
start database automatically - checked
stop database after last disconnect - checked
Network tab: Shared memory - checked
buffer size - 1460
Select the method for encryption of network
packets - none
Advanced tab: Allow multiple record fetching - checked
The rest is either blank or unchecked
When dbsrv9 is stopped on the server my DSN works perfect. Otherwise I get
'File Already in Use' message
So I am looking for a way to have server running database and able to query
that databse at the same time.
Thank you.
YB
"Chris Keating(iAnywhere Solutions)"
< NoSpamPlease_k_e_a_t
_i_n_g@i_A_n_y_w_h_e
_r_e.com> wrote in message
news:439e1948$1@foru
ms-1-dub...
> Are you running the network server -- dbsrv9?
>
> What is the connection parameters for your current DSN configuration?
>
>
>
> --
>
> Chris Keating
> Sybase Adaptive Server Anywhere Professional Version 8
>
> ********************
********************
********************
*****************
> Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
> and try out the market-leading database for mobile, embedded and small to
> medium sized business environments for free!
>
> http://www.ianywhere.com/promos/deved/index.html
>
> ********************
********************
********************
*****************
>
> iAnywhere Solutions http://www.iAnywhere.com
>
> ** Please only post to the newsgroup
>
> ** Whitepapers can be found at http://www.iAnywhere.com/developer
> ** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
> ** Use Case Express to report bugs http://case-express.sybase.com
>
> ********************
********************
********************
*****************
| |
| Greg Fenton 2005-12-14, 8:24 pm |
| YB wrote:
> When dbsrv9 is stopped on the server my DSN works perfect. Otherwise I get
> 'File Already in Use' message
> So I am looking for a way to have server running database and able to query
> that databse at the same time.
Try adding "LOG=c:/asa_conn.txt" to Additional Connection Parameters in
the Advanced tab (or enable the "Display debugging information..."
checkbox and fill in the file location). After a failed attempt to
connect, take a look at the contents of the debug file to see what the
client is trying to do.
If you aren't sure, post the file here.
greg.fenton
| |
|
| This is what I've got:
Wed Dec 14 2005 16:34:12
16:34:12 Application information:
16:34:12 "HOST=YB;OS=Windows XP Build 2600 Service Pack
2;PID=0xfbc;THREAD=0
x5dc;EXE=C:\Program Files\Microsoft
Office\Office\MSACCE
SS.EXE;VERSION=9.0.2. 2451;API=ODBC;TIMEZO
NEADJUSTMENT=-300"
16:34:12 Attempting to connect using:
UID=dba;PWD=********
;DBN=dbany;DBF=L:\db
any. db;ENG=serverany;CON
=SQL_DBC_7ee49e8;AST
OP=YES;INT=NO;DBG=YE
S;LOG=c:\aaa\a.txt;DMRF=NO;COMP=NO
16:34:12 Attempting to connect to a running server...
16:34:12 Attempting SharedMemory connection (no asasrv.ini cached address)
16:34:12 Failed to connect over SharedMemory
16:34:12 No server found, attempting to start a personal server...
16:34:13 Autostarted server, attempting to connect using:
UID=dba;PWD=********
;DBN=dbany;DBF=L:\db
any. db;ENG=serverany;CON
=SQL_DBC_7ee49e8;AST
OP=YES;INT=NO;DBG=YE
S;LOG=c:\aaa\a.txt;DMRF=NO;COMP=NO
16:34:13 Attempting SharedMemory connection (no asasrv.ini cached address)
16:34:13 Connected to server over SharedMemory
16:34:13 Connected to ASA Engine version 9.0.2.2451
16:34:13 Connected to the server, attempting to connect to a running
database...
16:34:13 Connecting to database unsuccessful because database is not running
16:34:13 Attempting to start the database...
16:34:13 Could not start the database
16:34:13 Communication function i_cs_HandleSQLPresEr
ror code 6
16:34:13 Communication function StrmGetInd code 3
>End OF File
--
Yuriy Bas
Research and Development
New York Merchants Protective Company, Inc
Phone: (516) - 561- 5210
Fax: (516) - 223- 0767
"Greg Fenton" <greg. fenton_NOSPAM_@ianyw
here.com> wrote in message
news:43a076b3$1@foru
ms-1-dub...
> YB wrote:
>
> Try adding "LOG=c:/asa_conn.txt" to Additional Connection Parameters in
> the Advanced tab (or enable the "Display debugging information..."
> checkbox and fill in the file location). After a failed attempt to
> connect, take a look at the contents of the debug file to see what the
> client is trying to do.
>
> If you aren't sure, post the file here.
>
> greg.fenton
| |
| Greg Fenton 2005-12-14, 8:24 pm |
| YB wrote:
> My network server starts like this:
>
> dbsrv9 -c 4096 -n serverany -o message.txt dbany.db
> [...]
> Database tab: server name - serverany
> start line - blank
> database name - dbany
> database file - L:\dbany.db
Are the server and client running on separate machines?
Is L:\ a local drive or a network mount?
greg.fenton
| |
|
| Yes, server and client running on different machines. L:\ is a reference
from client
to mapped network drive where my database is running.
--
YB
"Greg Fenton" <greg. fenton_NOSPAM_@ianyw
here.com> wrote in message
news:43a0a2ea$1@foru
ms-2-dub...
> YB wrote:
>
>
> Are the server and client running on separate machines?
> Is L:\ a local drive or a network mount?
>
> greg.fenton
| |
|
| I got it working! On Network tab of DSN configuration I unchecked Shared
memory and checked tcp/ip without entering any IP
in the box. As soon as server name is specified on Database tab, it will
work.
I tried this modified DSN with one of my old MS Access projects and it
worked just fine.
Thank you.
--
YB
"Greg Fenton" <greg. fenton_NOSPAM_@ianyw
here.com> wrote in message
news:43a0a2ea$1@foru
ms-2-dub...
> YB wrote:
>
>
> Are the server and client running on separate machines?
> Is L:\ a local drive or a network mount?
>
> greg.fenton
| |
| Greg Fenton 2005-12-15, 8:23 pm |
| YB wrote:
> I got it working! On Network tab of DSN configuration I unchecked Shared
> memory and checked tcp/ip without entering any IP
> in the box. As soon as server name is specified on Database tab, it will
> work.
Yep, great.
You must click on TCP/IP if you want the client to connect over the
network. Otherwise shared memory will be the only thing attempted and
shmem only works for local engines.
Another thing to note is that the file location is relative to where the
*server* is running...it is irrelevant to where the client is running.
You do *not* need to have file system access to the .db file for the
client to work...the client simply needs to connect to the server.
Based on the info from your post, you could create the DSN with:
dbdsn -wu mytestdsn -c
" uid=abc;pwd=12345;en
g=serverany;dbn=dban
y;links=tcpip"
Then you could verify that it is working with:
dbping -d -c "dsn=mytestdsn"
or for logging of diagnosis information:
dbping -d -c " dsn=mytestdsn;log=c:
\asa_connection.out"
Hope this helps,
greg.fenton
|
|
|
|