473,387 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Problems with 'sp_helpdb' stored procedure

Hi,
One of our customers claims that the sp_helpdb truncates database name
larger than 24 characters, the release is 7.00.1094, did any one
encounter such a problem ???
Jul 20 '05 #1
2 1808

"Eyal Goren" <ey********@bmc.com> wrote in message
news:88**************************@posting.google.c om...
Hi,
One of our customers claims that the sp_helpdb truncates database name
larger than 24 characters, the release is 7.00.1094, did any one
encounter such a problem ???


Probably easy enough to determine.

sp_helptext sp_helpdb

And they can read the text for themselves.

I don't see anything limiting to 24 characters at a quick pass. The user
defined datatype of sysname should be limited to 128 characters.

Perhaps someone changed it?


Jul 20 '05 #2
Eyal Goren (ey********@bmc.com) writes:
One of our customers claims that the sp_helpdb truncates database name
larger than 24 characters, the release is 7.00.1094, did any one
encounter such a problem ???


Yes, I was able to repeat this problem on an SQL7 server. It turns
out that in the final SELECT, there is an explicit substring():

select name = substring(d.name, 1, 24),
db_size = str(sum(convert(dec(15),v.size))*
(select low from master.dbo.spt_values
where type = 'E' and number = 1)
/ 1048576,10,2)+ ' MB',
owner = substring(suser_sname(d.sid), 1, 24),
dbid = d.dbid,
created = convert(char(11), d.crdate),
status = s.dbdesc
from master.dbo.sysdatabases d, #spfiledesc v, #spdbdesc s
where d.dbid = s.dbid
and s.dbid = v.dbid
group by d.name,d.sid,d.dbid,d.crdate,s.dbdesc
order by d.name

If you are really venturesome you could change the procedure yourself,
but note that this is definitely not supported.

This problem does not appear in SQL2000.
--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eyal Goren | last post by:
Hi, One of our customers claims that the sp_helpdb truncates database name larger than 24 characters, the release is 7.00.1094, did any one encounter such a problem ???
1
by: [BuKoX] | last post by:
Hello. How to format field "create" (Jan 12 2005) in sp_helpdb procedure to sth like yyyy-mm-dd (2005-01-12) in SQL? bye... -- __ __ |__\\ | || |_// / \\ \_// ...
2
by: Akinja | last post by:
I have a strange question and hope someone can shed some light on the problem. First let me give you my scenario. We are using doubletake to replicate our database server files between the...
5
by: Lili | last post by:
I'm having problems creating a simple stored procedure in DB2. Can someone help? Here is the screen dump when I tried to load the stored procedure. Thanks for any help. Create procedure...
3
by: Rhino | last post by:
I've spent the last couple of hours trying to figure out how to debug a Java stored procedure and am just going in circles. The last straw came when I got "Cannot open input stream for default"...
3
by: Henry Reardon | last post by:
I installed DB2 for Linux, Unix, and Windows on V8.2 (i.e. 8.1.7) on Windows XP on Friday. I had some problems with migration which are still outstanding - see my earlier thread - but I managed to...
4
by: Ranginald | last post by:
Hi, I'm having trouble passing a parameter from my default.aspx page to my default2.aspx page. I have values from a query in a list box and the goal is to pass the "catID" from default.aspx...
1
by: Ir0neagle | last post by:
I am generating upgrade/new install scripts for my project. I am able to do this in oracle and sql server but an running into problems in db2. What I am trying to do is to use some logic to only...
2
by: moonrox | last post by:
Thanks for you help in advance. I am trying to use sp_helpdb to get the size of all the databases on a sql server. The results of sp_helpdb (when using the @dbname='databasename') is 2 sets of...
5
by: ph3ng | last post by:
Hi I was executing sp_help on a server (ran against master database) and i get the following message: Associated statement is not prepared(HY007) Anyone got any idea what is wrong?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.