Showing posts with label express. Show all posts
Showing posts with label express. Show all posts

Friday, March 9, 2012

loging in to sql express

I am trying to login into sql express using studio express and keep getting this msg.

"Cannot connect

....... under the default setting SQL Server does not allow remote connections. (provider: Named Popes Provider, error: 40 - could not open a connection to sql server) (sql server error2)"

I did try and make a change under surface area configuration to include local and remote connections but it did not help. Any thoughts? Thanks!

David

Are you using the SQL Server Browser service ? If not it could that that you might not use the default port of 1433. If so, type in the port number after the InstanceName using the syntax Servername\InstanceName,PortNumber which should be in your case something more specific Servername\SQLExpress,PortNumber


HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||Jens, thanks. You gave me the idea to start using the browser service and I logged in that way.

Wednesday, March 7, 2012

login windows authentication problem

Hi,

I have a problem with sql server 2005 express, when i try to connect to an sql database it says login: is not a trusted connection to an sql database. I have gone into reg edit and changed the authentication setting from windows oly mode 1 to mixed mode 2. It still has the same problem, does anyone have any idea what the problem may be?

kind regards

Chris J

Did you restart the service ?

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Login troubles

I've installed SQL server express on a remote server. Using remote desktop, I can log in using Windows Authetication.

But I also want to be able to login remotely. Using Server Management Express I've added a new login and specified the password for SQL server authentication. My problem is that the password keeps getting changed to a mystery 15 character value.

What's going on?

Are you saying that you're tried logging in with the password you're setting and it's not working?

Mike

Login to SQL Server management studio

Hi,

I am facing a strange behavior during loging in to SQL server mangement studio.

Whenever I install SQL server express, various protocols like Named Pipe and TCP/IP and SQL browser are disabled by default. But still I am able to log in to SQL Server throguh Management studio.

But when I try to log in to SQL server throguh one of my applications, it allows me to log in to it only for one time. From next time onwards, I am not able to log in to SQL server neither through my application nor through Management studio.

I connect to SQL server using "machine name"\"Instance name". Machine name is the name of machine on my office LAN.

PS: Once this problem occurs, I can log in to SQL server if I use "localhost" instead of "machine name".

Any suggestions would be tremendously helpful.

Regards

-Orion

SQL Express supports connecting through Shared Memory, which is a local connectivity protocol that is used by the SQL Native Client. This is how you're connecting with Management Studio. I can't tell you what the problem is with your application as you have not provided an error message or error log.

Mike

|||

Hi Mike,

Thanks for the reply.

>>
I can't tell you what the problem is with your application as you have not provided an error message or error log
>>

Following are the details of the exception thrown by SQL server.

{"State:08001,Native:6,Origin:[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets] State:01000,Native:11004,Origin:[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]"}

The problem is when it allows my application to connect to SQL Server only once. After this, I need to enable TCP/IP protocol for any subsequent connection through my application or SQL Server management studio.

Regards,
Orion

|||

Hi Orion,

Could you define what you mean by "subsequent connections through my application"? Are you talking about a single application creating multiple threads connecting to SQL Server? Are these different copies of the same application being run by other users on other computers? What is the connection string you're using from your application?

I don't recognize that error, is there any more descirptive text?

Mike

Login to SQL Server Express using Command Prompt

How can I login to SQL Server Express instance(localhost\SqlExpress) using command prompt so that I can query database. Is there any alternative GUI tool for SQL Server Express Manager? (I think Microsoft has discontinued SQL Server Express Manager). I prefer using Command Prompt. I am using WindowsXP Professional.Have you looked for an osql.exe? I'd personaly look in the installation directory of the sql express and look at all the .exe files and see what's there.|||

oSQL is supported, but SQLCmd is the 2005 equivalent that is recommended. Simply open a command prompt and open the connection to your server as in:

SQLCmd -S .\sqlexpress -E

This will take you to a prompt where you can start typing commands. More information about SQLCmd is available in Books Online.

Regards,

Mike Wachal
SQL Express team

-
Mark the best posts as Answers!

|||

I don't have SQL Server Express Manager. I want to enable ASPNET account in SQL Server Express so that my ASP.NET application can access databases created in SQL Server Express.

How can I accomplish above task using Command Promt. If anyone recommend any GUI tools other than Express Manager it may be even better.

Thanks a lot for your support.

|||

You can download Management Studio Express from http://msdn.microsoft.com/vstudio/express/sql/download/. If you want to use the command line, use SQLCmd as I suggested above.

Once you've connected using SQLCmd, you will need to write T-SQL statements to create Logins and Users for the ASPNET user. You should be able to find information about creating Logins and Users in the Books Online at http://msdn2.microsoft.com

Regards,

Mike Wachal
SQL Express team

-
Mark the best posts as Answers!

|||

Now I can connect to SQL Server Express using Command Prompt but I get some error messages when I use T-SQL commands.Following are the commands I used.

D:\Documents and Settings\Sankar>sqlcmd -S .\sqlexpress
1> use BookShop
2> SELECT Name FROM Department
3> GO

I receive following error message when I type above SELECT statement .

Msg 911, Level 16, State 1, Server JAMESGAT-5BB8A7\SQLEXPRESS, Line 1
Could not locate entry in sysdatabases for database 'BookShop'. No entry found
with that name. Make sure that the name is entered correctly.
1>

|||

Oops, I forgot to specify the path. The command should be typed as below.

sqlcmd -S .\sqlexpress -d D:\Inetpub\wwwroot\BookShop\App_Data\BookShop.mdf

We can perform T-SQL queries after connecting to the database as described above.

login to database failed...

Hi,

I am using VS2003 with SQLExpress on my local machine. I am trying to configure an app to connect to a loca sql express database. The following is
the connection string that I am using and the error message that I am receiving.

Any ideas what the problem is?

<add key="connectionString" value="Server=IKITSCH\SQLEXPRESS;database=Test1;trusted_connection=true" />


Cannot open database "Test1" requested by the login. The login failed. Login failed for user 'IKITSCH\ASPNET'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot open database "Test1" requested by the login. The login failed. Login failed for user 'IKITSCH\ASPNET'.

Source Error:


Line 1600: {
Line 1601: SqlConnection conSql = new SqlConnection(ConnectionString);
Line 1602: conSql.Open();
Line 1603: return conSql;
Line 1604: }

Source File: c:\inetpub\wwwroot\testsite\classes\config.cs Line: 1602

Stack Trace:


[SqlException: Cannot open database "Test1" requested by the login. The login failed.
Login failed for user 'IKITSCH\ASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
eStreamBG.Dating.Classes.DB.Open() in c:\inetpub\wwwroot\testsite\classes\config.cs:1602
eStreamBG.Dating.Classes.DBSettings.Get(String Key) in c:\inetpub\wwwroot\TestSite\Classes\DBSettings.cs:125
eStreamBG.Dating.Classes.DBSettings.Get(String Key, String Default) in c:\inetpub\wwwroot\TestSite\Classes\DBSettings.cs:75
eStreamBG.Dating.Classes.Misc.get_SiteEmail() in c:\inetpub\wwwroot\testsite\classes\config.cs:1719
eStreamBG.Dating.Classes.EmailQueueItem.Create(String to, String subject, String body) in c:\inetpub\wwwroot\TestSite\Classes\Email.cs:224
eStreamBG.Dating.Classes.ExceptionLogger.Log(String source, Exception ex) in c:\inetpub\wwwroot\TestSite\Classes\Exceptions.cs:122

Many Thanks!


------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032

Hi

You are using integrated security for authentication to the SQL Server database.

ASP.Net runs with the identity of the ASPNET user account by default and this user account has limited rights.

Try to avoid integrated security and specify the user name and password for the SQL Connection String instead.

And make sure you DB name isTest1 not test1Smile

|||That means the login account used to open the connection does not have access to the requested database Test1. Since the connection use Trust_connection and Impersonate is not enabled, IIS?use?its?account?machinename\ASPNET?to?connect?to?database?then?causes?the?failure.?To?solve?this,?open?Management?Studio->connect?to?SQLExpress->navigate?to?Security->Logins->check Properties of IKITSCH\ASPNET->switch?to?User?Mapping?tab->add?mapping?to?the?Test1?database?and?give?sufficient?permissions?to?the?mapped?database?user?for?future?operations?on?Test1?database.?

You can download Management Studio Express from here:

http://msdn.microsoft.com/vstudio/express/sql/download/|||

Hi,

Many Thanks!

|||

Hello,

I am also experiencing the same problem as 'chemystery', and I too have used integrated security in my connection string for authentication to the SQL Server.

I have contacted the DB and server administrators to find out if they can give me the username and password so that I can include it in my connectionstring but they have refused as they say it breaches their security protocols.

Is there another way around this that will allow integrated security and allow access to the DB?

Thanks in advance!


|||Then you have 2 options:
Walkthrough: Encrypting Configuration Information Using Protected Configuration

Or?ask the database host to add your Windows account?to?SQL?logins?and?give?it?proper?permissions,?so?that?you?can?the?same?Windows?Identity?when?opening?connection?with?Integrated?Security.?To?ensure?to?use?your?account?to?open?conneciton?for?each?web request,?you?can?use?impersonation?with?credentital, please refer to: identity Element

Login time out

Hello together,
I've got the following: SQL Server 2005 Express & SQL Server 2000
The sql server 2000 has got a database with some tables, which I want to
show as view (readonly) in the sql server 2005 express.
Now I did the following:
I added a linked server to the sql 2005
I've choosen the security option: "Be made using this security context" with
the sql user and sql password of the SQL Server 2000
But when I try to select data from the server (SELECT * FROM
Server.Database.dbo.Table), I get the following error:
OLE DB provider "SQLNCLI" for linked server "192.168.80.5" returned message
"Login timeout expired".
OLE DB provider "SQLNCLI" for linked server "192.168.80.5" returned 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.".
Msg 126, Level 16, State 1, Line 0
VIA Provider: The specified module could not be found.
can anybody help me please?
thank you
bernhard
Run the Surface Area Configuration tool and enable the Remote Connections to
have access outside of the Express instance.
Andrew J. Kelly SQL MVP
"Bernhard Wurm" <Bernhard@.eworx.at> wrote in message
news:%23oLTY2WBGHA.628@.TK2MSFTNGP14.phx.gbl...
> Hello together,
> I've got the following: SQL Server 2005 Express & SQL Server 2000
> The sql server 2000 has got a database with some tables, which I want to
> show as view (readonly) in the sql server 2005 express.
> Now I did the following:
> I added a linked server to the sql 2005
> I've choosen the security option: "Be made using this security context"
> with the sql user and sql password of the SQL Server 2000
> But when I try to select data from the server (SELECT * FROM
> Server.Database.dbo.Table), I get the following error:
> OLE DB provider "SQLNCLI" for linked server "192.168.80.5" returned
> message "Login timeout expired".
> OLE DB provider "SQLNCLI" for linked server "192.168.80.5" returned
> 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.".
> Msg 126, Level 16, State 1, Line 0
> VIA Provider: The specified module could not be found.
>
> can anybody help me please?
>
> thank you
> bernhard
>
>
|||But I want to connection the sql 2000 from the sql 2005 and not the other
way round.
If I view the properties of the SQL 2000 / Connections then I find "Allow
remote connections to this server". This is enabled.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> schrieb im Newsbeitrag
news:ebZmIAXBGHA.976@.TK2MSFTNGP15.phx.gbl...
> Run the Surface Area Configuration tool and enable the Remote Connections
> to have access outside of the Express instance.
> --
> Andrew J. Kelly SQL MVP
>
> "Bernhard Wurm" <Bernhard@.eworx.at> wrote in message
> news:%23oLTY2WBGHA.628@.TK2MSFTNGP14.phx.gbl...
>
|||Yes so you must do what I suggested. Try it and see if it works.
Andrew J. Kelly SQL MVP
"Bernhard Wurm" <Bernhard@.eworx.at> wrote in message
news:OxOYoHXBGHA.1864@.TK2MSFTNGP12.phx.gbl...
> But I want to connection the sql 2000 from the sql 2005 and not the other
> way round.
> If I view the properties of the SQL 2000 / Connections then I find "Allow
> remote connections to this server". This is enabled.
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> schrieb im Newsbeitrag
> news:ebZmIAXBGHA.976@.TK2MSFTNGP15.phx.gbl...
>
|||Hello,
they are enabled.
thank you
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> schrieb im Newsbeitrag
news:e4osudYBGHA.1372@.TK2MSFTNGP14.phx.gbl...
> Yes so you must do what I suggested. Try it and see if it works.
> --
> Andrew J. Kelly SQL MVP
>
> "Bernhard Wurm" <Bernhard@.eworx.at> wrote in message
> news:OxOYoHXBGHA.1864@.TK2MSFTNGP12.phx.gbl...
>
|||While don't talk directly about SQLNCLI they may be useful:
http://support.microsoft.com/default.aspx?kbid=314530
http://support.microsoft.com/default...b;en-us;905618
Andrew J. Kelly SQL MVP
"Bernhard Wurm" <Bernhard@.eworx.at> wrote in message
news:u3FJwzgBGHA.412@.TK2MSFTNGP15.phx.gbl...
> Hello,
> they are enabled.
> thank you
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> schrieb im Newsbeitrag
> news:e4osudYBGHA.1372@.TK2MSFTNGP14.phx.gbl...
>

Login time out

Hello together,
I've got the following: SQL Server 2005 Express & SQL Server 2000
The sql server 2000 has got a database with some tables, which I want to
show as view (readonly) in the sql server 2005 express.
Now I did the following:
I added a linked server to the sql 2005
I've choosen the security option: "Be made using this security context" with
the sql user and sql password of the SQL Server 2000
But when I try to select data from the server (SELECT * FROM
Server.Database.dbo.Table), I get the following error:
OLE DB provider "SQLNCLI" for linked server "192.168.80.5" returned message
"Login timeout expired".
OLE DB provider "SQLNCLI" for linked server "192.168.80.5" returned 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.".
Msg 126, Level 16, State 1, Line 0
VIA Provider: The specified module could not be found.
can anybody help me please?
thank you
bernhardRun the Surface Area Configuration tool and enable the Remote Connections to
have access outside of the Express instance.
Andrew J. Kelly SQL MVP
"Bernhard Wurm" <Bernhard@.eworx.at> wrote in message
news:%23oLTY2WBGHA.628@.TK2MSFTNGP14.phx.gbl...
> Hello together,
> I've got the following: SQL Server 2005 Express & SQL Server 2000
> The sql server 2000 has got a database with some tables, which I want to
> show as view (readonly) in the sql server 2005 express.
> Now I did the following:
> I added a linked server to the sql 2005
> I've choosen the security option: "Be made using this security context"
> with the sql user and sql password of the SQL Server 2000
> But when I try to select data from the server (SELECT * FROM
> Server.Database.dbo.Table), I get the following error:
> OLE DB provider "SQLNCLI" for linked server "192.168.80.5" returned
> message "Login timeout expired".
> OLE DB provider "SQLNCLI" for linked server "192.168.80.5" returned
> 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.".
> Msg 126, Level 16, State 1, Line 0
> VIA Provider: The specified module could not be found.
>
> can anybody help me please?
>
> thank you
> bernhard
>
>|||But I want to connection the sql 2000 from the sql 2005 and not the other
way round.
If I view the properties of the SQL 2000 / Connections then I find "Allow
remote connections to this server". This is enabled.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> schrieb im Newsbeitrag
news:ebZmIAXBGHA.976@.TK2MSFTNGP15.phx.gbl...
> Run the Surface Area Configuration tool and enable the Remote Connections
> to have access outside of the Express instance.
> --
> Andrew J. Kelly SQL MVP
>
> "Bernhard Wurm" <Bernhard@.eworx.at> wrote in message
> news:%23oLTY2WBGHA.628@.TK2MSFTNGP14.phx.gbl...
>|||Yes so you must do what I suggested. Try it and see if it works.
Andrew J. Kelly SQL MVP
"Bernhard Wurm" <Bernhard@.eworx.at> wrote in message
news:OxOYoHXBGHA.1864@.TK2MSFTNGP12.phx.gbl...
> But I want to connection the sql 2000 from the sql 2005 and not the other
> way round.
> If I view the properties of the SQL 2000 / Connections then I find "Allow
> remote connections to this server". This is enabled.
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> schrieb im Newsbeitrag
> news:ebZmIAXBGHA.976@.TK2MSFTNGP15.phx.gbl...
>|||Hello,
they are enabled.
thank you
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> schrieb im Newsbeitrag
news:e4osudYBGHA.1372@.TK2MSFTNGP14.phx.gbl...
> Yes so you must do what I suggested. Try it and see if it works.
> --
> Andrew J. Kelly SQL MVP
>
> "Bernhard Wurm" <Bernhard@.eworx.at> wrote in message
> news:OxOYoHXBGHA.1864@.TK2MSFTNGP12.phx.gbl...
>|||While don't talk directly about SQLNCLI they may be useful:
http://support.microsoft.com/default.aspx?kbid=314530
http://support.microsoft.com/defaul...kb;en-us;905618
Andrew J. Kelly SQL MVP
"Bernhard Wurm" <Bernhard@.eworx.at> wrote in message
news:u3FJwzgBGHA.412@.TK2MSFTNGP15.phx.gbl...
> Hello,
> they are enabled.
> thank you
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> schrieb im Newsbeitrag
> news:e4osudYBGHA.1372@.TK2MSFTNGP14.phx.gbl...
>

Friday, February 24, 2012

Login problems with SQL Express edition.

Hi,

when running my application and trying to access an SqlServer express edition DB, I encounter the folowing error:

Cannot open user default database. Login failed.

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

Does any one know how this problem can be resolved?

It is the SQL Server that comes togather with the VS2005.

Thank you!

The problem doesnt occure when i run the application using the default web server (cassini). It only occures when I run it using IIS.

But how can i run the application on IIS and use the DB?

Thnaks.

Login problems after publishing (sql express server)

Thanks for taking your time to read this.(sorry if someone posted this earlier but no solutions helped)

After i published my website, i am unable to login anymore. It has this error of "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed."

Note ** im using vb

This may cuased by the IIS account (5.0 is ASPNET and 6.0 is NT AUTHORITY\NETWORK SERVICE) used to connect to SQL is not allowed to generate the user instance. I'm sorry to say that I don't know how to give the permission to the account, maybe you can try to add the IIS account to local machine Administrators group. But I always use a workaround: remove the User Instance attribute from your connection string as I do not need it. To know more about connection string, you can visit this link:

http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(d=ide).aspx

Monday, February 20, 2012

Login not working anymore

I am running an Express 2005 server, using the Management software included. I was attempting to view server settings when it locked me out. I could not access the properties of the server, and after that, anything. I tried logging out, but it would not let me log back in. It said that the server may not allow remote connections, but this was the same login that I had been using previously with Windows authentication without a problem.

So, now I'm locked out of my database with no way to access anything. Does anyone know how I can get around this or make the login work again?
Hi,

is the service started properly ? Perhaps you switch the RemoteConnections Setting for some reason ? http://www.sqlserver2005.de/SharedFiles/RemoteConnection.jpg

Or you have a different port than the default one associated with the Service and the SQL Browser which does the dynamic directing doesnt work anymore ? In this case start the SQL Browser or use the direct syntax to contact your SQL Server : machineName\InstanceName,Portnumber . There could be various issues why you can′t connect anymore, try to find out if something changed on the system first by looking in the event logs.

One possible reason *could* be that you assigned the service a specific account and changed the password for that account, but this could be clearly seen in the event log.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de