user3233451
user3233451

Reputation: 119

How to determine present database server name - sybase ase

I need to determine present databse server name where i am running my sql so that i can perform some certain steps depending upon the environment.

Anybody know how to do this ?

Upvotes: 2

Views: 20575

Answers (3)

LonelyRogue
LonelyRogue

Reputation: 466

SELECT ASEHostName() 

on the ASE Instance will give you the Physical Machine Name , while

SELECT @@SERVERNAME

will give you the Database Server name that you would give when you setup ASE instance during installation.

-- In 'thoughts'...

Upvotes: 2

eric
eric

Reputation: 885

SELECT @@servername

Why? Because @@servername is a global variable and returns the name of the SAP ASE server.

Upvotes: 7

Vince
Vince

Reputation: 734

the ASE database server name can be found in:

1) in interfaces file (UNIX) or using DSEDIT in Windows
2) running select * from master..sysservers

Upvotes: 1

Related Questions