免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4779 | 回复: 9
打印 上一主题 下一主题

请教个问题STRSQL [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-23 12:01 |只看该作者 |倒序浏览
一般用户使用了STRSQL后, 退出时如果保存了的话,下次还可以使用

我的问题是: 这些数据保存在哪里?因为我想查某个用户使用STRSQL的LOG

谢谢!

论坛徽章:
0
2 [报告]
发表于 2008-07-23 13:12 |只看该作者
进入后按shift+f1
里面的4option应该是你要的

论坛徽章:
0
3 [报告]
发表于 2008-07-24 10:12 |只看该作者
看自己的没有问题,我想看其他用户的SQL使用LOG

论坛徽章:
0
4 [报告]
发表于 2008-07-24 10:54 |只看该作者
让不同的用户建不同的member应给可以实现吧

论坛徽章:
0
5 [报告]
发表于 2008-07-28 11:35 |只看该作者
最后再顶下

论坛徽章:
0
6 [报告]
发表于 2008-07-28 16:40 |只看该作者

论坛徽章:
0
7 [报告]
发表于 2008-07-28 16:53 |只看该作者
偶是看不太懂啊。
希望有人能解释一下。

论坛徽章:
0
8 [报告]
发表于 2008-07-28 17:22 |只看该作者
All of you know about it and most of you have used it at some
point in time – the interactive SQL editor that comes as part of
SQL Development Kit, an IBM charged feature.
Recently I received a question as to the location of the
session statement history once you exit STRSQL and if it’s
possible to prune it out so only certain, good SQL statements
are kept. I knew a little bit about this but wanted to give a
more informed answer so I went all gung-ho and researched
it in greater detail. Boy, was I in for an unexpected ride!
Where and if your interactive SQL session attributes get
saved depends upon which option you choose when you exit
STRSQL. When you hit F3 to exit interactive SQL you will be
prompted with 4 options:
1=Save and exit session
2=Exit without saving session
3=Resume session
4=Save session in source file
Let's describe each one of them in greater detail.
1)
Being that the default on this option is 1, let's discuss what
happens when you simply hit Enter after hitting F3 to exit
interactive SQL. The system will save your session in a
Permanent Miscellaneous Space MI Object in the
QRECOVERY library (type 19 subtype EE). This is not a file,
and is not designed to be accessed by an end-user (i.e. you).
That said, if you really want to see what’s in this space, you
could do the following:
DMPSYSOBJ OBJ(ISQLST<usrprf>*) CONTEXT
( QRECOVERY) TYPE(19) SUBTYPE(EE)

If your user profile is TEST you would replace <usrprf> with
TEST (i.e. ISQLSTTEST*). This will create a spooled file
QPSRVDMP in your library. If you search this spooled file on
term "NAME-" you may get multiple hits. This will occur if you
ever work in interactive SQL on more than one AS400
workstation device. What this means is that you'll have
multiple space objects in the QRECOVERY library. The
naming convention IBM follows for these internal space
objects based on byte positions is:
01-06 :: ISQLST
07-16 :: User profile starting the session.
17-26 :: Workstation device name for session selection
27-30 :: Session number for
that workstation ID <0000 is first>
If you saved only one interactive
SQL session by using option 1
(Save and exit session) on the
Exit Interactive SQL display, you may resume that session at
any workstation. However, if you use option 1 to save two or
more sessions on different workstations, interactive SQL will
first attempt to resume a session that matches your work
station. If no matching sessions are available, then interactive
SQL will increase the scope of the search to include all
sessions that belong to your user ID. If no sessions for your
user ID are available, the system will create a new session for
your user ID and current workstation.
For example, you saved a session on workstation 1 and
saved another session on workstation 2 and you are currently
working at workstation 1. Interactive SQL will first attempt to
resume the session saved for workstation 1. If that session is
currently in use, interactive SQL will then attempt to resume
the session that was saved for workstation 2. If that session is
also in use, then the system will create a second session for
workstation 1.
However, suppose you are working at workstation 3 and want
to use the ISQL session associated with workstation 2. You
then may need to first delete the session from workstation 1
by using option 2 (Exit without saving session) on the Exit
Interactive SQL display.
2)
I already mentioned option 2 earlier. It could be useful if you
wish to delete some or all of these space objects to conserve
disk consumption on your system. Just sign on to the
workstation device name that you usually use for your
interactive SQL work and select option 2. This will delete the
space object maintained in QRECOVERY. If you keep
reentering STRSQL and selecting option 2 upon exit, you'll
delete all existing space objects.
3)
All the "Resume session" option does is bring you back to the
STRSQL editor. Think of it as Cancel, i.e. you changed your
mind and don't want to exit interactive SQL.
4)
This is where you control your destiny by explicitly telling the
system that you want to save SQL statements from the
interactive SQL session you've run. By default these
sessions will then be saved in the QSQLSESS source
physical file but you can select the library, file and member in
which you want the session information saved. This is a
regular, easily read source member and could prove useful if
you want to archive your STRSQL experiments.

论坛徽章:
0
9 [报告]
发表于 2008-07-28 18:00 |只看该作者
方法不错
就是看着有点不直观。

论坛徽章:
0
10 [报告]
发表于 2008-07-31 10:22 |只看该作者
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP