?
Solved

internal server error 500

Posted on 2010-01-10
22
Medium Priority
?
556 Views
Last Modified: 2012-05-08
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
Comment
Question by:TrueBlue
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 8
  • 3
  • +1
22 Comments
 
LVL 30

Expert Comment

by:Reza Rad
ID: 26278682
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
 

Author Comment

by:TrueBlue
ID: 26279897
reza rad,
Would you mind be more descriptive on this recommendation, as I new to Plesk.
I have version 9.3 for Windows.
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 26280067
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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 30

Expert Comment

by:Reza Rad
ID: 26280564
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
 
LVL 9

Assisted Solution

by:abolinhas
abolinhas earned 664 total points
ID: 26282239
0
 

Author Comment

by:TrueBlue
ID: 26282886
abolinhas,
I am using MSSQL 2008 Express.
I am can only access the databases via SQLCMD.
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 26282960
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
 

Author Comment

by:TrueBlue
ID: 26283586
no users are listed.
0
 
LVL 30

Expert Comment

by:Reza Rad
ID: 26283666
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
 

Author Comment

by:TrueBlue
ID: 26283776
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
 

Author Comment

by:TrueBlue
ID: 26283844
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
 
LVL 30

Expert Comment

by:Reza Rad
ID: 26283868
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
 

Author Comment

by:TrueBlue
ID: 26284087
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
 

Author Comment

by:TrueBlue
ID: 26284190
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
 
LVL 30

Expert Comment

by:Reza Rad
ID: 26284542
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
 

Author Comment

by:TrueBlue
ID: 26287423
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
 
LVL 30

Expert Comment

by:Reza Rad
ID: 26287709
0
 

Author Comment

by:TrueBlue
ID: 26289822
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
 
LVL 30

Accepted Solution

by:
Reza Rad earned 668 total points
ID: 26290281
can you try to restore your database in different drive and folder?
0
 
LVL 57

Assisted Solution

by:Raja Jegan R
Raja Jegan R earned 668 total points
ID: 26292464
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
 

Author Comment

by:TrueBlue
ID: 26295890
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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question