Questions tagged [sybase-sql-anywhere]
The sybase-sql-anywhere tag has no usage guidance.
61 questions
0
votes
1
answer
147
views
Sybase SQL Anywhere 17 - Can a database trigger call a system command?
I have a Sybase SQL Anywhere 17 server running on Linux, and I was wondering if it is possible to create a database trigger to execute a local operating system system command when an UPDATE is down on ...
0
votes
2
answers
123
views
Holding transactions as long as a user edits
As an application developer I'm used to using databases transactions only as a way to play in modifications after a user has clicked "save".
That's the way most database servers I'm familiar ...
1
vote
1
answer
424
views
Ubuntu - Sybase - PHP not able to connect
I'm trying to connect Sybase 17 from PHP(7.4, 8.0) Laravel running on apache2 on Ubuntu(18.4) system. We are using SQL Anywhere. Sybase is not installed on the same server.
We are getting this error -...
0
votes
1
answer
2k
views
SQL Anywhere 17 - Database server connection limit exceeded
I set up a new SQL Anywhere 17 Database in Sybase Server. I've got a lot of clients that should be able to connect to the Database over ODBC. The ODBC works fine but as soon as the third user tries to ...
1
vote
1
answer
217
views
Trigger creation for Sybase SQLAnywhere 16
I've been having the hardest time trying to create a trigger for a Sybase SAP SQLAnywhere 16 database following these docs.
Currently it's -131 syntax erroring on line 15/16 (the update statement), ...
0
votes
1
answer
65
views
Counting number of occurrences, how to "group by"
I have the following query, which works as intended. Database is Sybase SQLAnywhere, which follows t-sql syntax for the most part.
I'm trying to add a column to COUNT the number of times each "...
1
vote
1
answer
92
views
Next 10% of rows
I know TOP can return first 10% of row results, but how would I then get the next 10%?
I am trying to break up a query that crashes due to insufficient memory (java.lang.OutOfMemoryError), and want to ...
0
votes
0
answers
511
views
Import Sybase SQL Anywhere 8 DB into SQL Server without access to Sybase
This is my first post here and its a doosy. I am facing what seems to be a unique situation at the moment. I am in the process of moving my client to a new environment which includes decommissioning ...
1
vote
0
answers
134
views
UNLOAD TO status message
I am running a query with an UNLOAD statement to save the results into a CSV file,
UNLOAD
SELECT
...
FROM
...
WHERE
...
TO 'C:\\TEMP\\MyFile.csv'
QUOTE '"';
I am getting status updates like
55% ...
0
votes
1
answer
41
views
count number of unique occurrence of each value in 1st or 2nd column and print in 3rd column
SELECT
domain_Job.statusCode as "Status Code",
lookup_JobStatusCode.name as "Status Code Description"
FROM
domain_Job, domain_Client, lookup_JobStatusCode, domain_MasterServer, ...
1
vote
1
answer
433
views
How to select 2 fields in where clause
I want to match 2 pair of fields in where clause
select * from A where (x,y) in (select u,v from B)
Can some one guide me
1
vote
0
answers
93
views
Escape from Alcatraz: SqlAnywhere to MSSQL [closed]
Is there a migration tool that actually works for SAP SqlAnywhere 17 to MSSQL (any recent version)?
Searching for "sqlanywhere mssql migration" yields a variety of hits including SQL Server ...
0
votes
1
answer
2k
views
Get Updated_At for any change in row on Sybase?
I am working with a Sybase SQL Anywhere table that has horrible tracking of changes. I have a windows service that queries multiple tables every 5 minutes looking for changes, but one particular table ...
0
votes
0
answers
2k
views
New Sybase User can't SELECT Tables From Other User
I am accessing a Sybase database and have created a new user using:
CREATE USER "ThisNewUser" IDENTIFIED BY "ThisNewPassword";
I then granted privleges:
GRANT ALL TO "ThisNewUser"
I used the ...
1
vote
1
answer
1k
views
SQL Anywhere Long Varchar/Binary Column Length Limited to 32767
Attempting to set up a database table (Sybase SQL Anywhere 11.0.1) to store user uploaded documents as either BLOBs or base64 encoded strings, but running into an issue where the length of my LONG ...
0
votes
1
answer
75
views
I can't open my Pharmacy management software"based on sybase database"
I am stuck with my pharmacy management software running on Windows XP with a dongle as a security system. The database is Sybase.
I tried many backup copies but failed to open the program. Two ...
0
votes
1
answer
336
views
Data from Same Column Joined in Two Different Ways
In the following sybase query I would like to pull the vendor column twice: the first time I would like to pull the vendor associated with the ReceiveWorksheet table by associating it with a key ...
0
votes
1
answer
19k
views
Want to change a timestamp date to an integer YYYYMMDD
I have this input "2017-07-21 15:31:04.853453" and I want it to return "20170721" as output. How can I do it using cast or convert function?
My column input is the current time (CURRENT_TIMESTAMP).
...
1
vote
1
answer
115
views
Upload database records to AWS using TSQL?
We have an AWS account that will be installing some software that ultimately needs a subset of our customers' data. Our customer databases are either MS SQL Server or Sybase Anywhere. Is there a way ...
1
vote
1
answer
28k
views
Correlated sub-query on the same table with only one alias
I have query which look like this
SELECT *
FROM my_table
WHERE ... AND id IN (SELECT t2.id
FROM my_table t2
WHERE id = t2.id AND ... );
I know in this ...
0
votes
1
answer
5k
views
SQL Central for Sybase 16 SP 02
ALL,
First time post here in DB Administrators, so please be patient.
In the past long time ago I was working with Sybase SQL Anywhere on Windows. There I got the actual server, ISQL utility, and a ...
2
votes
1
answer
1k
views
How to view a list of databases under server in SQL Anywhere like we do in SQL Server
I am very new to SQL Anywhere. I have been working with SQL Server for a long time.
In SQL Server, if we need to see the list of database under server, we can see that under Server Explorer.
How can ...
3
votes
1
answer
3k
views
Importing and exporting data from a database to another using SyBase is taking a long time
In order to update a database(Sybase Adaptive Server Anywhere 8) I'm taking all the data from one database on clients computer and using
SELECT * FROM tabelName OUTPUT TO 'C:\path' FORMAT ASCII ...
1
vote
2
answers
3k
views
Connecting SQL Anywhere with Sybase database file on local computer
I have installed SQL Anywhere 12 in my system.
I have a .db file in my computer. I have no idea what is it's username and password.
If I try to connect to it by providing credentials- username=DBA ...
0
votes
1
answer
1k
views
SQL Anywhere 12 - exporting data to Excel
Do I need to install MS Office Excel on machine where is SQL Anywhere 12 server for below code to work?
Or SA 12 or Windows have MS Excel Driver builtin?
SELECT * FROM SalesOrders;
OUTPUT USING '...
1
vote
1
answer
680
views
Is it possible to run an .exe file from a CLR function?
Is it possible to run an .exe from CLR function with Sybase SQL Anywhere 12?
If yes then I thought about link this function and .exe with pipes, is it a good idea or do you have better ideas? If not ...
-1
votes
2
answers
796
views
How can we connect and execute oracle database objects from Sybase database objects [closed]
Could you please anybody let me know how to connect to oracle database and execute the stored procedure/function from Sybase database objects?
1
vote
1
answer
455
views
SQLAnywhere: Savepoint for ROLLBACK not found
What is the correct way on setting and rolling back to savepoint on SQLAnywhere. Having this snippet:
begin transaction;
SAVEPOINT spt_abc;
insert into eins (pl1) values (5);
SAVEPOINT spt_123;
...
0
votes
1
answer
34
views
mlagent: How to export remote task
When creating a new remote tasks via Sybase Central for mlagent, it is possible to import task from file.
How to export remote task to a file so it can be imported into another Sybase Central ...
0
votes
1
answer
217
views
MobiLink: How to add a new table to synchronisation using Sybase Central and mlagent
How to add a new table to a synchronisation using mlagent configured from Sybase Central. This might be related to this or this question.
When doing a change on remote database as described on ...
1
vote
1
answer
943
views
Sybase Central: How to set language for UI of Sybase Central
How to set the language for UI of Sybase Central.. It appears it's taking the language settings from Windows, but having e.g. an English Sybase Central on a German Windows -- how to achieve this?
...
2
votes
1
answer
232
views
MobiLink: How to propagade schema change for a synch profile to remote databases
Once an application is online with a synchronisation profile it might happen, that the profile needs to be changed. E.g. a new index is introduced, columns are added etc.
Having the synchronisation ...
1
vote
0
answers
38
views
MobiLink: What is the correct approach of presetting values inside database for remote user
When creating a remote database from inside Sybase Central I'm looking for a way to preset some values based on e.g. subscription user.
Application is using some kind of configuration table storing ...
1
vote
0
answers
90
views
MobiLink: How to export database users to remote database created via Sybase Central
How to configure a Sybase Central MobiLink project in the way, it's also exporting the database users of consolidated database to a remote database?
In default it appears to only create dba with ...
0
votes
2
answers
5k
views
SQLAnywhere: How to write result of a query into a file with non-interactive session
I'm looking for a way to write resultset of a query to a file maybe analog of queryout of MS SQL or the COPY from PostgreSQL
When using something like
select count(*) from "table" OUTPUT TO '...
1
vote
0
answers
93
views
SQLAnywhere: How to determine which path delimiter is used on database?
I need to build up a dynamic path from inside an SQL script. It started with something like
select left(
db_property('File'), charindex (
DB_PROPERTY ( 'Name' ), db_property('File')
)...
1
vote
1
answer
1k
views
SQLAnywhere: Visualize in real time CPU and RAM consumption of sql connections
I want to keep track of which connection use most of resources.
Within Sybase Central (SQL Anywhere 9, 12), for each server and database, we have pane to check in real time All Connected Users and ...
1
vote
1
answer
666
views
SQLAnywhere: How to configure length of message output to console/client when using isql
If got an issue with message command (as well as print) on SQLAnywhere.
When running message as a single command it appears that it's completely put everything where it should be.
But when using it ...
2
votes
1
answer
949
views
SQLAnywhere: Rename Foreign Key or Primary Key
I have a database with many duplicate index, foreign key, and primary key names. Duplicate index names can be renamed using:
ALTER INDEX <index name> ON <creator>.<tablename> RENAME ...
1
vote
1
answer
2k
views
SQLAnywhere: Cursor getting closed after executing a DDL statement
Having this code here:
DECLARE @rowfoo integer
DECLARE @query varchar (32000)
SET @query = 'CREATE OR REPLACE PROCEDURE testprocedure AS
BEGIN
print ''Just a dummy text''
...
1
vote
1
answer
483
views
SQLAnywhere: Switch to choose between WATCOM and T-SQL?
Is there any switch available to set/force a script using either Watcom or T-SQL dialect on SQLAnywehre?
1
vote
1
answer
1k
views
SQLAnywhere: Syntax error on call function; Call without IF construct is working
I've got this little code example where I call a procedure, which is taking 4 arguments:
DECLARE @tmp BIT
SET @tmp = 0
IF @tmp = 1
call __insert_to_notifications_table('foo', '1234', '5678', '...
2
votes
1
answer
119
views
SQLAnywhere: Failure on creation of procedure
I wanted to create a procedure like this:
CREATE OR REPLACE PROCEDURE __generate_new_VSN(@oldVSN varchar(100))
RETURNS VARCHAR(100)
AS
BEGIN
RETURN '1'
END
but getting when running it via isql:...
2
votes
1
answer
961
views
It seems our sql database is corrupted
Is there a way to completely check a SQL-Anywhere database (5.5.05) integrity?
"Validate" won't help: we had databases that were broken but "validate" always told us that everything is o.k.
I had ...
0
votes
1
answer
67
views
SQLAnywhere: Mobilink upload_fetch_column_conflict seems not to be executed
With Sybase Central I've configured a MobiLink test object, where I'm trying to detect a unique constrain violation before uploading. Unfortunately it appears upload_fetch_column_conflict seems to ...
1
vote
1
answer
700
views
How to get list of enabled/disabled features of SQLAnywhere
I'm looking to get a list of features, which are installed or enabled/disabled on a given SQLAnywhere instance. dblic is only showing the 'possible' feature based on lice, but not the actually ...
1
vote
1
answer
27
views
SQLRemote: Implicit synch of connected objects
I'm looking for the best way to synchronise foreign key relations with SQLRemote. So having e.g. this two tables
CREATE TABLE table1(
id integer not null default autoincrement,
name varchar(...
3
votes
1
answer
728
views
Sybase ASA: Saving and dropping all foreign keys and most Primary Keys for (Bulk) Insert
Background Information:
I am trying to migrate from an ASA 12 Database, to a ASA 12 Database by using a Remote Server.
I have to migrate a lot of Rows (not all), spread over a lot of tables (not all)....
1
vote
1
answer
325
views
Date and Time in Log file
I've the translated Sybase ASA 9 log file, and the log looks like
--UPDATE-1120-05402698411
UPDATE DBA.titulo_receber
SET dt_pagto='2014/apr/28 11:06:08.593',
id_situacao='BA',
...
0
votes
1
answer
5k
views
Setting up DBLink between two Sybase Databases
I am having dificulty finding anything on the net on this subject.
I am tasked with creating a DBLink between two Sybase Databases. At the moment it's not yet clear if they will be on the same server ...