Showing posts with label administration. Show all posts
Showing posts with label administration. Show all posts

Friday, March 9, 2012

login and sql data base

I make my login account data base using the Web Site Administration Tool in the solution explorer i then debug it on my computer and it works fine i can login then i upload my site and sql data base to server and it no longer works i just get this message what do i do can i change theWeb Site Administration Tool so that it uses a access data base by default for login instead of sql.

Server Error in '/KRAZYJON' Application.

Failedto generate a user instance of SQL Server due to afailure in startingthe process for the user instance. The connection will be closed.

Description:Anunhandled exception occurred during the execution of the current webrequest. Please review the stack trace for more information about theerror and where it originated in the code.

SQLExpress database file auto-creation error:

Theconnection string specifies a local Sql Server Express instance using adatabase location within the applications App_Data directory. Theprovider attempted to automatically create the application servicesdatabase because the provider determined that the database does notexist. The following configuration requirements are necessary tosuccessfully check for existence of the application services databaseand automatically create the application services database:

    Ifthe applications App_Data directory does not already exist, the webserver account must have read and write access to the applicationsdirectory. This is necessary because the web server account willautomatically create the App_Data directory if it does not alreadyexist.If the applications App_Data directory already exists, the webserver account only requires read and write access to the applicationsApp_Data directory. This is necessary because the web server accountwill attempt to verify that the Sql Server Express database alreadyexists within the applications App_Data directory. Revoking read accesson the App_Data directory from the web server account will prevent theprovider from correctly determining if the Sql Server Express databasealready exists. This will cause an error when the provider attempts tocreate a duplicate of an already existing database. Write access isrequired because the web server accounts credentials are used whencreating the new database.Sql Server Express must be installed on the machine.The process identity for the web server account must have a localuser profile. See the readme document for details on how to create alocal user profile for both machine and domain accounts.
Source Error:

An unhandled exception was generated during the execution of thecurrent web request. Information regarding the origin and location ofthe exception can be identified using the exception stack trace below.


Stack Trace:

[SqlException (0x80131904): 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.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735043
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +47
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) +68

[HttpException (0x80004005): Unable to connect to SQL Server database.]
System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) +124
System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install) +86
System.Web.Management.SqlServices.Install(String database, String dbFileName, String connectionString) +25
System.Web.DataAccess.SqlConnectionHelper.CreateMdfFile(String fullFileName, String dataDir, String connectionString) +397

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. You can also remove the User Instance attribute from your connection string if you do not need it. To learn more about the User Instance, take a look at:

http://msdn2.microsoft.com/en-us/library/ms143684.aspx

And here is a link for SqlConnection.ConnecitonString:

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

login and password administration

Using SS2000. I have two questions. How do adminsremember passwords for
logins. We have several web sites each with its own login and password. I
thought about creating a table somewhere and storing the login, password and
purpose of the login but that doesn't seem so secure.
Second question - I have a login/user who I want to remove. The user owns a
table in a database. I tried changing the owner of the table to 'sa' using
"EXEC sp_changeobjectowner 'tblSVM', 'sa'" but I received this error:
Server: Msg 15001, Level 16, State 1, Procedure sp_changeobjectowner, Line 38
Object 'tblSVM' does not exist or is not a valid object for this operation.
How do I get rid of the login/user?
Thanks,
Dan D.
Hi,
Answer to your seconds question.
Make the owner of the object to DBO and drop the user and then remove the
login. While changing the object you have to give TABLE_OWNER.TABLE_NAME..
EXEC sp_changeobjectowner 'current_table_owner.tblSVM', 'dbo'
After that drop the user
sp_dropuser <user_name>
Drop the login
sp_droplogin <login_name>
Thanks
Hari
MCDBA
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:652F288B-24C3-4D9F-A616-8EA1A6840F46@.microsoft.com...
> Using SS2000. I have two questions. How do adminsremember passwords for
> logins. We have several web sites each with its own login and password. I
> thought about creating a table somewhere and storing the login, password
and
> purpose of the login but that doesn't seem so secure.
> Second question - I have a login/user who I want to remove. The user owns
a
> table in a database. I tried changing the owner of the table to 'sa' using
> "EXEC sp_changeobjectowner 'tblSVM', 'sa'" but I received this error:
> Server: Msg 15001, Level 16, State 1, Procedure sp_changeobjectowner, Line
38
> Object 'tblSVM' does not exist or is not a valid object for this
operation.
> How do I get rid of the login/user?
> Thanks,
> --
> Dan D.
|||After adding the current owner of the object, now I get this error message:
Server: Msg 15410, Level 11, State 1, Procedure sp_changeobjectowner, Line 55
User or role 'sa' does not exist in this database.
If I try to add 'sa' as a user in the database I get this message:
Cannot user the reserved user or role name 'sa'.
I was able to change the owner to another user but why did I have a problem
with changing it to 'sa'?
Thanks,
"Hari Prasad" wrote:

> Hi,
> Answer to your seconds question.
> Make the owner of the object to DBO and drop the user and then remove the
> login. While changing the object you have to give TABLE_OWNER.TABLE_NAME..
> EXEC sp_changeobjectowner 'current_table_owner.tblSVM', 'dbo'
> After that drop the user
> sp_dropuser <user_name>
> Drop the login
> sp_droplogin <login_name>
> Thanks
> Hari
> MCDBA
>
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:652F288B-24C3-4D9F-A616-8EA1A6840F46@.microsoft.com...
> and
> a
> 38
> operation.
>
>
|||You need to use the database user name, not the login name.
Mark.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Dan D. wrote:[vbcol=seagreen]
> After adding the current owner of the object, now I get this error message:
> Server: Msg 15410, Level 11, State 1, Procedure sp_changeobjectowner, Line 55
> User or role 'sa' does not exist in this database.
> If I try to add 'sa' as a user in the database I get this message:
> Cannot user the reserved user or role name 'sa'.
> I was able to change the owner to another user but why did I have a problem
> with changing it to 'sa'?
> Thanks,
> "Hari Prasad" wrote:
>
|||Dan,
Q1. Why not put them in a SQL Server database? You can restrict access
to the data in here easily. What are your security concerns?
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Dan D. wrote:
> Using SS2000. I have two questions. How do adminsremember passwords for
> logins. We have several web sites each with its own login and password. I
> thought about creating a table somewhere and storing the login, password and
> purpose of the login but that doesn't seem so secure.
> Second question - I have a login/user who I want to remove. The user owns a
> table in a database. I tried changing the owner of the table to 'sa' using
> "EXEC sp_changeobjectowner 'tblSVM', 'sa'" but I received this error:
> Server: Msg 15001, Level 16, State 1, Procedure sp_changeobjectowner, Line 38
> Object 'tblSVM' does not exist or is not a valid object for this operation.
> How do I get rid of the login/user?
> Thanks,
|||Dan
In response to your first question. What we do in the team I work in, is
keep all our 'secure' passwords in a password protected Excel spreadsheet. Of
course you still need to know/remember the password for the excel sheet.
Regards
John
"Dan D." wrote:
[vbcol=seagreen]
> After adding the current owner of the object, now I get this error message:
> Server: Msg 15410, Level 11, State 1, Procedure sp_changeobjectowner, Line 55
> User or role 'sa' does not exist in this database.
> If I try to add 'sa' as a user in the database I get this message:
> Cannot user the reserved user or role name 'sa'.
> I was able to change the owner to another user but why did I have a problem
> with changing it to 'sa'?
> Thanks,
> "Hari Prasad" wrote:
|||Well, at least that's only one password instead of many. Thanks for the
suggestion.
"John Bandettini" wrote:
[vbcol=seagreen]
> Dan
> In response to your first question. What we do in the team I work in, is
> keep all our 'secure' passwords in a password protected Excel spreadsheet. Of
> course you still need to know/remember the password for the excel sheet.
> Regards
> John
> "Dan D." wrote:
|||Just the normal concerns that someone from outside could get access to them.
However, none of the logins I'm talking about would have any kind of system
permissions.
"Mark Allison" wrote:

> Dan,
> Q1. Why not put them in a SQL Server database? You can restrict access
> to the data in here easily. What are your security concerns?
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> Dan D. wrote:
>
|||I'm not sure I know what you mean. I tried to create a user called 'sauser'
in the database using the 'sa' login and I got an error. I'm sure I've seen
'sa' as a user in a database before. How did it get there if I can't add it
as a user?
Thanks,
"Mark Allison" wrote:

> You need to use the database user name, not the login name.
> Mark.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> Dan D. wrote:
>

login and password administration

Using SS2000. I have two questions. How do adminsremember passwords for
logins. We have several web sites each with its own login and password. I
thought about creating a table somewhere and storing the login, password and
purpose of the login but that doesn't seem so secure.
Second question - I have a login/user who I want to remove. The user owns a
table in a database. I tried changing the owner of the table to 'sa' using
"EXEC sp_changeobjectowner 'tblSVM', 'sa'" but I received this error:
Server: Msg 15001, Level 16, State 1, Procedure sp_changeobjectowner, Line 38
Object 'tblSVM' does not exist or is not a valid object for this operation.
How do I get rid of the login/user?
Thanks,
--
Dan D.Hi,
Answer to your seconds question.
Make the owner of the object to DBO and drop the user and then remove the
login. While changing the object you have to give TABLE_OWNER.TABLE_NAME..
EXEC sp_changeobjectowner 'current_table_owner.tblSVM', 'dbo'
After that drop the user
sp_dropuser <user_name>
Drop the login
sp_droplogin <login_name>
Thanks
Hari
MCDBA
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:652F288B-24C3-4D9F-A616-8EA1A6840F46@.microsoft.com...
> Using SS2000. I have two questions. How do adminsremember passwords for
> logins. We have several web sites each with its own login and password. I
> thought about creating a table somewhere and storing the login, password
and
> purpose of the login but that doesn't seem so secure.
> Second question - I have a login/user who I want to remove. The user owns
a
> table in a database. I tried changing the owner of the table to 'sa' using
> "EXEC sp_changeobjectowner 'tblSVM', 'sa'" but I received this error:
> Server: Msg 15001, Level 16, State 1, Procedure sp_changeobjectowner, Line
38
> Object 'tblSVM' does not exist or is not a valid object for this
operation.
> How do I get rid of the login/user?
> Thanks,
> --
> Dan D.|||After adding the current owner of the object, now I get this error message:
Server: Msg 15410, Level 11, State 1, Procedure sp_changeobjectowner, Line 55
User or role 'sa' does not exist in this database.
If I try to add 'sa' as a user in the database I get this message:
Cannot user the reserved user or role name 'sa'.
I was able to change the owner to another user but why did I have a problem
with changing it to 'sa'?
Thanks,
"Hari Prasad" wrote:
> Hi,
> Answer to your seconds question.
> Make the owner of the object to DBO and drop the user and then remove the
> login. While changing the object you have to give TABLE_OWNER.TABLE_NAME..
> EXEC sp_changeobjectowner 'current_table_owner.tblSVM', 'dbo'
> After that drop the user
> sp_dropuser <user_name>
> Drop the login
> sp_droplogin <login_name>
> Thanks
> Hari
> MCDBA
>
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:652F288B-24C3-4D9F-A616-8EA1A6840F46@.microsoft.com...
> > Using SS2000. I have two questions. How do adminsremember passwords for
> > logins. We have several web sites each with its own login and password. I
> > thought about creating a table somewhere and storing the login, password
> and
> > purpose of the login but that doesn't seem so secure.
> >
> > Second question - I have a login/user who I want to remove. The user owns
> a
> > table in a database. I tried changing the owner of the table to 'sa' using
> > "EXEC sp_changeobjectowner 'tblSVM', 'sa'" but I received this error:
> > Server: Msg 15001, Level 16, State 1, Procedure sp_changeobjectowner, Line
> 38
> > Object 'tblSVM' does not exist or is not a valid object for this
> operation.
> >
> > How do I get rid of the login/user?
> >
> > Thanks,
> > --
> > Dan D.
>
>|||You need to use the database user name, not the login name.
Mark.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Dan D. wrote:
> After adding the current owner of the object, now I get this error message:
> Server: Msg 15410, Level 11, State 1, Procedure sp_changeobjectowner, Line 55
> User or role 'sa' does not exist in this database.
> If I try to add 'sa' as a user in the database I get this message:
> Cannot user the reserved user or role name 'sa'.
> I was able to change the owner to another user but why did I have a problem
> with changing it to 'sa'?
> Thanks,
> "Hari Prasad" wrote:
>
>>Hi,
>>Answer to your seconds question.
>>Make the owner of the object to DBO and drop the user and then remove the
>>login. While changing the object you have to give TABLE_OWNER.TABLE_NAME..
>>EXEC sp_changeobjectowner 'current_table_owner.tblSVM', 'dbo'
>>After that drop the user
>>sp_dropuser <user_name>
>>Drop the login
>>sp_droplogin <login_name>
>>Thanks
>>Hari
>>MCDBA
>>
>>"Dan D." <DanD@.discussions.microsoft.com> wrote in message
>>news:652F288B-24C3-4D9F-A616-8EA1A6840F46@.microsoft.com...
>>Using SS2000. I have two questions. How do adminsremember passwords for
>>logins. We have several web sites each with its own login and password. I
>>thought about creating a table somewhere and storing the login, password
>>and
>>purpose of the login but that doesn't seem so secure.
>>Second question - I have a login/user who I want to remove. The user owns
>>a
>>table in a database. I tried changing the owner of the table to 'sa' using
>>"EXEC sp_changeobjectowner 'tblSVM', 'sa'" but I received this error:
>>Server: Msg 15001, Level 16, State 1, Procedure sp_changeobjectowner, Line
>>38
>>Object 'tblSVM' does not exist or is not a valid object for this
>>operation.
>>How do I get rid of the login/user?
>>Thanks,
>>--
>>Dan D.
>>|||Dan,
Q1. Why not put them in a SQL Server database? You can restrict access
to the data in here easily. What are your security concerns?
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Dan D. wrote:
> Using SS2000. I have two questions. How do adminsremember passwords for
> logins. We have several web sites each with its own login and password. I
> thought about creating a table somewhere and storing the login, password and
> purpose of the login but that doesn't seem so secure.
> Second question - I have a login/user who I want to remove. The user owns a
> table in a database. I tried changing the owner of the table to 'sa' using
> "EXEC sp_changeobjectowner 'tblSVM', 'sa'" but I received this error:
> Server: Msg 15001, Level 16, State 1, Procedure sp_changeobjectowner, Line 38
> Object 'tblSVM' does not exist or is not a valid object for this operation.
> How do I get rid of the login/user?
> Thanks,

login and password administration

Using SS2000. I have two questions. How do adminsremember passwords for
logins. We have several web sites each with its own login and password. I
thought about creating a table somewhere and storing the login, password and
purpose of the login but that doesn't seem so secure.
Second question - I have a login/user who I want to remove. The user owns a
table in a database. I tried changing the owner of the table to 'sa' using
"EXEC sp_changeobjectowner 'tblSVM', 'sa'" but I received this error:
Server: Msg 15001, Level 16, State 1, Procedure sp_changeobjectowner, Line 3
8
Object 'tblSVM' does not exist or is not a valid object for this operation.
How do I get rid of the login/user?
Thanks,
--
Dan D.Hi,
Answer to your seconds question.
Make the owner of the object to DBO and drop the user and then remove the
login. While changing the object you have to give TABLE_OWNER.TABLE_NAME..
EXEC sp_changeobjectowner 'current_table_owner.tblSVM', 'dbo'
After that drop the user
sp_dropuser <user_name>
Drop the login
sp_droplogin <login_name>
Thanks
Hari
MCDBA
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:652F288B-24C3-4D9F-A616-8EA1A6840F46@.microsoft.com...
> Using SS2000. I have two questions. How do adminsremember passwords for
> logins. We have several web sites each with its own login and password. I
> thought about creating a table somewhere and storing the login, password
and
> purpose of the login but that doesn't seem so secure.
> Second question - I have a login/user who I want to remove. The user owns
a
> table in a database. I tried changing the owner of the table to 'sa' using
> "EXEC sp_changeobjectowner 'tblSVM', 'sa'" but I received this error:
> Server: Msg 15001, Level 16, State 1, Procedure sp_changeobjectowner, Line
38
> Object 'tblSVM' does not exist or is not a valid object for this
operation.
> How do I get rid of the login/user?
> Thanks,
> --
> Dan D.|||After adding the current owner of the object, now I get this error message:
Server: Msg 15410, Level 11, State 1, Procedure sp_changeobjectowner, Line 5
5
User or role 'sa' does not exist in this database.
If I try to add 'sa' as a user in the database I get this message:
Cannot user the reserved user or role name 'sa'.
I was able to change the owner to another user but why did I have a problem
with changing it to 'sa'?
Thanks,
"Hari Prasad" wrote:

> Hi,
> Answer to your seconds question.
> Make the owner of the object to DBO and drop the user and then remove the
> login. While changing the object you have to give TABLE_OWNER.TABLE_NAME..
> EXEC sp_changeobjectowner 'current_table_owner.tblSVM', 'dbo'
> After that drop the user
> sp_dropuser <user_name>
> Drop the login
> sp_droplogin <login_name>
> Thanks
> Hari
> MCDBA
>
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:652F288B-24C3-4D9F-A616-8EA1A6840F46@.microsoft.com...
> and
> a
> 38
> operation.
>
>|||You need to use the database user name, not the login name.
Mark.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Dan D. wrote:[vbcol=seagreen]
> After adding the current owner of the object, now I get this error message
:
> Server: Msg 15410, Level 11, State 1, Procedure sp_changeobjectowner, Line
55
> User or role 'sa' does not exist in this database.
> If I try to add 'sa' as a user in the database I get this message:
> Cannot user the reserved user or role name 'sa'.
> I was able to change the owner to another user but why did I have a proble
m
> with changing it to 'sa'?
> Thanks,
> "Hari Prasad" wrote:
>|||Dan,
Q1. Why not put them in a SQL Server database? You can restrict access
to the data in here easily. What are your security concerns?
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Dan D. wrote:
> Using SS2000. I have two questions. How do adminsremember passwords for
> logins. We have several web sites each with its own login and password. I
> thought about creating a table somewhere and storing the login, password a
nd
> purpose of the login but that doesn't seem so secure.
> Second question - I have a login/user who I want to remove. The user owns
a
> table in a database. I tried changing the owner of the table to 'sa' using
> "EXEC sp_changeobjectowner 'tblSVM', 'sa'" but I received this error:
> Server: Msg 15001, Level 16, State 1, Procedure sp_changeobjectowner, Line
38
> Object 'tblSVM' does not exist or is not a valid object for this operation
.
> How do I get rid of the login/user?
> Thanks,|||Dan
In response to your first question. What we do in the team I work in, is
keep all our 'secure' passwords in a password protected Excel spreadsheet. O
f
course you still need to know/remember the password for the excel sheet.
Regards
John
"Dan D." wrote:
[vbcol=seagreen]
> After adding the current owner of the object, now I get this error message
:
> Server: Msg 15410, Level 11, State 1, Procedure sp_changeobjectowner, Line
55
> User or role 'sa' does not exist in this database.
> If I try to add 'sa' as a user in the database I get this message:
> Cannot user the reserved user or role name 'sa'.
> I was able to change the owner to another user but why did I have a proble
m
> with changing it to 'sa'?
> Thanks,
> "Hari Prasad" wrote:
>|||Well, at least that's only one password instead of many. Thanks for the
suggestion.
"John Bandettini" wrote:
[vbcol=seagreen]
> Dan
> In response to your first question. What we do in the team I work in, is
> keep all our 'secure' passwords in a password protected Excel spreadsheet.
Of
> course you still need to know/remember the password for the excel sheet.
> Regards
> John
> "Dan D." wrote:
>|||Just the normal concerns that someone from outside could get access to them.
However, none of the logins I'm talking about would have any kind of system
permissions.
"Mark Allison" wrote:

> Dan,
> Q1. Why not put them in a SQL Server database? You can restrict access
> to the data in here easily. What are your security concerns?
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> Dan D. wrote:
>|||I'm not sure I know what you mean. I tried to create a user called 'sauser'
in the database using the 'sa' login and I got an error. I'm sure I've seen
'sa' as a user in a database before. How did it get there if I can't add it
as a user?
Thanks,
"Mark Allison" wrote:

> You need to use the database user name, not the login name.
> Mark.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> Dan D. wrote:
>