Reply to Re: restore problem about sql server

Your name:

Reply:


Posted by Erland Sommarskog on 10/01/43 11:25

Dee (luye_qq@hotmail.com) writes:
> i reinstall the sql server on the machine, and use attach file method
> to get the database back, and it works well on the server, which means
> i can get the data using Query analyser, but when i use the web
> application to access the database, it always come out with error
> message, it seems that the connection to the database can not be
> established, but it used to be ok before i reinstalled the sql server.
> do i need to do any configuration after attaching the data files and
> log files(.mdf and .ldf).
>
> i think the source code(i mean the database connection code) for the
> web application should be fine caze i didnt change it before after.
>
> caze i didnt create instance of database and just use default, so the
> connection string is defined below:
> thisConnection = new SqlConnection(@"Data Source=pdsmfg014;Initial
> Catalog=epcsii;User ID=epcs2;Password=******")
>
> the server name is pdsmfg014
> the database name is epcsii

So is this login epcs2 present on the reinstalled server? In such
case it could be that when you reinstalled the server the mapping
between logins and database users were lost. Run sp_helpuser in the
database and see if the output makes sense.

If not the procedure sp_changes_users_login can help you. Please check
Books Online for details.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация