首页 \ 问答 \ 选择查询中的PL / SQL存储错误(PL/SQL Storage error in Select Query)

选择查询中的PL / SQL存储错误(PL/SQL Storage error in Select Query)

我有以下游标定义

cMultiplier     NUMBER := 100000000000000000 ;
CURSOR CR_TABLE1 IS 
SELECT to_char((COL_ID * cMultiplier) + SEQ,'0999999999999999999') "NEW_COL" 
FROM TABLE1;

然后这个光标被提取为

FETCH CR_TABLE1 
BULK COLLECT INTO AR_TABLE1 LIMIT I_BULK_LIMIT;
EXIT WHEN AR_TABLE1.COUNT = 0;

AR_TABLE1的类型

TYPE T_TABLE1 IS TABLE OF CR_TABLE1%ROWTYPE;
AR_TABLE1 T_TABLE1;

对于所有情况, COL_ID的测试值是1 ,并且SEQ的测试值是1234567654322 (13位数字)。 此值在长度为19时插入另一个VARCHAR类型的表中。

问题是光标到达FETCH ,它会引发异常,说明ORA-06500: PL/SQL: storage error

我知道它必须用select语句做一些事情,但我将它转换为字符串(varchar)。 为什么我遇到这个问题?


I have following cursor definition

cMultiplier     NUMBER := 100000000000000000 ;
CURSOR CR_TABLE1 IS 
SELECT to_char((COL_ID * cMultiplier) + SEQ,'0999999999999999999') "NEW_COL" 
FROM TABLE1;

Then this cursor is being fetched as

FETCH CR_TABLE1 
BULK COLLECT INTO AR_TABLE1 LIMIT I_BULK_LIMIT;
EXIT WHEN AR_TABLE1.COUNT = 0;

Where AR_TABLE1 is of type

TYPE T_TABLE1 IS TABLE OF CR_TABLE1%ROWTYPE;
AR_TABLE1 T_TABLE1;

The test values for COL_ID is 1 for all cases and the test values for SEQ is 1234567654322 (13 digit number). This value is being inserted as of length 19 in another table of type VARCHAR.

The problem is No sooner the cursor comes to FETCH, it throws exception stating ORA-06500: PL/SQL: storage error

I know it has to do something with select statement, but i am converting it into a string (varchar). Why i am running into this issue?


原文:https://stackoverflow.com/questions/8139061
更新时间:2022-01-29 20:01

最满意答案

根据您尝试使用Measure-VM,我假设您使用的是Hyper-V。 我在我的一个Hyper-V脚本中使用类似的东西:

(Get-VM dechiro1).HardDrives | ForEach {
    $GetVhd = Get-VHD -Path $_.Path
    [pscustomobject]@{
        Name = $_.Name
        Type = $GetVhd.VhdType
        ProvisionedGB = ($GetVhd.Size / 1GB)
        CommittedGB = ($GetVhd.FileSize / 1GB)
    }
}

基本上,对于每个虚拟机的硬盘驱动器,使用Get-VHD获取VHD详细信息,其中包括完整大小和我所称的承诺大小(磁盘上的实际空间)。

示例输出:

Name                                                   Type                 ProvisionedGB                   CommittedGB
----                                                   ----                 -------------                   -----------
Hard Drive on IDE controll...                       Dynamic                            20                    0.00390625
Hard Drive on IDE controll...                       Dynamic                            40                    0.00390625

编辑

如果您想从每个VM中提取并将VM名称包含在返回的对象中,并且您更喜欢使用管道表单,则可以使用:

Get-VM | ForEach { $Vm = $_; $_.HardDrives } | ForEach {
    $GetVhd = Get-VHD -Path $_.Path
    [pscustomobject]@{
        Vm = $Vm.Name
        Name = $_.Name
        Type = $GetVhd.VhdType
        ProvisionedGB = ($GetVhd.Size / 1GB)
        CommittedGB = ($GetVhd.FileSize / 1GB)
    }
}

Based on your attempt to use Measure-VM, I assumed you are using Hyper-V. I use something similar to this in one of my Hyper-V scripts:

(Get-VM dechiro1).HardDrives | ForEach {
    $GetVhd = Get-VHD -Path $_.Path
    [pscustomobject]@{
        Name = $_.Name
        Type = $GetVhd.VhdType
        ProvisionedGB = ($GetVhd.Size / 1GB)
        CommittedGB = ($GetVhd.FileSize / 1GB)
    }
}

Basically, for each of the virtual machine's hard drives, use Get-VHD to get the VHD details which includes the full size and what I refer to as the committed size (actual space on disk).

Example output:

Name                                                   Type                 ProvisionedGB                   CommittedGB
----                                                   ----                 -------------                   -----------
Hard Drive on IDE controll...                       Dynamic                            20                    0.00390625
Hard Drive on IDE controll...                       Dynamic                            40                    0.00390625

Edit:

If you wanted to pull from every VM and include the VM name with the returned object and you prefer to use the pipeline form, this will work:

Get-VM | ForEach { $Vm = $_; $_.HardDrives } | ForEach {
    $GetVhd = Get-VHD -Path $_.Path
    [pscustomobject]@{
        Vm = $Vm.Name
        Name = $_.Name
        Type = $GetVhd.VhdType
        ProvisionedGB = ($GetVhd.Size / 1GB)
        CommittedGB = ($GetVhd.FileSize / 1GB)
    }
}

相关问答

更多
  • 从Linux内核文档 : max_map_count: 该文件包含进程可能具有的最大内存映射区域数量。 内存映射区域被用作调用malloc的一个副作用,直接通过mmap和mprotect,以及加载共享库时。 虽然大多数应用程序需要少于一千个映射,但某些程序(尤其是malloc调试器)可能会占用很多映射,例如,每个分配最多包含一个或两个映射。 默认值是65536。 底线:该设置限制了离散映射内存区域的数量 - 本身不会限制这些区域的大小或进程可用的内存大小 。 是的,这是: sysctl -w vm.max_ ...
  • 是的,不是。 当你超过RAM时,Redis不会摔倒,但实际上并不推荐。 Redis作者撰写的一篇有趣的相关文章: http : //antirez.com/news/52 这并不意味着Redis是会话存储的糟糕选择,它只是意味着您需要根据容量需求适当地规划/调整架构/ RAM。 Yes and no. Redis won't fall over when you exceed RAM but it's really not recommended. An interesting related articl ...
  • 您可以为任何缓存创建和配置持久性存储[1]。 如果重新启动集群,则所有数据都将存在,并可使用IgniteCache#loadCache(..)方法重新加载到内存中。 开箱即用Ignite提供与RDBMS [2]和Cassandra [3]的集成。 此外,在未来的一个版本中(很可能是下一个版本2.1),Ignite将提供一个本地磁盘持久性存储,允许使用冷缓存运行,即在集群重启后无需显式重新加载。 我建议监视dev和用户Apache Ignite邮件列表以获取更多详细信息。 [1] https://apache ...
  • VBoxManage文档提供了以下Config文件行示例: Config file: /home/username/.VirtualBox/Machines/Windows XP/Windows XP.xml 因此,如果我们将您对vm_dir更改改为: vm_dir=`VBoxManage showvminfo "${vm}" | grep "Config file"| cut -2 -d:` 我们有配置文件的路径。 注意 :从=周围删除空格,因为这是不正确的。 要提取它的目录部分,我们将使用d ...
  • 与此同时,我找到了答案。 所有礼节对Deadline VirtualMachine vm = getVM(); // get the vm object List virtualDiskList = new ArrayList(); VirtualMachineConfigInfo vmConfig = vm.getConfig(); VirtualDevice[] vds = vmConfig.getHardware() ...
  • 您在Web角色和cspkg文件中看到的站点是编译的输出,因此您无法从中获取原始.cs文件。 也就是说,您可以使用Reflector,Just Decompile或其他各种反编译器之类的工具将编译后的位反向工程,使其与原始C#代码非常接近(不是我假设这是您自己的代码或没有反向工程规定的代码。 这至少可以让你使用webrole上的位来获取大部分代码,然后查看它以查看它的工作有多好。 注意,您可以打开cspkg文件。 它只是一个zip文件。 你可以使用.zip文件扩展名重命名并打开它,但你不会在那里找到.cs文件 ...
  • Ben H在评论中提供了答案,我只是在复制他的答案: $DiskArr -join "," 被改为 $DiskArr.DiskInfo -join "," 基本上问题是缺少属性名称。 我提供的对象,但没有任何财产参考。 The answer was provided in comments by Ben H. I am merely copying his answer: $DiskArr -join "," was changed to $DiskArr.DiskInfo -join " ...
  • 似乎我无法将实际和最大磁盘使用量集成到一个脚本中,因此我将它们分成两个。 对于实际的磁盘使用情况,我使用了以下脚本: Get-VM -VMName * | Select-Object VMid | Get-VHD | Select-Object Path, Size, FileSize 对于最大分配内存,我使用了以下脚本: Measure-VM -Name * | select-object -property VMName, TotalDiskAllocation It seems that I am ...
  • 根据您尝试使用Measure-VM,我假设您使用的是Hyper-V。 我在我的一个Hyper-V脚本中使用类似的东西: (Get-VM dechiro1).HardDrives | ForEach { $GetVhd = Get-VHD -Path $_.Path [pscustomobject]@{ Name = $_.Name Type = $GetVhd.VhdType ProvisionedGB = ($GetVhd.Size / 1G ...
  • 在物理内存中是否与页面边界重叠的内容实际上是连续的,现代内存处理程序永远无法知道。 内存粘合逻辑基本上将所有可寻址内存页面视为无序集合,并且排序基本上与进程相关联; 不能保证对于不同的进程最终被分配相同的两个物理内存页面(在不同的时间点),这些物理页面之间的表达关系将是相同的。 实际上,在CPU和处理这些东西的内存之间有一个转换层。 Whether or not something that overlaps a page boundary is actually contiguous in Physica ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)