Showing posts with label login. Show all posts
Showing posts with label login. Show all posts

Friday, March 30, 2012

how can I connect to .MDF through 2 applications?

Here is the big problem:

    I am using ASP.NET 2.0 login control. this control connect to ASPNET.MDF database.I built another application using windows service, and this application also connects to ASPNET.MDF database.

problem is that the first application that connects to the database, locks the database, and so the other application cannot use the database untill the other application is closed.

I am going on circles about this, and just don't know what to do.

Please please please. love me do.Big Smile

I don't think you can use the membership database for none Asp.net application because a console application is not Asp.net application, but if you could maybe you should create one for each application as the link below from a Microsoft security forum. The reason is by default every application uses the same application name to access the database so why not create one for each application so it is clean. Post again if you still have question. Hope this helps.

http://aspalliance.com/groups/microsoft_public_dotnet_framework_aspnet_security/ng-645637_Membership_Database_Security.aspx

sql

Wednesday, March 28, 2012

How can I change the login name and password?

How can I change the login name and password? Quite frankly, I would like the
login name to be same as my WIndows login and no passwrod.
Syntax
sp_password [ [ @.old = ] 'old_password' , ]
{ [ @.new =] 'new_password' }
[ , [ @.loginame = ] 'login' ]
HTH, Jens Suessmeyer.
"Marty" <Marty@.discussions.microsoft.com> schrieb im Newsbeitrag
news:9BA17C7E-07B5-43DE-BADF-F15AA921DF52@.microsoft.com...
> How can I change the login name and password? Quite frankly, I would like
> the
> login name to be same as my WIndows login and no passwrod.
|||I typed exactly what you wrote, except for the brackets, at a command prompt.
I got the error message that sp_password is not a recognized command. Is
there a particular folder I have to be in for this to work? If I want to
leave the password blank do I just not enter nothing or do I use the word
null.
Thanks for your help
"Jens Sü?meyer" wrote:

> Syntax
> sp_password [ [ @.old = ] 'old_password' , ]
> { [ @.new =] 'new_password' }
> [ , [ @.loginame = ] 'login' ]
>
> HTH, Jens Suessmeyer.
> "Marty" <Marty@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:9BA17C7E-07B5-43DE-BADF-F15AA921DF52@.microsoft.com...
>
>
|||master..sp_password 'myoldone','mynewone','theusername'
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Marty" <Marty@.discussions.microsoft.com> schrieb im Newsbeitrag
news:0B925CDD-32D6-49A1-B132-75C56007289B@.microsoft.com...[vbcol=seagreen]
>I typed exactly what you wrote, except for the brackets, at a command
>prompt.
> I got the error message that sp_password is not a recognized command. Is
> there a particular folder I have to be in for this to work? If I want to
> leave the password blank do I just not enter nothing or do I use the word
> null.
> Thanks for your help
> "Jens Smeyer" wrote:
|||sp_password still comes up as an invalid command. In your second example you
omitted @.old, etc. Please give me the exact syntax and command.
Thanks again
"Jens Sü?meyer" wrote:

> master..sp_password 'myoldone','mynewone','theusername'
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Marty" <Marty@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:0B925CDD-32D6-49A1-B132-75C56007289B@.microsoft.com...
>
>
|||My first post was the common expression based on BOL Syntax.
Where do you fire the commadn to the SQL Server, from OSQL ?
Jens Suessmeyer.
"Marty" <Marty@.discussions.microsoft.com> schrieb im Newsbeitrag
news:11D32945-2151-4EFE-9608-CCEA419BDE07@.microsoft.com...[vbcol=seagreen]
> sp_password still comes up as an invalid command. In your second example
> you
> omitted @.old, etc. Please give me the exact syntax and command.
> Thanks again
> "Jens Smeyer" wrote:
|||Sorry but I don't know what BOL means. OSQL? I typed the command from a
command promt. I thought I was in the wrong folder so I did a search of the
entire drive for the command sp_password and couldn't find it.
Sorry to be such a pest. I really appreciate you sticking with me.
Marty
"Jens Sü?meyer" wrote:

> My first post was the common expression based on BOL Syntax.
> Where do you fire the commadn to the SQL Server, from OSQL ?
> Jens Suessmeyer.
> "Marty" <Marty@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:11D32945-2151-4EFE-9608-CCEA419BDE07@.microsoft.com...
>
>
|||-BOL (Books Online) Help for SQL Server included in the installing package.
-OSQL Commandline Uitl to query the SQl Server.
Start --> Run --> Cmd --> Then the command i send to you. here you can
execute the sp_chanegpassword command.
Further information, just raise a hand, you are not bothering me :-)
HTH, Jens Suessmeyer.
"Marty" <Marty@.discussions.microsoft.com> schrieb im Newsbeitrag
news:7B1AAD94-C5A0-4782-8BA6-2B1F6DC95E5E@.microsoft.com...[vbcol=seagreen]
> Sorry but I don't know what BOL means. OSQL? I typed the command from a
> command promt. I thought I was in the wrong folder so I did a search of
> the
> entire drive for the command sp_password and couldn't find it.
> Sorry to be such a pest. I really appreciate you sticking with me.
> Marty
> "Jens Smeyer" wrote:
|||I'm afraid I'm still lost. What folder to I have to be in when I execute the
command line? I have tried the command line at a command promt and get the
message that it is an unreconizeable command. Am I dumber than I thought?
"Jens Sü?meyer" wrote:

> -BOL (Books Online) Help for SQL Server included in the installing package.
> -OSQL Commandline Uitl to query the SQl Server.
> Start --> Run --> Cmd --> Then the command i send to you. here you can
> execute the sp_chanegpassword command.
> Further information, just raise a hand, you are not bothering me :-)
> HTH, Jens Suessmeyer.
> "Marty" <Marty@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:7B1AAD94-C5A0-4782-8BA6-2B1F6DC95E5E@.microsoft.com...
>
>
|||By the way, I found the article and the syntax is exactly what you said it
was. But I still get the error
"Jens Sü?meyer" wrote:

> -BOL (Books Online) Help for SQL Server included in the installing package.
> -OSQL Commandline Uitl to query the SQl Server.
> Start --> Run --> Cmd --> Then the command i send to you. here you can
> execute the sp_chanegpassword command.
> Further information, just raise a hand, you are not bothering me :-)
> HTH, Jens Suessmeyer.
> "Marty" <Marty@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:7B1AAD94-C5A0-4782-8BA6-2B1F6DC95E5E@.microsoft.com...
>
>

Monday, March 19, 2012

how can associated sa with a trusted SQL Server connection in sql server 2005?

I want to use sa user login sql server 2005 to visit my database "dotnet20" but when I set the user property in User Mapping, It Report
when I set it, An Error Occur like follow
Cannot use the special principal 'sa'. (Microsoft SQL Server, Error: 15405)
and also when I want to Login sql server use 'sa' user, It Report
Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)
how can associated 'sa' with a trusted SQL Server connection?

I'm having this exact same problem.

When I login using Windows authent. I can connect to the DB but cannot ad users or grant permissions.

I can create tables fine, but other than that not much? Any idea.

I basically wanted to enable SQL Authent. as well as windows in the security Tab after right-clicking on my Database, but the Windows login lacks the rights although it was used to create the DB and all.

Help !

|||

Basically, how can I add my Windows user account to the sysadmin role.

I couldve used the default sa account but whenever I login in SQL Serv authent. mode using 'sa' and blank Pwd on the SQL Serv Mngmt Studio Express CTP, on the 1st attempt, it says smthg. like

Cannot connect to INSPI6K\SQLEXPRESS.

----------
ADDITIONAL INFORMATION:

A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)

For help, click:http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=233&LinkId=20476


Upon trying again just says

Cannot connect to INSPI6K\SQLEXPRESS.

----------
ADDITIONAL INFORMATION:

Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)

For help, click:http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18452&LinkId=20476

when I changed the Network protocol to Named Pipes or TCP/IP I got

Cannot connect to INSPI6K\SQLEXPRESS.

----------
ADDITIONAL INFORMATION:

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: 28 - Server doesn't support requested protocol) (Microsoft SQL Server, Error: -1)

What's happening? Why can't I login as 'sa' ?

Please tell me all U DBA-gods out there...

|||

One f the suggestions I recvd. was to hack the registry, and change theLoginMode of the SQL Server 2005 Express.

Any idea how to go about it, and which Reg. key to change for enabling mixed authentications(SQL & Windows), instead of just Windows auth.?

I saw this article but couldn't find that key

http://support.microsoft.com/default.aspx?scid=kb;en-us;285097

Thanks

|||

OK I finally found theLoginMode key by searching the Registry and changed it to 2 (original value was 1)

Required a Restart, for it to take effect.

Thankfully not getting thetrusted connection error anymore.

But now it's whining about the password.

AFAIK I never set any Pwd for 'sa' account, yet executing sqlcmd on command prompt throws error

Password Msg:18456

Is there any way to reset the sa PWD? What's the way out?

|||

Phew! The problem has finally been resolved.

What a nightmare... all due to installing SQL Server 2005 Express on top of existing MSDE (from VS 7.0)

Seehttp://forums.asp.net/1222469/ShowPost.aspx for further details.

and with some help from this articlehttp://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=124596&SiteID=1

Thanks.

Moral of the story: Always unninstall previous versions. Better safe than very sorry !