powered by simpleCommunicator - 2.0.59     © 2025 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Sybase ASA, ASE, IQ [игнор отключен] [закрыт для гостей] / получить текущего пользователя sql-сервером
5 сообщений из 5, страница 1 из 1
получить текущего пользователя sql-сервером
    #32361753
Эдик1
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
как получить посредством sql имя текущего пользователя базы,
который допустим внес изменения в нее в данный момент.
заранее спасибо
...
Рейтинг: 0 / 0
получить текущего пользователя sql-сервером
    #32361808
dddd
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
With ASA
CURRENT USER
...
Рейтинг: 0 / 0
получить текущего пользователя sql-сервером
    #32361840
Эдик1
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
а как запрос составить
...
Рейтинг: 0 / 0
получить текущего пользователя sql-сервером
    #32361889
Andyn
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Лучше написать так:

select suser_name()

Работает и в ASA и в ASE.
...
Рейтинг: 0 / 0
получить текущего пользователя sql-сервером
    #32364332
d7i
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Рекомендую читать документацию:
----------------------------------------------

The following table lists properties available for each connection.

Descriptions

Property Description

Async2Read The number of rereads. A reread occurs when a read request for a page is received by the database IO subsystem while an asynchronous read IO operation has been posted to the operating system but has not completed.

AsyncRead The number of pages that have been read asynchronously from disk.

AsyncWrite The number of pages that have been written asynchronously to disk.

BlockedOn If the current connection is not blocked this is zero. If it is blocked, the connection number on which the connection is blocked due to a locking conflict.

CacheRead The number of database pages that have been looked up in the cache.

CacheReadIndInt The number of index internal-node pages that have been read from the cache.

CacheReadIndLeaf The number of index leaf pages that have been read from the cache.

CacheReadTable The number of table pages that have been read from the cache.
CacheWrite The number of pages in the cache that have been modified.
Commit The number of Commit requests that have been handled.
CommLink The communication link for the connection. This is one of the network protocols supported by SQL Anywhere, or is "local" for a connection without a SQL Anywhere Client.
CurrTaskSwitch The number of current request context switches.
Cursors The number of declared cursors that are currently being maintained by the engine.
CursorOpen Open cursors is the number of open cursors that are currently being maintained by the engine.
DBNumber The id number of the database.
DiskRead The number of pages that have been read from file.
DiskReadIndInt The number of index internal-node pages that have been read from disk.
DiskReadIndLeaf The number of index leaf pages that have been read from disk.
DiskReadTable The number of table pages that have been read from disk.
DiskSyncRead The number of pages that have been read synchronously from disk..
DiskSyncWrite The number of pages that have been written synchronously to disk. It is the sum of all the other "Disk SyncWrites" counters.
DiskWaitRead The number of times the engine has waited synchronously for the completion of a read IO operation which was originally issued as an asynchronous read. Waitreads often occur due to cache misses on systems that support asynchronous IO.
DiskWaitWrite The number of times engine has waited synchronously for the completion of a write IO operation which was originally issued as an asynchronous write.
DiskWrite The number of modified pages that have been written to disk.
FullCompare The number of comparisons beyond the hash value in an index that have been performed.
HintUsed The number of page-read operations that have been satisfied immediately from cache thanks to a earlier read hint.
IndAdd The number of entries that have been added to indexes.
IndLookup The number of entries that have been looked up in indexes.
LastIdle The number of ticks between requests.
LastReqTime The time at which the last request for the specified connection started.
LockTablePages The number of pages used for the lock table.
LogFreeCommit The number of Redo Free Commits. A "Redo Free Commit" occurs when a commit of the transaction log is requested but the log has already been written (so the commit was done for "free").
LogRewrite The number of pages that were previously written to the transaction log (but were not full) that have been written to the transaction log again (but with more data added).
LogWrite The number of pages that have been written to the transaction log.
Name The database name.
NodeAddress The node for the client in a client/server connection.
Number The ID number of the connection.
Port An application-specific number for each client machine, identifying the connection port.
PrepStmt The number of prepared statements that are currently being maintained by the engine.
ProcessTime The time since the start of the connection.
ReadHint The number of read hints. A read hint is an asynchronous read operation for a page that the database engine is likely to need soon.
ReqType A string for the type of the last request.
Rlbk The number of Rollback requests that have been handled.
RollbackLogPages The number of pages in the rollback log
SyncWriteChkpt The number of pages that have been written synchronously to disk for a checkpoint.
SyncWriteExtend The number of pages that have been written synchronously to disk while extending a database file.
SyncWriteFreeCurr The number of pages that have been written synchronously to disk to free a page that cannot remain in the in-memory free list.
SyncWriteFreePush The number of pages that have been written synchronously to disk to free a page that can remain in the in-memory free list.
SyncWriteLog The number of pages that have been written synchronously to the transaction log.
SyncWriteRlbk The number of pages that have been written synchronously to the rollback log.
SyncWriteUnkn The number of pages that have been written synchronously to disk for a reason not covered by other "Disk SyncWrites" counters.
TaskSwitch The number of times the current engine thread has been changed.
TaskSwitchCheck The number of times the current engine thread has volunteered to give up the CPU to another engine thread.
UncommitOp The number of uncommitted operations for the connection.
Userid The user ID for the connection.
VoluntaryBlock The number of engine threads that have voluntarily blocked on pending disk IO.
WaitReadCmp The number of read requests associated with a full comparison (a comparison beyond the hash value in an index) that must be satisfied by a synchronous read operation.
WaitReadOpt The number of read requests posted by the optimizer that must be satisfied by a synchronous read operation.
WaitReadSys The number of read requests posted from the system connection that must be satisfied by a synchronous read operation. The system connection is a special connection used as the context before a connection is made and for operations performed outside of any client connection.
WaitReadTemp The number of read requests for a temporary table that must be satisfied by a synchronous read operation.
WaitReadUnkn The number of read requests from other sources that must be satisfied by a synchronous read operation.
...
Рейтинг: 0 / 0
5 сообщений из 5, страница 1 из 1
Форумы / Sybase ASA, ASE, IQ [игнор отключен] [закрыт для гостей] / получить текущего пользователя sql-сервером
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]