Showing posts with label text. Show all posts
Showing posts with label text. Show all posts

Monday, March 26, 2012

New SQLConnection w/ user specifics......

This actually goes back to another post...I need the user to state which specifics to use when connecting to a server. I have text boxes set up and I need to have thier input placed into the New SqlConnection statement. I have used the below which did not work...

'dim connorthwind as New SQLConnection ("Server=" & strservername & ";UID=" & strUsername & ";PWD=" & strPassword & ";database=master")

See below for my code:

<%@. Page %>
<%@. import Namespace="System.Data.SqlClient" %>
<%@. import Namespace="System.Data" %>
<script runat="server">

Sub Button_Click( s As Object, e As EventArgs )
dim conNorthwind as New SqlConnection( "Server=dbtest1;UID=cbtest;PWD=password3;database=master" )

Dim strInsert As String
Dim cmdInsert As SqlCommand

cmdInsert = New SqlCommand( "sp_password_sec", conNorthwind )
cmdInsert.CommandType = CommandType.StoredProcedure
'cmdINsert.Parameters.Add( "@.loginname", txtname.text )
cmdINsert.Parameters.Add( "@.oldpwd", Password.text )
cmdINsert.Parameters.Add( "@.newpwd", txtnew.text )
conNorthwind.Open()
cmdInsert.ExecuteNonQuery()
conNorthwind.Close()
End Sub

</script>
<html>
<head>
</head>
<body>
<form runat="Server">
<h2>Password Change
</h2>
<b>User Name</b>
<br />
<asp:TextBox id="username" Runat="Server"></asp:TextBox>
<p>
<b>Server Name</b>
<br />
<asp:TextBox id="Servername" Runat="Server"></asp:TextBox>
</p>
<p>
<b>Database </b>
<br />
<asp:TextBox id="txtdatabase" Runat="Server"></asp:TextBox>
</p>
<p>
<b>Old Pass</b>
<br />
<asp:TextBox id="Password" Runat="Server"></asp:TextBox>
</p>
<p>
<b>New Pass</b>
<br />
<asp:TextBox id="txtnew" Runat="Server"></asp:TextBox>
</p>
<p>
<asp:Button id="Button1" onclick="Button_Click" Runat="Server" Text="Lookup!"></asp:Button>
</p>
</form>
</body>
</html>

What didn't work? Did you get an error?

Also, this way of connecting is quite unusual, it is a better practice to use the same connection string for everyone for a variety of reasons (eg, to use connection pooling & to maintain the proper security)

|||

...I don't think it would be possible for everyone to use the same connection if they are resetting their own pw. If they log on using a functional acct or system acct, it will not allow them to change b/c they are not logged in using their own acct...

|||

cbaxter82:

if they are resetting their own pw

What pwd are they changing? If they change their windows pwd or their application pwd it has nothing to do with a sql connection. You should not be adding users to SQL Server, that's a major headache when users come and go and it is a major security breach, too (once a user has a SQL login, they can log in via Excel if they're smart enough! You need to control access to the databse).

Wednesday, March 7, 2012

New installation - Catalog does not get popuated

I am tearing my hair out here!
I have set up a full text catlog on an SQL 2000 Server ( Microsoft SQL
Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 ), and everything
seemed to go fine until I tried to populate it. It seems to get stuck in
populate mode, and the only errors that I can see are in the event log as
below.
I have looked at various postings on the subject, and the only one that I
can see is relevant is the one about SQL server running under a different
account to the LocalSystem, which it was. I corrected this via Enterprise
manager, re-started SQL Server, then re-started Microsoft Search/Full-text
Search, but still it does not populate!
The event log errors are:
One or more warnings or errors for Gatherer project <SQLServer
SQL0001800005> were logged to file <C:\Program Files\Microsoft SQL
Server\MSSQL\FTData\SQLServer\GatherLogs\SQL000180 0005.1.gthr>. If you are
interested in these messages, please, look at the file using the gatherer log
query object (gthrlog.vbs, log viewer web page).
Followed by:
The crawl seed <MSSQL75://SQLServer/64d0200a> in project <SQLServer
SQL0001800005> cannot be accessed. Error: 800700e9 - No process is on the
other end of the pipe. .
Any ideas?
Cheers, Mike.
SQL FTS uses named pipes to communicate with MSSearch.
The error message you are getting is most often related to security, such as
changing the SQL Server service account through control panel rather than
Enterprise Manager.
Can you confirm, that 1) a stopping and starting of MSSearch, SQL Server,
and even a reboot does not solve this problem. I can be resource related. 2)
secondly verify that the BuiltIn Administrators group is in your security
folder and is a system administrator.
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
"Mike Owen" <MikeOwen@.discussions.microsoft.com> wrote in message
news:F1FF6F58-C7D3-4DC8-913B-9EB244CE6B5F@.microsoft.com...
> I am tearing my hair out here!
> I have set up a full text catlog on an SQL 2000 Server ( Microsoft SQL
> Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 ), and
everything
> seemed to go fine until I tried to populate it. It seems to get stuck in
> populate mode, and the only errors that I can see are in the event log as
> below.
> I have looked at various postings on the subject, and the only one that I
> can see is relevant is the one about SQL server running under a different
> account to the LocalSystem, which it was. I corrected this via Enterprise
> manager, re-started SQL Server, then re-started Microsoft Search/Full-text
> Search, but still it does not populate!
> The event log errors are:
> One or more warnings or errors for Gatherer project <SQLServer
> SQL0001800005> were logged to file <C:\Program Files\Microsoft SQL
> Server\MSSQL\FTData\SQLServer\GatherLogs\SQL000180 0005.1.gthr>. If you are
> interested in these messages, please, look at the file using the gatherer
log
> query object (gthrlog.vbs, log viewer web page).
> Followed by:
> The crawl seed <MSSQL75://SQLServer/64d0200a> in project <SQLServer
> SQL0001800005> cannot be accessed. Error: 800700e9 - No process is on the
> other end of the pipe. .
> Any ideas?
>
> Cheers, Mike.
|||Mike,
Yes, I have an idea and thank you for providing the version (@.@.select) and
eventlog error as they are both very helpful info in troubleshooting SQL FTS
issues!
The primary error is "800700e9 - No process is on the other end of the
pipe.". This error is often caused by removing or altering the SQL Server
login BUILTIN\Administrators and it most likely is the source of this
problem for you. This most likely is the source of the failure for FT
Populations as the MSSearch service needs this login to log into SQL Server
and you can either add back this login with the original permissions
(default master db, sysadmin privileges or see KB article:
263712 (Q263712) INF: How to Impede Windows NT Administrators from
Administering a Clustered SQL Server at:
http://support.microsoft.com/default...B;EN-US;263712
If you cannot add back the SQL Server login BUILTIN\Administrators login,
you can use the following SQL code as a substitute:
exec sp_grantlogin N'NT Authority\System'
exec sp_defaultdb N'NT Authority\System', N'master'
exec sp_defaultlanguage N'NT Authority\System','us_english'
exec sp_addsrvrolemember N'NT Authority\System', sysadmin
Regards,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"Mike Owen" <MikeOwen@.discussions.microsoft.com> wrote in message
news:F1FF6F58-C7D3-4DC8-913B-9EB244CE6B5F@.microsoft.com...
> I am tearing my hair out here!
> I have set up a full text catlog on an SQL 2000 Server ( Microsoft SQL
> Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 ), and
everything
> seemed to go fine until I tried to populate it. It seems to get stuck in
> populate mode, and the only errors that I can see are in the event log as
> below.
> I have looked at various postings on the subject, and the only one that I
> can see is relevant is the one about SQL server running under a different
> account to the LocalSystem, which it was. I corrected this via Enterprise
> manager, re-started SQL Server, then re-started Microsoft Search/Full-text
> Search, but still it does not populate!
> The event log errors are:
> One or more warnings or errors for Gatherer project <SQLServer
> SQL0001800005> were logged to file <C:\Program Files\Microsoft SQL
> Server\MSSQL\FTData\SQLServer\GatherLogs\SQL000180 0005.1.gthr>. If you are
> interested in these messages, please, look at the file using the gatherer
log
> query object (gthrlog.vbs, log viewer web page).
> Followed by:
> The crawl seed <MSSQL75://SQLServer/64d0200a> in project <SQLServer
> SQL0001800005> cannot be accessed. Error: 800700e9 - No process is on the
> other end of the pipe. .
> Any ideas?
>
> Cheers, Mike.
|||Thanks Hilary, I had previously checked to see what permissions the
BUILTIN\Administrators user(s) had on all the DB's, which was db_owner, but I
didn't check it's 'Server Roles' - It had no server roles, and as soon as I
gave it System Administrators Role eveything started working!
Thanks for your help, Mike.
"Hilary Cotter" wrote:

> SQL FTS uses named pipes to communicate with MSSearch.
> The error message you are getting is most often related to security, such as
> changing the SQL Server service account through control panel rather than
> Enterprise Manager.
> Can you confirm, that 1) a stopping and starting of MSSearch, SQL Server,
> and even a reboot does not solve this problem. I can be resource related. 2)
> secondly verify that the BuiltIn Administrators group is in your security
> folder and is a system administrator.
> --
> 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
> "Mike Owen" <MikeOwen@.discussions.microsoft.com> wrote in message
> news:F1FF6F58-C7D3-4DC8-913B-9EB244CE6B5F@.microsoft.com...
> everything
> log
>
>
|||Thanks for replying John.
I worked through Hilary's answer first (as it was posted first), which I
think was similar to yours, and added BUILTIN\Administrators to the 'System
Administrators' Role, and it all started working.
Cheers, Mike.
"John Kane" wrote:

> Mike,
> Yes, I have an idea and thank you for providing the version (@.@.select) and
> eventlog error as they are both very helpful info in troubleshooting SQL FTS
> issues!
> The primary error is "800700e9 - No process is on the other end of the
> pipe.". This error is often caused by removing or altering the SQL Server
> login BUILTIN\Administrators and it most likely is the source of this
> problem for you. This most likely is the source of the failure for FT
> Populations as the MSSearch service needs this login to log into SQL Server
> and you can either add back this login with the original permissions
> (default master db, sysadmin privileges or see KB article:
> 263712 (Q263712) INF: How to Impede Windows NT Administrators from
> Administering a Clustered SQL Server at:
> http://support.microsoft.com/default...B;EN-US;263712
> If you cannot add back the SQL Server login BUILTIN\Administrators login,
> you can use the following SQL code as a substitute:
> exec sp_grantlogin N'NT Authority\System'
> exec sp_defaultdb N'NT Authority\System', N'master'
> exec sp_defaultlanguage N'NT Authority\System','us_english'
> exec sp_addsrvrolemember N'NT Authority\System', sysadmin
> Regards,
> John
> --
> SQL Full Text Search Blog
> http://spaces.msn.com/members/jtkane/
>
> "Mike Owen" <MikeOwen@.discussions.microsoft.com> wrote in message
> news:F1FF6F58-C7D3-4DC8-913B-9EB244CE6B5F@.microsoft.com...
> everything
> log
>
>

New install of Windows 2003 EE sp1 and Sql Server 2000 sp3 full text problem

I have a newly installed Windows 2003 EE sp1 with Sql Server 2000 sp3
machine. I restored a database to the machine that had several full text
catalogs in it. I'm trying to go in and do a rebuild on the catalogs. When
I do this.. I get the error:
Error 7635: The Microsoft Search service cannot be administered under the
present user account.
The Sql Server Agent is being started with the system account.
I've tried this on a windows 2003 sp1 standardard machine with sql 2000 sp3.
I get the same error. It's making me belive that perhaps sp1 put some
security on that needs to be changed...
can someone help me get Full Text going agian.
Thanks
Shannon
Shannon,
Have you or anyone else removed or altered the login BUILTIN\Administrators
? If so, can you either re-establish it or reset the defaults back to master
database with sysadmin rights? If not (for security reasons), you may want
to implement the following T-SQL code as the external MSSearch service
(should be running under the system account) needs sysadmin rights when
accessing SQL Server:
exec sp_grantlogin N'NT Authority\System'
exec sp_defaultdb N'NT Authority\System', N'master'
exec sp_defaultlanguage N'NT Authority\System','us_english'
exec sp_addsrvrolemember N'NT Authority\System', sysadmin
Thanks,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"Shannon Ramirez" <dba@.prairieinet.net> wrote in message
news:u6kXJPaUFHA.1200@.TK2MSFTNGP10.phx.gbl...
> I have a newly installed Windows 2003 EE sp1 with Sql Server 2000 sp3
> machine. I restored a database to the machine that had several full text
> catalogs in it. I'm trying to go in and do a rebuild on the catalogs.
When
> I do this.. I get the error:
> Error 7635: The Microsoft Search service cannot be administered under the
> present user account.
> The Sql Server Agent is being started with the system account.
>
> I've tried this on a windows 2003 sp1 standardard machine with sql 2000
sp3.
> I get the same error. It's making me belive that perhaps sp1 put some
> security on that needs to be changed...
> can someone help me get Full Text going agian.
> Thanks
> Shannon
>
|||no.. i'm the database guy and I didn't alter it.
I've just doubled checked.. default db is master and it belongs to the
sysadmin role.
anything else you can think of that I shoudl check
"John Kane" <jt-kane@.comcast.net> wrote in message
news:O%23QYzjaUFHA.3176@.TK2MSFTNGP12.phx.gbl...
> Shannon,
> Have you or anyone else removed or altered the login
> BUILTIN\Administrators
> ? If so, can you either re-establish it or reset the defaults back to
> master
> database with sysadmin rights? If not (for security reasons), you may want
> to implement the following T-SQL code as the external MSSearch service
> (should be running under the system account) needs sysadmin rights when
> accessing SQL Server:
> exec sp_grantlogin N'NT Authority\System'
> exec sp_defaultdb N'NT Authority\System', N'master'
> exec sp_defaultlanguage N'NT Authority\System','us_english'
> exec sp_addsrvrolemember N'NT Authority\System', sysadmin
> Thanks,
> John
> --
> SQL Full Text Search Blog
> http://spaces.msn.com/members/jtkane/
>
> "Shannon Ramirez" <dba@.prairieinet.net> wrote in message
> news:u6kXJPaUFHA.1200@.TK2MSFTNGP10.phx.gbl...
> When
> sp3.
>
|||Shannon,
You should also confirm if the startup account for the SQL Server service
(MSSQLServer) has been altered via Win2K's Component applet vs. being
altered via SQL Server Enterprise manager. The later is the only place where
if one server is altered then both services security context is altered. See
the following two KB articles for more info:
317746 (Q317746) PRB: SQL Server Full-Text Search Does Not Populate Catalogs
http://support.microsoft.com/default...b;en-us;317746
277549 (Q277549) PRB: Unable to Build Full-Text Catalog After You Modify
MSSQLServer Logon Account Through [NT4.0) Control Panel [or Win2K Component
Services]
http://support.microsoft.com/default...B;EN-US;277549
Hope this helps!
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"Shannon Ramirez" <dba@.prairieinet.net> wrote in message
news:u1WLC9aUFHA.2096@.TK2MSFTNGP14.phx.gbl...[vbcol=seagreen]
> no.. i'm the database guy and I didn't alter it.
> I've just doubled checked.. default db is master and it belongs to the
> sysadmin role.
> anything else you can think of that I shoudl check
> "John Kane" <jt-kane@.comcast.net> wrote in message
> news:O%23QYzjaUFHA.3176@.TK2MSFTNGP12.phx.gbl...
want[vbcol=seagreen]
text
>
|||thanks for the response.. I have checked and the accounts are as they should
be. this is already a production box so stopping and restarting the sql
service is not an option right now..
hope someone else has run into this and can help me out.
thanks
shannon
"John Kane" <jt-kane@.comcast.net> wrote in message
news:ex%23hQHbUFHA.3188@.TK2MSFTNGP09.phx.gbl...
> Shannon,
> You should also confirm if the startup account for the SQL Server service
> (MSSQLServer) has been altered via Win2K's Component applet vs. being
> altered via SQL Server Enterprise manager. The later is the only place
> where
> if one server is altered then both services security context is altered.
> See
> the following two KB articles for more info:
> 317746 (Q317746) PRB: SQL Server Full-Text Search Does Not Populate
> Catalogs
> http://support.microsoft.com/default...b;en-us;317746
> 277549 (Q277549) PRB: Unable to Build Full-Text Catalog After You Modify
> MSSQLServer Logon Account Through [NT4.0) Control Panel [or Win2K
> Component
> Services]
> http://support.microsoft.com/default...B;EN-US;277549
>
> Hope this helps!
> John
> --
> SQL Full Text Search Blog
> http://spaces.msn.com/members/jtkane/
>
> "Shannon Ramirez" <dba@.prairieinet.net> wrote in message
> news:u1WLC9aUFHA.2096@.TK2MSFTNGP14.phx.gbl...
> want
> text
>
|||I tried dropping the built in administrator sql account... then added it
back in along with the nt Authority\System account. On one of the windows
2003 sp1 sql 2000 sp3 boxes that fixed the problem. on the windows 2003 sp1
sql 2000 sp3 box.. it didn't. i'll restart teh sql service on Sunday and
see if that doesn't fix it.. sure hope so..
"Shannon Ramirez" <dba@.prairieinet.net> wrote in message
news:ePVuHUdUFHA.1384@.TK2MSFTNGP09.phx.gbl...
> thanks for the response.. I have checked and the accounts are as they
> should be. this is already a production box so stopping and restarting
> the sql service is not an option right now..
> hope someone else has run into this and can help me out.
> thanks
> shannon
> "John Kane" <jt-kane@.comcast.net> wrote in message
> news:ex%23hQHbUFHA.3188@.TK2MSFTNGP09.phx.gbl...
>