Showing posts with label dbs. Show all posts
Showing posts with label dbs. Show all posts

Thursday, March 22, 2012

Classifieds Starter Kit in SQL Server 2005

Hello,

I am trying to get Classifieds Starter Kit work in SQL Server 2005. I did following:

1. Create DBs; The sql scripts came with the starter kit in the App_Data folder.

2. To create aspnetdb: aspnet_regsql.exe -E -S localhost -A mr

3. Open SQL Server Configuration Manager. Select "SQL Server 2005 Network Configuration | Protocols for MSSQLSERVER" then enable the protocols 'TCP/IP' and possibly 'Named Pipes'

4. My connections string <add name="classifiedsConnection" connectionString="Data Source=MyServerName;;User ID=user;Password=pass;Initial Catalog=ClassAds" providerName="System.Data.SqlClient" />

I still get the following error when I debug the application:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

How can I resolve this problem?

Looking at the steps that you have gone through you have set up the system to use the SQLExpress system with the database already attached to the engine, but have set up the location of the database files to use the sql express system as a user instance. To fix it you will have to either attach the database files to the engine using the comand line or the SQL Express management studio, or change your connection string to attach the files at run time.

|||

Thanks for the reply, I am new in this, can you give me an example how I can do it?

Sunday, March 11, 2012

chng default loca where new DBs created?

Hello,
My workplace is upgrading Microsoft Access from 97 to 2002
which has the Access Data Project file that can create an
addhoc Sql Server DB on the Sql Server computer on the fly
from remote workstations. The wizard in the Access
2002 .adp file does not offer a location option where the
new Sql DB gets created on the Sql Server computer. The
problem is that these new DBs are getting created on the
server computer at a default location of
C:\Program Files\Microsoft Sql Server\MSSQL\Data
The problem is that the C drive on this server is only 12
gigs and will fill up quickly. The main MDFs reside on
the other drive of the server which has hundreds of gigs
of space. Does EM 2000 have a way to change the default
location where new DBs get created? Or is there a
registry setting I could change on the server?
Thanks,
RonIf you want to see it in EM, look at properties for the server, and click
the database tab. The defaults are in there.
Simon Worth
"Ron" <anonymous@.discussions.microsoft.com> wrote in message
news:745701c5266b$86508ff0$a601280a@.phx.gbl...
> Hello,
> My workplace is upgrading Microsoft Access from 97 to 2002
> which has the Access Data Project file that can create an
> addhoc Sql Server DB on the Sql Server computer on the fly
> from remote workstations. The wizard in the Access
> 2002 .adp file does not offer a location option where the
> new Sql DB gets created on the Sql Server computer. The
> problem is that these new DBs are getting created on the
> server computer at a default location of
> C:\Program Files\Microsoft Sql Server\MSSQL\Data
> The problem is that the C drive on this server is only 12
> gigs and will fill up quickly. The main MDFs reside on
> the other drive of the server which has hundreds of gigs
> of space. Does EM 2000 have a way to change the default
> location where new DBs get created? Or is there a
> registry setting I could change on the server?
> Thanks,
> Ron|||Ron,
In EM, open server properties windows and go to "Databse Settings" tab, at
the botton you can set "New database default location" for data and log.
AMB
"Ron" wrote:

> Hello,
> My workplace is upgrading Microsoft Access from 97 to 2002
> which has the Access Data Project file that can create an
> addhoc Sql Server DB on the Sql Server computer on the fly
> from remote workstations. The wizard in the Access
> 2002 .adp file does not offer a location option where the
> new Sql DB gets created on the Sql Server computer. The
> problem is that these new DBs are getting created on the
> server computer at a default location of
> C:\Program Files\Microsoft Sql Server\MSSQL\Data
> The problem is that the C drive on this server is only 12
> gigs and will fill up quickly. The main MDFs reside on
> the other drive of the server which has hundreds of gigs
> of space. Does EM 2000 have a way to change the default
> location where new DBs get created? Or is there a
> registry setting I could change on the server?
> Thanks,
> Ron
>

chng default loca where new DBs created?

Well, I changed the default location as advised (to F:
drive). I also restarted Sql Server. But the Access ADP
is still creating the Sql DB's on the C drive. Do I need
to reboot the server computer for the default location
change to take effect?

>--Original Message--
>Thank you all very much. I completely missed that.
>
>2002
an
>fly
the
12
>.
>Perhaps Access doesn't respect SQL Server's default setting?
Try below from Query Analyzer or OSQL.EXE:
CREATE DATABASE filepathtest
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Ron" <anonymous@.discussions.microsoft.com> wrote in message
news:7b4d01c52677$685a76d0$a401280a@.phx.gbl...
> Well, I changed the default location as advised (to F:
> drive). I also restarted Sql Server. But the Access ADP
> is still creating the Sql DB's on the C drive. Do I need
> to reboot the server computer for the default location
> change to take effect?
>
> an
> the
> 12|||>Perhaps Access doesn't respect SQL Server's default
>setting?

>Try below from Query Analyzer or OSQL.EXE:

>CREATE DATABASE filepathtest
Good idea. Well,l filepathtest went to the correct drive,
F instead of C. But when I create a new Access.adp either
on the same machine as Sql Server or from a remote
workstation, the new DB still ends up on the C drive. I
think Access does not respect Sql Server's default
settings.
Is there something that I could override in the .adp DDL
maybe? It would be a real nightmare if I had to manually
create a bunch of new adhoc DB's for Access2002 users
(since I would have to restrict them from doing it from
their .adp's).

>--Original Message--
>Perhaps Access doesn't respect SQL Server's default
setting?
>Try below from Query Analyzer or OSQL.EXE:
>CREATE DATABASE filepathtest
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>http://www.solidqualitylearning.com/
>http://www.sqlug.se/
>
>"Ron" <anonymous@.discussions.microsoft.com> wrote in
message
>news:7b4d01c52677$685a76d0$a401280a@.phx.gbl...
need
The
the
gigs
default
>
>.
>|||The default database creation location set under Enterprise Manager is
saved in the local computer registry and ONLY applies to databases
created via EM on that computer.
If you create a database without using EM and without specifying a
location, the location will be the same as either the master or model
database files (I do not remember which db controls)
Carl Federl
Please post DDL (create table) with datatypes, primary and foreign keys.
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!|||> Is there something that I could override in the .adp DDL
> maybe?
I don't know, don't do Access... :-)
I'd ask this in an Access group, perhaps they have some hints about some set
ting inside Access.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Ron" <anonymous@.discussions.microsoft.com> wrote in message
news:7bb901c52680$7266b450$a401280a@.phx.gbl...
>
>
> Good idea. Well,l filepathtest went to the correct drive,
> F instead of C. But when I create a new Access.adp either
> on the same machine as Sql Server or from a remote
> workstation, the new DB still ends up on the C drive. I
> think Access does not respect Sql Server's default
> settings.
> Is there something that I could override in the .adp DDL
> maybe? It would be a real nightmare if I had to manually
> create a bunch of new adhoc DB's for Access2002 users
> (since I would have to restrict them from doing it from
> their .adp's).
>
>
> setting?
> message
> need
> The
> the
> gigs
> default