473,396 Members | 2,129 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,396 software developers and data experts.

SQL Server 2K Database Name Problem

This updates a previous post.

We have updated our SQL Server 2000 to new hardware by reinstalling SQL
Server 2K to a new, dual processor server. We performed a full SQL backup
of the entire server, and did a full restore onto the new hardware, which
has the same server name and IP address. One difference has bitten us,
however.

When I perform an sp_who standard procedure call in VB6, the dbname field
comes back with our database names padded with spaces out to 100 characters
total length. Database names in the left panel of Enterprise Manager also
show this padding. This seems only to apply to databases we restored in
their entirety, and not either newly created ones, or standard SQL Server
ones (e.g. master, model, msdb, Northwind, pubs tempdb).

Would really like to know how this could have happened since it has affected
some applications.


Sep 8 '06 #1
2 1564
You still have an open thread on this subject ("Restore Messed Up Table
Names"). Erland Sommarskog asked you a couple of questions and is still
waiting for a response.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"David C. Barber" <da***@NOSPAMdbarber.comwrote in message
news:MZ******************************@comcast.com. ..
This updates a previous post.

We have updated our SQL Server 2000 to new hardware by reinstalling SQL
Server 2K to a new, dual processor server. We performed a full SQL backup
of the entire server, and did a full restore onto the new hardware, which
has the same server name and IP address. One difference has bitten us,
however.

When I perform an sp_who standard procedure call in VB6, the dbname field
comes back with our database names padded with spaces out to 100
characters
total length. Database names in the left panel of Enterprise Manager also
show this padding. This seems only to apply to databases we restored in
their entirety, and not either newly created ones, or standard SQL Server
ones (e.g. master, model, msdb, Northwind, pubs tempdb).

Would really like to know how this could have happened since it has
affected
some applications.


Sep 8 '06 #2
David C. Barber (da***@NOSPAMdbarber.com) writes:
When I perform an sp_who standard procedure call in VB6, the dbname
field comes back with our database names padded with spaces out to 100
characters total length. Database names in the left panel of Enterprise
Manager also show this padding. This seems only to apply to databases
we restored in their entirety, and not either newly created ones, or
standard SQL Server ones (e.g. master, model, msdb, Northwind, pubs
tempdb).

Would really like to know how this could have happened since it has
affected some applications.
You have now posted three times about this issue, and I still don't
know how you performed the server migration.

From your second post, I got the impression that you used Windows backup
to move the entire disk contents. But reading the above it seems to
me that you installed SQL Server on the new hardware and then
restored/attached the user databases on the new hardware.

To bring this to any progress, let me present a guess. Someone wrote
composed a script to reattach the database files, probably by running a
query of some sort. Maybe he looped over sp_helpdb and for some
reason he took the name of database from the name column in the
in the first row of the second result set - this the logical name of
the datafile, and then he constructed:

"sp_attach_db '" + name + "', '" + datafilename + "', '" + logfilename

This would result in database name to be padded as that name is
always reported as 128 by sp_helpdb.

There are a number of possible variations on this theme, but all
boils down to a user error.

Of course, this is just a wild guess, but that is sort of the rule in
these newsgroups: the less you share about your problem, the wilder
the guesses.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Sep 8 '06 #3

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

Similar topics

6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
4
by: banz | last post by:
Hello I have a problem to resolve: I wrote a Perlscript which caches data from a server (local on my machine) I would like to have a other connection to a remote server but I don't know how to...
5
by: Christoph Sticksel | last post by:
Hi, I'm having problems with attaching two tables stored in an SQL Server 2000 to an Access 97 database. It worked well for all other tables except those two. This is what I did: Choose the...
17
by: Danieltbt05 | last post by:
just installed SQL server 2000 and using my client , i can't locate the server. I used SQL query analyzer to search but no servers were found. Error message is as below Server : Msg17,level...
18
by: UJ | last post by:
Folks, We provide custom content for our customers. Currently we put the files on our server and people have a program we provide that will download the files. These files are usually SWF, HTML or...
0
by: Suresh | last post by:
Hi Guys I have Db2 server installed on remote server. i am connecting to that remote server by using VPN. I want to connect that remote DB2 server instance using my local machine DB2...
3
by: Arpan | last post by:
I recently installed SQL Server 2005 (Management Studio Express) along with SQL Server 2005 Express (Configuration Manager) in my Win2K Pro m/c & use IIS 5.0 to run ASPX projects. I could add my...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
1
by: BobLewiston | last post by:
I知 trying to learn how to connect to an SQL Server database (I知 using the AdventureWorks sample database), but I知 having problems. Here痴 the code I知 using: // define connection string for...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project用lanning, coding, testing,...

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.