• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 558
  • Last Modified:

internal server error 500

Hi!
We moved our website to a new web hosting company.
It uses Windows 2003 server, IIS, MSSQL 2008 Express.
We created the database using Plesk and then copied the database from the old server to the new server. The database was originally created with MSSQL 2005.
Since the move each time we type the domain name we get internal server error 500.
This is what the application log contained...

Event Type:      Failure Audit
Event Source:      MSSQL$SQLEXPRESS
Event Category:      Logon
Event ID:      18456
Date:            1/10/2010
Time:            1:43:56 PM
User:            N/A
Computer:      ...VPS
Description:
Login failed for user '...mssqluser'. Reason: Failed to open the explicitly specified database.
Data:
0000: 18 48 00 00 0e 00 00 00   .H......
0008: 12 00 00 00 4f 00 57 00   ....O.W.
0010: 48 00 56 00 50 00 53 00   H.V.P.S.
0018: 5c 00 53 00 51 00 4c 00   \.S.Q.L.
0020: 45 00 58 00 50 00 52 00   E.X.P.R.
0028: 45 00 53 00 53 00 00 00   E.S.S...
0030: 07 00 00 00 6d 00 61 00   ....m.a.
0038: 73 00 74 00 65 00 72 00   s.t.e.r.
0040: 00 00                     ..  

Any ideas how to fix this?
0
TrueBlue
Asked:
TrueBlue
  • 10
  • 8
  • 3
  • +1
3 Solutions
 
Reza RadCommented:
after restore your database in new host, you must map users to this database again
simply you can set access to the new database to the user in PLESK
0
 
TrueBlueAuthor Commented:
reza rad,
Would you mind be more descriptive on this recommendation, as I new to Plesk.
I have version 9.3 for Windows.
0
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
Clearly explained here and this should help:

http://sqlserver-indo.org/blogs/david/archive/2008/09/24/update-database-user-name-to-another-login-name.aspx

Kindly revert if I need to explain in addition..
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Reza RadCommented:
after restoring database on your host,
just create a username for this databaes
then in your application try to connect the database with this username and password
0
 
TrueBlueAuthor Commented:
abolinhas,
I am using MSSQL 2008 Express.
I am can only access the databases via SQLCMD.
0
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
Then run this from SQLCMD

-- search all user names that have no login name
sp_change_users_login 'Report'
-- update the user name.
sp_change_users_login 'update_one', 'user name', 'login name'

more details available in the link I provided earlier..
0
 
TrueBlueAuthor Commented:
no users are listed.
0
 
Reza RadCommented:
no user must be list, you must map loginname to this username like below:
sp_change_users_login 'update_one', 'user name', 'login name'
0
 
TrueBlueAuthor Commented:
reza_rad,
what is the difference between user name and login name?
I mean am I supposed to replace those two terms with real values?
TIA
0
 
TrueBlueAuthor Commented:
ok.
I substituted the user name with a real user name and got msg 15291 Level 16 state 1 user name is absent or invalid.
0
 
Reza RadCommented:
login name is loginid and password which you used to connect to sql server
but username is the specified user in your database which must be mapped to one of logins in sql server

let us go deeper?
from where you want to set access in your database? do you have a tools like ssms on your database ? or it is on a host and just you have plesk control panel?
in first , you must connect to database in connection tools and run the query above
in second, it's better to provide a screenshot from the page you created user for your database
0
 
TrueBlueAuthor Commented:
reza_rad,
I have Plesk version 9.3
I created the databases and user name using Plesk.
Then I copied the databases from the old server to this new server over the databases that Plesk created.
They were named the same and had the same user names.
I have SQL 2008 Express Edition installed on the server.
I have not been able to install the management studio because it keeps choaking at the select features screen. So I am currently stuck with SQLCMD. I ran a statement and I have 6 databases attached. Two of which are ones I copied over. There seems to be no user names though. I know the login name to the server. When I type use databasename go I get error msg 945
0
 
TrueBlueAuthor Commented:
could it be that the copied databases where created with mssql 2005 and now the server is 2008?
If so, is there a way to convert these databases using sqlcmd?
0
 
Reza RadCommented:
sql server 2008 supports older versions, so this is not problem.
let's check this:
create a new username for this database with this command in sqlcmd:

http://www.herongyang.com/jdbc/SQL-Server-PreparedStatement-Create-User.html

0
 
TrueBlueAuthor Commented:
reza_rad,
I appreciate your patience :)
I tried this but as soon as I type use database name and go I get msg 945 database can not be opened due to inaccessible or insufficient memory. And yet I listed the databases using sys.database and they are listed. I also checked that it was not readonly which it is not.
Capture1.PNG
0
 
TrueBlueAuthor Commented:
Hi!
Here are the errors I received.
Memory limit is 512MB and 98.2MB free.
Disk storage 6GB free.
The data subdirectory is read only.
I tried changing this at the folder level but it keeps changing back.
Any ideas?
Capture.PNG
0
 
Reza RadCommented:
can you try to restore your database in different drive and folder?
0
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
Missed up few threads in the middle..

TrueBlue,
     Have you faced any other issues with your SQL Server 2008 installation since you mentioned that you had some issues while trying to install Management Studio..
If that is the case, then try to fix that one too as it might raise these kind of internal errors.

Just try to install SQL Server Management Studio Express 2008 from the link below:

http://www.microsoft.com/downloads/details.aspx?familyid=08e52ac2-1d62-45f6-9a4a-4b76a8564a2b&displaylang=en
0
 
TrueBlueAuthor Commented:
Ok. So I fixed the issue. I bought a MSSQL database repair utility. Deleted the databases and imported the sql scripts that it created back into the newly created databases.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 10
  • 8
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now