开发者

How do I get Sybase File Path, Transaction Log, & installation details?

开发者 https://www.devze.com 2023-01-22 17:50 出处:网络
I need to Retirve the following Details using Sybase SQL Query. 开发者_JAVA技巧1) Database Data File Path

I need to Retirve the following Details using Sybase SQL Query.

开发者_JAVA技巧

1) Database Data File Path

2) Database Transaction Log File Path

3) Path where SybaseSoftware Installed

4) Patch Installed on Sybase

Thanks.


That info is easy for a DBA to obtain in 30 seconds; with a GUI Admin tool in a few clicks.

Why do you want to obtain the details of the server installation VIA SQL ? If you are a coder you do not need that info to do your job; that info is the domain of the DBA, and changes as they administer the server. More important, the changes are transparent to the coder. Even if you did know it, it will not help or hinder you in your work.

Online Sybase Manuals

The "data and log file paths" in particular, are protected from direct access by developers (it is a secured ANSI SQL RDBMS).

Update

Evidently you did not bother to look up the manuals.

Open a session with the server, so that you can execute SQL commnands via "Sybase SQL Query". From your PC, Run either isql (character) or DBISQL (GUI); they are both on the Sybase PC Installation CD, you can also download them free.

  1. Devices ("Data File Paths"):

    sp_helpdevice
    go

    There are many Databases per server. There are many Devices per server. You will have to figure out (a) which Devices contain the Database you are interested in (b) Data Devices vs Log Devices.

    sp_helpdb
    go

  2. Log Devices ("Database Transaction Log File Path")

    (same as (1) )

  3. "Sybase Installation" or $HOME directory (on the server). There are two methods, the first is much easier:

    • via host system
      .
      • Log into the host system of the server, as the sybase user
      • You are already located in the sybase $HOME directory
      • It is the installation directory
      • (the original installer may have created directory trees for each version or EBF ("patch level"), but that is easy to figure out using Unix/DOS commands)
        .
    • via islq/DBISQL
      .
      sp_configure "configuration file"
      go
      .
      • This will give you the path to the configuration file. It is almost always, the file path to the $SYBASE or sybase>$HOME directory. You can move up or sideways in the directory tree, using Unix/DOS commands, and figure it out from there.
        .
  4. The version of the Sybase ASE is the only item from your list that is relevant to coders. It (including current EBF ("patch level") is obtained via:

    SELECT @@VERSION
    go

0

精彩评论

暂无评论...
验证码 换一张
取 消