是否可以获取dbms_random.random的源代码?或至少知道它是如何完成的?
例如,一种方法是
randomValue = RandSeed * $08088405 + 1
RandSeed = randomValue
但是dbms_random.value是怎么做的?
是;搜索dbmsrand.sql
。在我的Oracle 11g XE上,它位于
C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\dbmsrand.sql
plsql源在Oracle数据库中可用。
阅读包装规格-
------------
-- OVERVIEW
--
-- This package should be installed as SYS. It generates a sequence of
-- random 38-digit Oracle numbers. The expected length of the sequence
-- is about power(10,28), which is hopefully long enough.
--
--------
-- USAGE
--
-- This is a random number generator. Do not use for cryptography.
-- For more options the cryptographic toolkit should be used.
--
-- By default, the package is initialized with the current user
-- name, current time down to the second, and the current session.
--
-- If this package is seeded twice with the same seed, then accessed
-- in the same way, it will produce the same results in both cases.
--
--------