Showing posts with label inside. Show all posts
Showing posts with label inside. Show all posts

Monday, March 19, 2012

cannot create new sql express database

Hi,

I am trying to create a new Sql Express Database (.mdf file) from inside Visual Studio 2005. I did the following:

1) Created a Database Project in Visual Studio.

2) Choose Data Source to be Microsoft SQL Server Database File

3) Browse to a directory and enter a file name for the new database, say abc.mdf

4) When I click OK, Visual Studio prompts me if I want to create the database file, I click yes.

5) After a while, I get this error message:

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)

Then I opened SQL Server Configuration Manager, and I enabled Named Pipes and TCP/IP for both SQLEXPRESS and MSSQLSERVER. It prompts me that the settings will not change until the service is re-started.

When I go to Administrative Tools -> Services, I see that SQLServer (MSSQLSERVER) is started, and SQL Server (SQLEXPRESS) is stopped. I can stop the MSSQLSERVER service. But when I tried to start SQLEXPRESS service, I get the following error message:

Windows could not start the SQL Server (SQLEXPRESS) on Local Computer. For more information, review the System Event Lo9g. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 17058.

I have Visual Stuio 2005 and Sql Server 2005 Installed on my machine, and I believe I am logged on using an administrator account.

Can someone help me to figure out what's wrong please?

Thanks and regards,

Alice

It seems that something is wrong with your SQL Express isntallation if it won't start. You should check the error log to see if it give more details about the problem starting the service. The error log is generally located at C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG (Your InstanceID may be different).

When you check the error log, please also verify that you are not running a beta version of SQL Express. The version number should contain either 9.00.1399 or 9.00.2047.

Mike

|||

Hi,

It turns out SQL Express wasn't installed properly. I re-installed it and it works fine now. Thanks a lot.

Alice

Thursday, March 8, 2012

Cannot create a connection to data source

I created a very simple report just to see how Reporting Services works adn
it shows all the data just fine in the preview inside Visual Studio but whe
I run the report it shows me this error:
Reporting Services Error
----
--
a.. An error has occurred during report processing. (rsProcessingAborted)
Get Online Help
a.. Cannot create a connection to data source 'Northwind'.
(rsErrorOpeningConnection) Get Online Help
a.. Login failed for user 'sa'.
----
--
Microsoft Reporting Services
Isn't this weird? I mean, I'm working with a shared data source which
connects properly when I test it and the data gets shwon on the preview so
why doesn't it work?.
--
Sergio Florez M.
Medellin, ColombiaSergio,
In your data source, check for "allow saving password". You should also
consider using windows authentication instead.
Jon Jahren
"Sergio Florez M." <sergioflorezm @. hotmail.com> wrote in message
news:OcSs0hDyEHA.3804@.TK2MSFTNGP10.phx.gbl...
> I created a very simple report just to see how Reporting Services works
adn
> it shows all the data just fine in the preview inside Visual Studio but
whe
> I run the report it shows me this error:
> Reporting Services Error
> ----
--
> --
> a.. An error has occurred during report processing.
(rsProcessingAborted)
> Get Online Help
> a.. Cannot create a connection to data source 'Northwind'.
> (rsErrorOpeningConnection) Get Online Help
> a.. Login failed for user 'sa'.
> ----
--
> --
> Microsoft Reporting Services
> Isn't this weird? I mean, I'm working with a shared data source which
> connects properly when I test it and the data gets shwon on the preview so
> why doesn't it work?.
> --
> Sergio Florez M.
> Medellin, Colombia
>|||I changed the connection settings in the report manager and now it works
fine. Now I have the same problem in a report that I created without a
shared data source and I can't find how to allow saving password.
Changing to Windows authentication isn't the kind of solution I'm looking
for as it should work just fine either way.
--
Sergio Florez M.
Medellin, Colombia
"Jon Jahren" <jon.jahren.fightspam@.sqlkompetanse.no> wrote in message
news:uzkq#1JyEHA.2676@.TK2MSFTNGP12.phx.gbl...
> Sergio,
> In your data source, check for "allow saving password". You should also
> consider using windows authentication instead.
> Jon Jahren
> "Sergio Florez M." <sergioflorezm @. hotmail.com> wrote in message
> news:OcSs0hDyEHA.3804@.TK2MSFTNGP10.phx.gbl...
> > I created a very simple report just to see how Reporting Services works
> adn
> > it shows all the data just fine in the preview inside Visual Studio but
> whe
> > I run the report it shows me this error:
> >
> > Reporting Services Error
> ----
> --
> > --
> >
> > a.. An error has occurred during report processing.
> (rsProcessingAborted)
> > Get Online Help
> > a.. Cannot create a connection to data source 'Northwind'.
> > (rsErrorOpeningConnection) Get Online Help
> > a.. Login failed for user 'sa'.
> >
> ----
> --
> > --
> > Microsoft Reporting Services
> >
> > Isn't this weird? I mean, I'm working with a shared data source which
> > connects properly when I test it and the data gets shwon on the preview
so
> > why doesn't it work?.
> >
> > --
> > Sergio Florez M.
> > Medellin, Colombia
> >
> >
>

Saturday, February 25, 2012

Cannot connect to the SQL 2005 Express

I created test project and want to use SQL 2005 database inside.

1. I created Test database with DEFAULT rights

2. I go into server explorer, press Add Connection. Shows message box for connecting to the server: <PCNAME> using windows authntification.

But NO database allowed to view :(.

Which setting should be set for SQL server database to i could connect and work with it?

P.S I use LOCAL connection. The Application and Server should be on the same PC.|||

sqlexpress is a named instance with instance name as "sqlexpress". For local connection, your connection string can be ".\sqlexpress", "(local)\sqlexpress", "<machinename>\sqlexpress", and e.t.c..

some other useful info: http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx

|||

I do not use connection string - I use Visual Studio User Interface for connecting. I could try to connect as blind but I want to get list of the databases and connect on click.

Could you please give me advice how I could to do that?

|||In Visual Studio, click Connect to Database in Server Explorer. Under Choose Data Source, select Microsoft SQL Server. Under Data Provider drop-down list, select .NET Framework Data Provider for SQL Server and click Continue. On the Add Connection window, in the Server Name drop-down list, either you type .\SQLEXPRESS or select it in your list. Select the database in the drop-down list and click Test Connection. Once you're done, you now have this connection in your SQL Server 2005 Express database from Visual Studio 2005|||

bass_player wrote:

On the Add Connection window, in the Server Name drop-down list, either you type .\SQLEXPRESS or select it in your list. Select the database in the drop-down list and click Test Connection.

I CANNOT SEE ANY databases, so I CANNOT SELECT invisible (for me) database and because I ask - WHICH RIGHTS I should to set in MS SQL Express to Databases could be visible.

Server list - exist (one server: <PCNAME>)

Databases list is EMPTY!!!!!!

|||

The list is for server, a server can host multiple databases. In order to see your local server in the drop down list, you need to have your SQL Browser running. Did you try to type ".\sqlexpress"?

|||

Aaaaaaa!!!....

I've understood. You all were right. .\sqlexpress is required - and all works.

Thanx bass_player and Xinwei Hong - MSFT