stored procedure 'sp_pb60table' not found.specify owner.objectname or user sp_help to chech whether the object exists(sp_help may produce lots of output!”
这是什么意思?
12 个解决方案
#1
我以前也遇到过这个问题,这是pb6。5与sybase连接的一个bug,你只要用sqladv。exe这个小工具运行一下下面代码就行了。
#2
print 'sp_pb60column'
SETUSER 'dbo'
go
/*------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60column lists the columns in a table. */
/* The objectid is required as arg1. */
/*------------------------------------------------*/
create proc sp_pb60column
@id int
as
declare @text varchar(255)
select @text = null
select c.colid, c.status, c.type, c.length, c.name, c.usertype,
c.prec, c.scale, @text
from dbo.syscolumns c where c.id = @id and c.cdefault = 0
union select
c.colid, c.status, c.type, c.length, c.name, c.usertype,
c.prec, c.scale, m.text
from dbo.syscolumns c, dbo.syscomments m where c.id = @id
and c.cdefault = m.id and m.colid = 1
order by c.colid
go
SETUSER
go
grant Execute on sp_pb60column to public
go
print 'sp_pb60db'
SETUSER 'dbo'
go
/*-----------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60db retrieves the names of all databases */
/* available for this server. */
/*-----------------------------------------------------*/
create proc sp_pb60db as
select name from master.dbo.sysdatabases
go
SETUSER
go
grant Execute on sp_pb60db to public
go
print 'sp_pb60extcat'
SETUSER 'dbo'
go
SETUSER 'dbo'
go
/*------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60column lists the columns in a table. */
/* The objectid is required as arg1. */
/*------------------------------------------------*/
create proc sp_pb60column
@id int
as
declare @text varchar(255)
select @text = null
select c.colid, c.status, c.type, c.length, c.name, c.usertype,
c.prec, c.scale, @text
from dbo.syscolumns c where c.id = @id and c.cdefault = 0
union select
c.colid, c.status, c.type, c.length, c.name, c.usertype,
c.prec, c.scale, m.text
from dbo.syscolumns c, dbo.syscomments m where c.id = @id
and c.cdefault = m.id and m.colid = 1
order by c.colid
go
SETUSER
go
grant Execute on sp_pb60column to public
go
print 'sp_pb60db'
SETUSER 'dbo'
go
/*-----------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60db retrieves the names of all databases */
/* available for this server. */
/*-----------------------------------------------------*/
create proc sp_pb60db as
select name from master.dbo.sysdatabases
go
SETUSER
go
grant Execute on sp_pb60db to public
go
print 'sp_pb60extcat'
SETUSER 'dbo'
go
#3
/*-------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60extcat checks the status of PB Catalog. */
/* Returns cExists[10] with Y/N values. */
/*-------------------------------------------------*/
create procedure sp_pb60extcat
as
declare @tbl char(1)
declare @col char(1)
declare @fmt char(1)
declare @vld char(1)
declare @edt char(1)
declare @tblproc char(1)
declare @colproc char(1)
declare @fmtproc char(1)
declare @vldproc char(1)
declare @edtproc char(1)
declare @existbuff char(10)
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcattbl'))
select @tbl = 'Y'
else
select @tbl = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatcol'))
select @col = 'Y'
else
select @col = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatfmt'))
select @fmt = 'Y'
else
select @fmt = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatvld'))
select @vld = 'Y'
else
select @vld = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatedt'))
select @edt = 'Y'
else
select @edt = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_cattbl'))
select @tblproc = 'Y'
else
select @tblproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catcol'))
select @colproc = 'Y'
else
select @colproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catfmt'))
select @fmtproc = 'Y'
else
select @fmtproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catvld'))
select @vldproc = 'Y'
else
select @vldproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catedt'))
select @edtproc = 'Y'
else
select @edtproc = 'N'
select @existbuff = @tbl + @col + @fmt + @vld + @edt +
@tblproc + @colproc + @fmtproc +
@vldproc + @edtproc
select @existbuff
go
SETUSER
go
grant Execute on sp_pb60extcat to public
go
print 'sp_pb60fktable'
SETUSER 'dbo'
go
/*--------------------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60fktable lists the tables that reference this table. */
/*--------------------------------------------------------------*/
create procedure sp_pb60fktable
@objname varchar(61) = null
as
declare @objid int
declare @isolevel int /* ptrack 325579 isolation level */
if (@objname is null)
return (1)
select @objid = object_id(@objname)
/* ptrack 325579 override isolation level 0 default */
select @isolevel = @@isolation
if @isolevel = 0
begin
set transaction isolation level 1
end
select o.name, o.id, o.type, o.uid, user_name(o.uid)
from dbo.sysobjects o, dbo.sysreferences r
where r.reftabid = @objid and
r.tableid = o.id
if @isolevel = 0
begin
set transaction isolation level 0
end
go
SETUSER
go
grant Execute on sp_pb60fktable to public
go
print 'sp_pb60foreignkey'
SETUSER 'dbo'
go
/* PowerBuilder Client Library Interface */
/* sp_pb60extcat checks the status of PB Catalog. */
/* Returns cExists[10] with Y/N values. */
/*-------------------------------------------------*/
create procedure sp_pb60extcat
as
declare @tbl char(1)
declare @col char(1)
declare @fmt char(1)
declare @vld char(1)
declare @edt char(1)
declare @tblproc char(1)
declare @colproc char(1)
declare @fmtproc char(1)
declare @vldproc char(1)
declare @edtproc char(1)
declare @existbuff char(10)
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcattbl'))
select @tbl = 'Y'
else
select @tbl = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatcol'))
select @col = 'Y'
else
select @col = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatfmt'))
select @fmt = 'Y'
else
select @fmt = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatvld'))
select @vld = 'Y'
else
select @vld = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatedt'))
select @edt = 'Y'
else
select @edt = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_cattbl'))
select @tblproc = 'Y'
else
select @tblproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catcol'))
select @colproc = 'Y'
else
select @colproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catfmt'))
select @fmtproc = 'Y'
else
select @fmtproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catvld'))
select @vldproc = 'Y'
else
select @vldproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catedt'))
select @edtproc = 'Y'
else
select @edtproc = 'N'
select @existbuff = @tbl + @col + @fmt + @vld + @edt +
@tblproc + @colproc + @fmtproc +
@vldproc + @edtproc
select @existbuff
go
SETUSER
go
grant Execute on sp_pb60extcat to public
go
print 'sp_pb60fktable'
SETUSER 'dbo'
go
/*--------------------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60fktable lists the tables that reference this table. */
/*--------------------------------------------------------------*/
create procedure sp_pb60fktable
@objname varchar(61) = null
as
declare @objid int
declare @isolevel int /* ptrack 325579 isolation level */
if (@objname is null)
return (1)
select @objid = object_id(@objname)
/* ptrack 325579 override isolation level 0 default */
select @isolevel = @@isolation
if @isolevel = 0
begin
set transaction isolation level 1
end
select o.name, o.id, o.type, o.uid, user_name(o.uid)
from dbo.sysobjects o, dbo.sysreferences r
where r.reftabid = @objid and
r.tableid = o.id
if @isolevel = 0
begin
set transaction isolation level 0
end
go
SETUSER
go
grant Execute on sp_pb60fktable to public
go
print 'sp_pb60foreignkey'
SETUSER 'dbo'
go
#4
太多了吧?我怎么运行呀
#5
这还没贴完呢,刚才我连续发了3个帖子她就不让发了,我想删除其中一贴,可是没找到删除按扭,sign……这也太次了一点吧~~~~
其实这个代码是存成.sql文件,你用sqladv.exe可以打开它,不要看见代码多就认为执行速度慢,我执行这个代码就用了几分钟,很快的。
可是我现在没办法贴完整的代码,这个网站又不让上传文件,我也不知道该怎么半了
其实这个代码是存成.sql文件,你用sqladv.exe可以打开它,不要看见代码多就认为执行速度慢,我执行这个代码就用了几分钟,很快的。
可是我现在没办法贴完整的代码,这个网站又不让上传文件,我也不知道该怎么半了
#6
直接你告诉我是哪个sql文件,我找找
#7
是不是pbsyc.sql和pbsyc2.sql这两个文件?
这两个文件光盘上没有,可以下载吗?
这两个文件光盘上没有,可以下载吗?
#8
一样的问题哦
#9
pb6.5连接sybase时需要执行一个过程,(自己的产品连接还有限制,真不知道他们是怎么想的)
你可以找找, 这些存储过程一般在pb的安装盘上(好像
叫做pbsyb60.sql),看看有没有??
你可以找找, 这些存储过程一般在pb的安装盘上(好像
叫做pbsyb60.sql),看看有没有??
#10
如果没有的话,把信箱留下,
#11
我也出现同样的问题
zhuang_zm@tom.com
zhuang_zm@tom.com
#12
我的这个文件名是sp_pb6070proc.sql,估计是帮我找到这个文件的哥么自己起的名字,你找找吧!
#1
我以前也遇到过这个问题,这是pb6。5与sybase连接的一个bug,你只要用sqladv。exe这个小工具运行一下下面代码就行了。
#2
print 'sp_pb60column'
SETUSER 'dbo'
go
/*------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60column lists the columns in a table. */
/* The objectid is required as arg1. */
/*------------------------------------------------*/
create proc sp_pb60column
@id int
as
declare @text varchar(255)
select @text = null
select c.colid, c.status, c.type, c.length, c.name, c.usertype,
c.prec, c.scale, @text
from dbo.syscolumns c where c.id = @id and c.cdefault = 0
union select
c.colid, c.status, c.type, c.length, c.name, c.usertype,
c.prec, c.scale, m.text
from dbo.syscolumns c, dbo.syscomments m where c.id = @id
and c.cdefault = m.id and m.colid = 1
order by c.colid
go
SETUSER
go
grant Execute on sp_pb60column to public
go
print 'sp_pb60db'
SETUSER 'dbo'
go
/*-----------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60db retrieves the names of all databases */
/* available for this server. */
/*-----------------------------------------------------*/
create proc sp_pb60db as
select name from master.dbo.sysdatabases
go
SETUSER
go
grant Execute on sp_pb60db to public
go
print 'sp_pb60extcat'
SETUSER 'dbo'
go
SETUSER 'dbo'
go
/*------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60column lists the columns in a table. */
/* The objectid is required as arg1. */
/*------------------------------------------------*/
create proc sp_pb60column
@id int
as
declare @text varchar(255)
select @text = null
select c.colid, c.status, c.type, c.length, c.name, c.usertype,
c.prec, c.scale, @text
from dbo.syscolumns c where c.id = @id and c.cdefault = 0
union select
c.colid, c.status, c.type, c.length, c.name, c.usertype,
c.prec, c.scale, m.text
from dbo.syscolumns c, dbo.syscomments m where c.id = @id
and c.cdefault = m.id and m.colid = 1
order by c.colid
go
SETUSER
go
grant Execute on sp_pb60column to public
go
print 'sp_pb60db'
SETUSER 'dbo'
go
/*-----------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60db retrieves the names of all databases */
/* available for this server. */
/*-----------------------------------------------------*/
create proc sp_pb60db as
select name from master.dbo.sysdatabases
go
SETUSER
go
grant Execute on sp_pb60db to public
go
print 'sp_pb60extcat'
SETUSER 'dbo'
go
#3
/*-------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60extcat checks the status of PB Catalog. */
/* Returns cExists[10] with Y/N values. */
/*-------------------------------------------------*/
create procedure sp_pb60extcat
as
declare @tbl char(1)
declare @col char(1)
declare @fmt char(1)
declare @vld char(1)
declare @edt char(1)
declare @tblproc char(1)
declare @colproc char(1)
declare @fmtproc char(1)
declare @vldproc char(1)
declare @edtproc char(1)
declare @existbuff char(10)
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcattbl'))
select @tbl = 'Y'
else
select @tbl = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatcol'))
select @col = 'Y'
else
select @col = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatfmt'))
select @fmt = 'Y'
else
select @fmt = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatvld'))
select @vld = 'Y'
else
select @vld = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatedt'))
select @edt = 'Y'
else
select @edt = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_cattbl'))
select @tblproc = 'Y'
else
select @tblproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catcol'))
select @colproc = 'Y'
else
select @colproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catfmt'))
select @fmtproc = 'Y'
else
select @fmtproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catvld'))
select @vldproc = 'Y'
else
select @vldproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catedt'))
select @edtproc = 'Y'
else
select @edtproc = 'N'
select @existbuff = @tbl + @col + @fmt + @vld + @edt +
@tblproc + @colproc + @fmtproc +
@vldproc + @edtproc
select @existbuff
go
SETUSER
go
grant Execute on sp_pb60extcat to public
go
print 'sp_pb60fktable'
SETUSER 'dbo'
go
/*--------------------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60fktable lists the tables that reference this table. */
/*--------------------------------------------------------------*/
create procedure sp_pb60fktable
@objname varchar(61) = null
as
declare @objid int
declare @isolevel int /* ptrack 325579 isolation level */
if (@objname is null)
return (1)
select @objid = object_id(@objname)
/* ptrack 325579 override isolation level 0 default */
select @isolevel = @@isolation
if @isolevel = 0
begin
set transaction isolation level 1
end
select o.name, o.id, o.type, o.uid, user_name(o.uid)
from dbo.sysobjects o, dbo.sysreferences r
where r.reftabid = @objid and
r.tableid = o.id
if @isolevel = 0
begin
set transaction isolation level 0
end
go
SETUSER
go
grant Execute on sp_pb60fktable to public
go
print 'sp_pb60foreignkey'
SETUSER 'dbo'
go
/* PowerBuilder Client Library Interface */
/* sp_pb60extcat checks the status of PB Catalog. */
/* Returns cExists[10] with Y/N values. */
/*-------------------------------------------------*/
create procedure sp_pb60extcat
as
declare @tbl char(1)
declare @col char(1)
declare @fmt char(1)
declare @vld char(1)
declare @edt char(1)
declare @tblproc char(1)
declare @colproc char(1)
declare @fmtproc char(1)
declare @vldproc char(1)
declare @edtproc char(1)
declare @existbuff char(10)
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcattbl'))
select @tbl = 'Y'
else
select @tbl = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatcol'))
select @col = 'Y'
else
select @col = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatfmt'))
select @fmt = 'Y'
else
select @fmt = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatvld'))
select @vld = 'Y'
else
select @vld = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatedt'))
select @edt = 'Y'
else
select @edt = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_cattbl'))
select @tblproc = 'Y'
else
select @tblproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catcol'))
select @colproc = 'Y'
else
select @colproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catfmt'))
select @fmtproc = 'Y'
else
select @fmtproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catvld'))
select @vldproc = 'Y'
else
select @vldproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catedt'))
select @edtproc = 'Y'
else
select @edtproc = 'N'
select @existbuff = @tbl + @col + @fmt + @vld + @edt +
@tblproc + @colproc + @fmtproc +
@vldproc + @edtproc
select @existbuff
go
SETUSER
go
grant Execute on sp_pb60extcat to public
go
print 'sp_pb60fktable'
SETUSER 'dbo'
go
/*--------------------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60fktable lists the tables that reference this table. */
/*--------------------------------------------------------------*/
create procedure sp_pb60fktable
@objname varchar(61) = null
as
declare @objid int
declare @isolevel int /* ptrack 325579 isolation level */
if (@objname is null)
return (1)
select @objid = object_id(@objname)
/* ptrack 325579 override isolation level 0 default */
select @isolevel = @@isolation
if @isolevel = 0
begin
set transaction isolation level 1
end
select o.name, o.id, o.type, o.uid, user_name(o.uid)
from dbo.sysobjects o, dbo.sysreferences r
where r.reftabid = @objid and
r.tableid = o.id
if @isolevel = 0
begin
set transaction isolation level 0
end
go
SETUSER
go
grant Execute on sp_pb60fktable to public
go
print 'sp_pb60foreignkey'
SETUSER 'dbo'
go
#4
太多了吧?我怎么运行呀
#5
这还没贴完呢,刚才我连续发了3个帖子她就不让发了,我想删除其中一贴,可是没找到删除按扭,sign……这也太次了一点吧~~~~
其实这个代码是存成.sql文件,你用sqladv.exe可以打开它,不要看见代码多就认为执行速度慢,我执行这个代码就用了几分钟,很快的。
可是我现在没办法贴完整的代码,这个网站又不让上传文件,我也不知道该怎么半了
其实这个代码是存成.sql文件,你用sqladv.exe可以打开它,不要看见代码多就认为执行速度慢,我执行这个代码就用了几分钟,很快的。
可是我现在没办法贴完整的代码,这个网站又不让上传文件,我也不知道该怎么半了
#6
直接你告诉我是哪个sql文件,我找找
#7
是不是pbsyc.sql和pbsyc2.sql这两个文件?
这两个文件光盘上没有,可以下载吗?
这两个文件光盘上没有,可以下载吗?
#8
一样的问题哦
#9
pb6.5连接sybase时需要执行一个过程,(自己的产品连接还有限制,真不知道他们是怎么想的)
你可以找找, 这些存储过程一般在pb的安装盘上(好像
叫做pbsyb60.sql),看看有没有??
你可以找找, 这些存储过程一般在pb的安装盘上(好像
叫做pbsyb60.sql),看看有没有??
#10
如果没有的话,把信箱留下,
#11
我也出现同样的问题
zhuang_zm@tom.com
zhuang_zm@tom.com
#12
我的这个文件名是sp_pb6070proc.sql,估计是帮我找到这个文件的哥么自己起的名字,你找找吧!