Saturday, February 25, 2012

Could not establish a connection to the database

Hi!

My name is George. I have installed Microsoft Visual Web Development 2008 Exress Edition Beta, and when I want to use the Web Site Administration Tool and test the AspNetSqlProvider it says me this:

"Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider."

I don't know what to I do? I have enabled the IP/TPC and name pipes at SQL Server Surface Area Configuration, and I have used the aspnet_regsql to setup the ASP.NET and SQL Database, but the setup field it says this:

"System.Web.HttpException: Unable to connect to SQL Server database. > System.Data.SqlClient.SqlException: 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)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
End of inner exception stack trace
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)
at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString)
at System.Web.Management.ConfirmPanel.Execute()"

I have enabled the IP/TPC, name pipes and remote connections at the SQL Server Express...

Anybady help me?

Thanks

If I understand you correctly you are missing the connection string section in the Web.Config, it is covered in the thread below if that is not correct you need to find either the Asp.net account in XP or Network Service account in Win2003 and Vista and add it to SQL Server and the ASPNETDB in Management Studio. Hope this helps.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1904842&SiteID=1

|||

Thanks a lot of your time! I fixed the problem.

Thanks again!

GPS.net

Could not drop procedure.

I have made transaction replication and it's working fine and now I want to
drop one procedure from publisher database but its gave me an error that you
can't drop the procedure b/c it's beeing used in Replication .. what should
I do? can any tell me .
Thanks in advance.
Noor
I am using the following commands but still it gave me an error.
sp_droparticle 'LMS','CmsUpdateIndividualTest', 1,1
Server: Msg 14046, Level 16, State 1, Procedure sp_droparticle, Line 161
Could not drop article. A subscription exists on it.
Any idea about this ?
Thanks
Noor
"Noorali Issani" <naissani@.softhome.net> wrote in message
news:eg%23cZgVEEHA.1600@.tk2msftngp13.phx.gbl...
> I have made transaction replication and it's working fine and now I want
to
> drop one procedure from publisher database but its gave me an error that
you
> can't drop the procedure b/c it's beeing used in Replication .. what
should
> I do? can any tell me .
> Thanks in advance.
> Noor
>
|||First you have to remove the article from any subscriptions that subscribe
to it. You can drop the subscription for that article ONLY:
Use pubs
go
sp_dropsubscription @.publication = 'pubs' , @.article ='authors',
@.subscriber='ALL'
Then drop the article from the publication:
sp_droparticle @.publication = 'pubs', @.article = 'authors'
Cindy Gross, MCDBA, MCSE
http://cindygross.tripod.com
This posting is provided "AS IS" with no warranties, and confers no rights.

could not disable publishing and distribution

hello All,

i am trying to delete publications in SQL 2000, SP4 and getting this
error:

SQL Server Enterprise Manager could not disable publishing and distribution on '<publishername>'.

Error 3724 : cannot drop the procedure
'dbo.sp_sel_F854ED4CD7EA4399EFDB9697F4E24A10_pal' because itis being used for replication.

Thanks and Regards

Kanna


Run sp_removedbreplication in the published database.

could not deploy the cube

hi hannes,

i tried the option you had told me

now i am getting that i dont have permission to create a object in the server i.e, the client on which i am wroking has no permission

and i dont know how to give it...

could you help me with this

lalitha

Hi Lalithak,

You would use Manage Roles option in your Analysis Services Database.

Good Coding!

Javier Luna
http://guydotnetxmlwebservices.blogspot.com/

|||

Javier Luna wrote:

Hi Lalithak,

You would use Manage Roles option in your Analysis Services Database.

Good Coding!

Javier Luna
http://guydotnetxmlwebservices.blogspot.com/

is it in server or client..

lalitha

|||

Hi Lalithak,

It is in your server.

Good Coding!

Javier Luna
http://guydotnetxmlwebservices.blogspot.com/

|||

See my reply in http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=676039&SiteID=1

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

could not deploy the cube

hi guys,

i have a problem in deploying the cube in sql server 2005 ... i had no permission for creating the object in the server...

i got a response as.....

Hi Lalithak,

You would use Manage Roles option in your Analysis Services Database.

Good Coding!

but i didnt get where will i get this option in server or in client....

lalitha

Use SQL Server Management Studio to connect to your Analysis Server. See if you permission to create a database.

If not, ask for your server admin for the following:

Create a new database for you.
Add a new role to the database and grant the role DB admin permissions.
Add you as a memeber of the role.

How you should be able to deploy your cube. Make sure deployment options in your BI Dev Studio target a new database.
It is also a good idea to check your deployment is not going to override the DB admin role.

Hope this helps.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Could not deliver update

I have started merge replication. It was working. Now I get messege that 'The
process could not deliver update(s) at the Subscriber'.
If I start it manually, I see message come it has down loaded some records.
100 update, 1 insert etc. I can see my CPU usage is 100%. Then after few min
later it gives that message.
Do not see anythng in the conflict viewer.
Please help
can you enable logging so we can see the exact failure message? Please refer
to this link for more info.
http://support.microsoft.com/default...b;en-us;312292
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Aziz" <Aziz @.discussions.microsoft.com> wrote in message
news:59C17F3D-2C9D-4285-A476-E83BAC9E1025@.microsoft.com...
> I have started merge replication. It was working. Now I get messege that
'The
> process could not deliver update(s) at the Subscriber'.
> If I start it manually, I see message come it has down loaded some
records.
> 100 update, 1 insert etc. I can see my CPU usage is 100%. Then after few
min
> later it gives that message.
> Do not see anythng in the conflict viewer.
> Please help

could not deliver the snapshot to the subscriber

We have a customer w/ merge replication setup and has been functioning.
Their server's were hacked. We have spent 3 days on the phone w/ MS and
everything is working except for 1 client. When it is trying to deliver
the snapshot it is getting an error:
The process could not bulk copy into table {table name}
Violation of PRIMARY KEY constraint. Cannot insert duplicate key.
I understand what that means, so on that table (it is not a necessary
table, just a log), I deleted all records from that table and the
delivery got past that table to the next table in the list and displayed
the same message.
What can I do on the client to get this to work? I can't delete the info
in the second table because it is much more required and I don't want to
have it delete the same data on the main server. I know it is trying to
insert a new record that has the same primary key, but is it trying to
do that because the server record has one guid and the client has a
different guid (I don't really know how the guid's work in replication -
if the record has the same guid on all servers).
Darin
*** Sent via Developersdex http://www.codecomments.com ***
I would use a tool like RedGate's datacompare to reconcile the data to the
Publisher. You'll need to modify the scripts somewhat if you have PK issues
and then I'd reinitialize.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
|||I know they are duplicate keys. The client has a record w/ the key as 2
(identity column), so does the distributor. The snapshot is trying to
send that record down - why, and how can I make so the snapshot doesn't
try to send it down?
Darin
*** Sent via Developersdex http://www.codecomments.com ***
|||Hi.
In the publisher, mark that identity column which is acting as primary key
to NOT FOR REPLICATION in the design mode of that table.
in this case, the identity will be inserted independently at the subscriber
avoiding primary key errors.
"Darin" wrote:

> I know they are duplicate keys. The client has a record w/ the key as 2
> (identity column), so does the distributor. The snapshot is trying to
> send that record down - why, and how can I make so the snapshot doesn't
> try to send it down?
> Darin
> *** Sent via Developersdex http://www.codecomments.com ***
>
|||The table on both the subscriber and the distrubtor are setup that way.
Darin
*** Sent via Developersdex http://www.codecomments.com ***
|||Can you outline your situation a little more. Usually a snapshot of the
publisher's data is sent from the publisher to the subscriber. Initially
there is a drop table executed on the subscriber. There are variations - one
of which is a nosync initialization, where all the required info already
exists on the subscriber and the publisher just sends the metadata and
system stored procedures/triggers required to run replication. There are
other possibilities where the table and its data remain and the new data is
appended. Of these, which is your requirement, or is your requirement
something quite different?
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com