Sunday, February 19, 2012

Connection string for MSDE 2000

Hi,
I have a simple asp.net application running ok on my WinXP development
server with SQL Server Express 2005 installed locally. After moving to
the live server (Win 2000 server with MSDE 2000 installed locally),
it's giving me the 'SQL Network Interface Error (error 25): connection
string is not valid'.
So far, i've tried using the following connection string in my
web.config file:
connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\registration.mdf;Integrated
Security=True;User Instance=True" providerName="System.Data.SqlClient"
(this works fine on the development server)
connectionString="Data Source=(local);Initial
Catalog=registration;Integrated Security=SSPI"
Does anyone know how to solve this issue? Or is it just not possible to
use Sql Server .NET Data Provider (System.Data.SqlClient) that I used
in the development server to connect to a MSDE 2000 database on the
live server? Originally I wanted to use SQL Server Express 2005 on the
live server, but I didn't enough memory on it, so I figured I tried
MSDE 2000 first to see if I can get the right connection string.
Any help would be appreciated.
THanks,
hfk0
Microsoft SQL Server .NET Data Provider (System.Data.SqlClient) allows
you to connect to a Microsoft SQL Server 7.0, 2000, and 2005 databases
MSDE2000 does not support user instatnce, with which you can attach a
database file (*.mdf) by specifying a file name in connectionString. The
database file (*.mdf) must be attached/installed on the MSDE first before
your ASP.NET app runs.
Also, is the MSDE instance named as "ComputerName\SQLExpress"?
"hfk0" <hery@.infoventures.com> wrote in message
news:1142448305.817752.118520@.j33g2000cwa.googlegr oups.com...
> Hi,
> I have a simple asp.net application running ok on my WinXP development
> server with SQL Server Express 2005 installed locally. After moving to
> the live server (Win 2000 server with MSDE 2000 installed locally),
> it's giving me the 'SQL Network Interface Error (error 25): connection
> string is not valid'.
> So far, i've tried using the following connection string in my
> web.config file:
> connectionString="Data
> Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\registration.mdf;Integrated
> Security=True;User Instance=True" providerName="System.Data.SqlClient"
> (this works fine on the development server)
> connectionString="Data Source=(local);Initial
> Catalog=registration;Integrated Security=SSPI"
> Does anyone know how to solve this issue? Or is it just not possible to
> use Sql Server .NET Data Provider (System.Data.SqlClient) that I used
> in the development server to connect to a MSDE 2000 database on the
> live server? Originally I wanted to use SQL Server Express 2005 on the
> live server, but I didn't enough memory on it, so I figured I tried
> MSDE 2000 first to see if I can get the right connection string.
> Any help would be appreciated.
> THanks,
> hfk0
> Microsoft SQL Server .NET Data Provider (System.Data.SqlClient) allows
> you to connect to a Microsoft SQL Server 7.0, 2000, and 2005 databases
>
|||Hi Norman,
How do I attach/install the *.mdf file on MSDE? Also how do I find out
the MSDE instance name? On the dev server I have SQL Express 2005
installed locally so on the connection string, Data Source=.\SQLEXPRESS
(the dot refers to localhost and SQLEXPRESS the instance name).
Thanks for your help.
hfk0
|||hi,
hfk0 wrote:
> Hi Norman,
> How do I attach/install the *.mdf file on MSDE?
you have to use sp_attach_db system stored procedure,
http://msdn.microsoft.com/library/de...ae-az_52oy.asp
or
http://msdn.microsoft.com/library/de...ae-az_4wrm.asp
...

>Also how do I find out
> the MSDE instance name? On the dev server I have SQL Express 2005
> installed locally so on the connection string, Data
> Source=.\SQLEXPRESS (the dot refers to localhost and SQLEXPRESS the
> instance name).
try having a look at the SQL Server Service Manager in the icon tray.. it
should list the available local instances.. or use oSql.exe command tool
like
c:\>osql.exe -L
(parameters are case sensitive) that will list all available Instances in
you lan... or open the service management applet and seek for MSSQLSERVER
(default instance) or MSSQL$InstanceName (named instance)
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.18.0 - DbaMgr ver 0.62.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Hi Andrea and Norman,
After trying the following:
- Reconfigured MSDE authentication mode to mixed mode.
- Enabled and configured Named Pipes and TCP/IP protocol using SQL
server network utility.
- Changed connection string on web.config file to
connectionString="Data Source=90.0.0.55,1433;Network
Library=DBMSSOCN;Initial Catalog=registration;User
ID=sa;Password=fmypassword;"
I'm now getting a different error message on the browser:
Cannot open database requested in login 'registration'. Login fails.
Login failed for user 'sa'.
I'm also getting the following message when trying to attach my SQL
database (default instance):
Error 602 Could not find row in sysindexes. run DBCC CHECKTABLE on
sysindexes.
Any clues?
|||hi,
hfk0 wrote:
> Hi Andrea and Norman,
> After trying the following:
> - Reconfigured MSDE authentication mode to mixed mode.
> - Enabled and configured Named Pipes and TCP/IP protocol using SQL
> server network utility.
> - Changed connection string on web.config file to
> connectionString="Data Source=90.0.0.55,1433;Network
> Library=DBMSSOCN;Initial Catalog=registration;User
> ID=sa;Password=fmypassword;"
> I'm now getting a different error message on the browser:
> Cannot open database requested in login 'registration'. Login fails.
> Login failed for user 'sa'.
SQLExpress and MSDE install by default dsabling standard SQL Server
authenticated connections, allowing only truste WinNT connections..
to modify this behavior at "run-time", please have a look at
http://support.microsoft.com/default...b;en-us;285097 in the
section regardin "windows registry" hacking ..

> I'm also getting the following message when trying to attach my SQL
> database (default instance):
> Error 602 Could not find row in sysindexes. run DBCC CHECKTABLE on
> sysindexes.
>
If during the attach process, SQL Server finds the DB to be corrupt, it will
not attach and you can't run DBCC's against it. If this is your problem, you
need to find a valid backup.
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.18.0 - DbaMgr ver 0.62.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||hi,
hfk0 wrote:
> I did changed to windows registry to enable mixed authentication mode
> as well as replaced the seemingly corrupted SQL database, but i'm
> still getting the very same message when attaching the database
> (which is created in Visual Studio.Net 2005) to MSDE:
> Msg 602, Level 21, State 50, Server [name], Line 1
> Couldnot find row in sysindexes for database ID 5, object ID 1, index
> ID 1
> Run DBCC CHECKTABLE on sysindexes
> I wish microsoft would write this error message in plain english
> I'm stuck now and don't know what to do. Perhaps SQL Server Express
> database instance is just not backward compatible with MSDE instance?
SQL Server 2005 database can not be attached to SQL Server 2000 instances..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.18.0 - DbaMgr ver 0.62.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

No comments:

Post a Comment