Showing posts with label release. Show all posts
Showing posts with label release. Show all posts

Wednesday, March 28, 2012

Problems with SQL Server

I have installed SQL Server 2005 and Visual Studio 2005 (release edition)- since I have SQL Server, I didn't install SQL Server Express - didn't figure I'd need it.

I have created a Web Project and added an App_Data directory.

Whenever I try to add a SQL database to the directory, I get the following message:

--------
Microsoft Visual Studio
--------
Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251
--------
OK Help
--------

How can I get VS to work with the SQL Server installation instead of Express?

Use the server explorer pane, or set the database up in Management Studio.

Monday, March 26, 2012

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 ?"Eyal Goren" <eyal_goren@.bmc.com> wrote in message
news:88eabf1e.0404240956.2861e16c@.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?|||Eyal Goren (eyal_goren@.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, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.aspsql