Home > Archive > SQL Anywhere database > June 2005 > Error when when using unload...not sure how to troubleshoot.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Error when when using unload...not sure how to troubleshoot.
Chance

2005-06-10, 9:23 am

Hi,
I am trying to unload a database but am getting a SQL syntax error. I am not
sure how to troubleshoot this. Can anyone help out?

Unloading "GROUP1"."duplicate_isbn_tb" into duplicate_isbn_tb (relative to
serve
r)
***** SQL error: Syntax error near '(end of line)' on line 5

Here is the command I am using:
dbunload -c " uid=dba;pwd=sql;dsn=
blremote" -an blwmed.db

tia,
chance.


Joshua Savill

2005-06-10, 9:23 am

Chance,

What version and build of ASA are you running (dbsrvX -v, where X is the
major release version)?
Does this problem occur if you run:

dbunload -c " uid=dba;pwd=sql;dsn=
blremote" c:\some_relative_pat
h
dbinit blwmed.db
dbengX -n blwmed blwmed.db
dbisql -c " uid=dba;pwd=sql;eng=
blwmed" reload.sql

If so, where does the syntax error occur in reload.sql? What line?

--
Joshua Savill
iAnywhere Solutions - Product Support Analyst


"Chance" <chance@booklog.com> wrote in message news:42a99791@forums
-1-dub...
> Hi,
> I am trying to unload a database but am getting a SQL syntax error. I am
> not sure how to troubleshoot this. Can anyone help out?
>
> Unloading "GROUP1"."duplicate_isbn_tb" into duplicate_isbn_tb (relative to
> serve
> r)
> ***** SQL error: Syntax error near '(end of line)' on line 5
>
> Here is the command I am using:
> dbunload -c " uid=dba;pwd=sql;dsn=
blremote" -an blwmed.db
>
> tia,
> chance.
>
>



Reg Domaratzki \(iAnywhere Solutions\)

2005-06-10, 9:23 am

I'd trouble shoot this by changing your dbunload command to a three step
process :

dbunload -c " uid=dba;pwd=sql;dsn=
blremote" .
dbinit blwmed.db
dbisql -c "dbf=blwmed.db;uid=dba;pwd=sql" read reload.sql

When dbisql fails during the rebuild, you'll be able to see the exact SQL
statement that failed.

--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup

iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL

"Chance" <chance@booklog.com> wrote in message news:42a99791@forums
-1-dub...
> Hi,
> I am trying to unload a database but am getting a SQL syntax error. I am

not
> sure how to troubleshoot this. Can anyone help out?
>
> Unloading "GROUP1"."duplicate_isbn_tb" into duplicate_isbn_tb (relative to
> serve
> r)
> ***** SQL error: Syntax error near '(end of line)' on line 5
>
> Here is the command I am using:
> dbunload -c " uid=dba;pwd=sql;dsn=
blremote" -an blwmed.db
>
> tia,
> chance.
>
>



Chance

2005-06-10, 11:23 am

Ok, I tried that. This is where it is choking:

Is it because of the empty space after the OPTION statement?

C:\blwin32\Database>dbisql -c "dbf=blwmed.db;uid=dba;pwd=sql" read
reload.sql
Could not execute statement.
Syntax error near '(end of line)' on line 4
SQLCODE=-131, ODBC 3 State="42000"
File: "reload.sql" on line 4711, column 1
CREATE SYNCHRONIZATION USER "DesPlaines"
TYPE 'TCPIP'
ADDRESS 'host=booklog.oakton.edu;port=2439'
OPTION
You can continue executing, stop executing, or quit ISQL completely.
1. Stop
2. Continue
3. Exit
Select an option:



"Reg Domaratzki (iAnywhere Solutions)" <FirstName.LastName@ianywhere.com>
wrote in message news:42a99a72$1@foru
ms-2-dub...
> I'd trouble shoot this by changing your dbunload command to a three step
> process :
>
> dbunload -c " uid=dba;pwd=sql;dsn=
blremote" .
> dbinit blwmed.db
> dbisql -c "dbf=blwmed.db;uid=dba;pwd=sql" read reload.sql
>
> When dbisql fails during the rebuild, you'll be able to see the exact SQL
> statement that failed.
>
> --
> Reg Domaratzki, Sybase iAnywhere Solutions
> Sybase Certified Professional - Sybase ASA Developer Version 8
> Please reply only to the newsgroup
>
> iAnywhere Developer Community : http://www.ianywhere.com/developer
> iAnywhere Documentation :
> http://www.ianywhere.com/developer/product_manuals
> ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
> -> Choose SQL Anywhere Studio
> -> Set "Platform Preview" and "Time Frame" to ALL
>
> "Chance" <chance@booklog.com> wrote in message
> news:42a99791@forums
-1-dub...
> not
>
>



Joshua Savill

2005-06-10, 1:23 pm

Can you please provide the version and build of ASA (dbsrvX -v, where X is
the major version)?

Thanks,
--
Joshua Savill
iAnywhere Solutions - Product Support Analyst


"Chance" <chance@booklog.com> wrote in message
news:42a9b687$1@foru
ms-1-dub...
> Ok, I tried that. This is where it is choking:
>
> Is it because of the empty space after the OPTION statement?
>
> C:\blwin32\Database>dbisql -c "dbf=blwmed.db;uid=dba;pwd=sql" read
> reload.sql
> Could not execute statement.
> Syntax error near '(end of line)' on line 4
> SQLCODE=-131, ODBC 3 State="42000"
> File: "reload.sql" on line 4711, column 1
> CREATE SYNCHRONIZATION USER "DesPlaines"
> TYPE 'TCPIP'
> ADDRESS 'host=booklog.oakton.edu;port=2439'
> OPTION
> You can continue executing, stop executing, or quit ISQL completely.
> 1. Stop
> 2. Continue
> 3. Exit
> Select an option:
>
>
>
> "Reg Domaratzki (iAnywhere Solutions)" <FirstName.LastName@ianywhere.com>
> wrote in message news:42a99a72$1@foru
ms-2-dub...
>
>



Chris Keating \(iAnywhere Solutions\)

2005-06-10, 1:23 pm

It is likely since there is an expectation of some text after OPTION. Can
you post more of the source before and after line 4711?




"Chance" <chance@booklog.com> wrote in message
news:42a9b687$1@foru
ms-1-dub...
> Ok, I tried that. This is where it is choking:
>
> Is it because of the empty space after the OPTION statement?
>
> C:\blwin32\Database>dbisql -c "dbf=blwmed.db;uid=dba;pwd=sql" read
> reload.sql
> Could not execute statement.
> Syntax error near '(end of line)' on line 4
> SQLCODE=-131, ODBC 3 State="42000"
> File: "reload.sql" on line 4711, column 1
> CREATE SYNCHRONIZATION USER "DesPlaines"
> TYPE 'TCPIP'
> ADDRESS 'host=booklog.oakton.edu;port=2439'
> OPTION
> You can continue executing, stop executing, or quit ISQL completely.
> 1. Stop
> 2. Continue
> 3. Exit
> Select an option:
>
>
>
> "Reg Domaratzki (iAnywhere Solutions)" <FirstName.LastName@ianywhere.com>
> wrote in message news:42a99a72$1@foru
ms-2-dub...
>
>



Chance

2005-06-10, 1:23 pm

--

-- This command file reloads a database that was unloaded using "dbunload".

--

-- ( Version : 9.0.1.1873)

--

"Joshua Savill" <jsavill@ianywhere.com> wrote in message
news:42a9cd80$1@foru
ms-1-dub...
> Can you please provide the version and build of ASA (dbsrvX -v, where X is
> the major version)?
>
> Thanks,
> --
> Joshua Savill
> iAnywhere Solutions - Product Support Analyst
>
>
> "Chance" <chance@booklog.com> wrote in message
> news:42a9b687$1@foru
ms-1-dub...
>
>



Chance

2005-06-10, 1:23 pm

-------------------------------------------------

-- Create SQL Remote definitions

-------------------------------------------------

CREATE REMOTE TYPE "FILE" ADDRESS ''

go

CREATE REMOTE TYPE "MAPI" ADDRESS ''

go

CREATE REMOTE TYPE "VIM" ADDRESS ''

go

CREATE REMOTE TYPE "SMTP" ADDRESS ''

go

CREATE REMOTE TYPE "FTP" ADDRESS ''

go

CALL dbo.sa_sync( 35 , 'SET NEXTSYNCID', '' )

go

CREATE SYNCHRONIZATION USER "DesPlaines"

TYPE 'TCPIP'

ADDRESS 'host=booklog.oakton.edu;port=2439'

OPTION

go

CALL dbo.sa_sync( 0 , 'RESET NEXTSYNCID', '' )

go

commit work

go



-------------------------------------------------

-- Remove SQL Remote definitions

-------------------------------------------------

commit work

go

"Chris Keating (iAnywhere Solutions)" < Spam_NoThanks_keatin
g@iAnywhere.com>
wrote in message news:42a9cdad$1@foru
ms-1-dub...
> It is likely since there is an expectation of some text after OPTION. Can
> you post more of the source before and after line 4711?
>
>
>
>
> "Chance" <chance@booklog.com> wrote in message
> news:42a9b687$1@foru
ms-1-dub...
>
>



Reg Domaratzki \(iAnywhere Solutions\)

2005-06-13, 9:23 am

Can you dump the contents of the SYSSYNC table to a text file and post it
here please?


--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup

iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL

"Chance" <chance@booklog.com> wrote in message
news:42a9cf19$1@foru
ms-1-dub...
> -------------------------------------------------
>
> -- Create SQL Remote definitions
>
> -------------------------------------------------
>
> CREATE REMOTE TYPE "FILE" ADDRESS ''
>
> go
>
> CREATE REMOTE TYPE "MAPI" ADDRESS ''
>
> go
>
> CREATE REMOTE TYPE "VIM" ADDRESS ''
>
> go
>
> CREATE REMOTE TYPE "SMTP" ADDRESS ''
>
> go
>
> CREATE REMOTE TYPE "FTP" ADDRESS ''
>
> go
>
> CALL dbo.sa_sync( 35 , 'SET NEXTSYNCID', '' )
>
> go
>
> CREATE SYNCHRONIZATION USER "DesPlaines"
>
> TYPE 'TCPIP'
>
> ADDRESS 'host=booklog.oakton.edu;port=2439'
>
> OPTION
>
> go
>
> CALL dbo.sa_sync( 0 , 'RESET NEXTSYNCID', '' )
>
> go
>
> commit work
>
> go
>
>
>
> -------------------------------------------------
>
> -- Remove SQL Remote definitions
>
> -------------------------------------------------
>
> commit work
>
> go
>
> "Chris Keating (iAnywhere Solutions)"

< Spam_NoThanks_keatin
g@iAnywhere.com>
> wrote in message news:42a9cdad$1@foru
ms-1-dub...
Can[color=darkred]
<FirstName.LastName@ianywhere.com>[color=darkred]
step[color=darkred]
(relative[color=dark
red]
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com