Tuesday, March 20, 2012
Change database name
-PatP|||The set up Profiler to track this kind of change and fire someone the next time it happens.|||While firing them is rather gratifying, it really isn't a solution to the underlying problem. You really need something a bit more subtle, and lethal.
-PatP|||Oh, the way I would fire them would cover that also. :)|||Oh, I see! I'd never thought of it quite that way. Very nice!
-PatP|||Hi, you are all expert, i really don't know how to track this kind of change and fire someone? Can you give me more detail. Thanks in advance.|||We (or at least I) were making jokes about firing someone.
As far as how to track this kind of change, I'd use SQL Profiler (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_mon_perf_86ib.asp) to "watch" all of the commands being submitted to the SQL Server. The commands that you need to watch are sp_dboption (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_da-di_8c32.asp), which is used to set a database to single user mode, and ALTER DATABASE (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_aa-az_4e5h.asp) which can do it too.
-PatP|||and some help on firing someone...
http://www.integctr.com/News/EarlierNews7215.asp
http://techrepublic.com.com/5100-6314_11-5172071.html
http://www.bnet.com/abstract.aspx?&scid=1554&docid=49822
and finally...
http://www.nrahq.org/education/guide.asp|||You can probably start by making a list (and checking it twice) of all people who can do such a thing. This includes all sysadmins, members of the db_owner role in the database, and unless you have removed the BUILTIN\ADMINISTRATORS login, anyone in the local NT administrators group on the SQL Server. If you are lucky, this is a short list. Maybe even short enough that you can visit each person and ask them (quietly, of course) if they knew anything about it.
If the list is long, then you can do one of two things. Wait for it to happen again, in order to confirm there is a real problem, or set up a machine that runs profiler all day and all night. Monitor any rpc or sql statement that includes "sp_dboption" or "alter database" in the text data. Be sure you capture the hostname and login name columns.
In rare cases, I think this can be caused by a wayward maintenance plan, but I only have old and anecdotal evidence of this. Still. It may be something worth checking on.|||Thank you all very much, i need to learn that, any question, i still will ask you
Thursday, February 16, 2012
Catching more then one Error
Hello all, not to sure if this can be done but I am attempting to catch a series of errors with in a single TRY CATCH statement.
For example, the following code triggers a single error ( which work fine)
SET NOCOUNT ON
declare @.errmsg nvarchar(4000)
begin try
select 0/0
end try
begin catch
SET @.errmsg = 'Msg ' +
cast(ERROR_NUMBER() as varchar(20)) + ', Level ' +
cast(ERROR_SEVERITY() as varchar(20)) + ', State ' +
cast(ERROR_STATE() as varchar(20)) + ', Line ' +
cast(ERROR_LINE() as varchar(20)) + ', ' + CHAR(13) + 'Procedure ' +
isnull(ERROR_PROCEDURE(),'') + CHAR(13) + isnull(ERROR_MESSAGE(),'')
end catch
select @.errmsg AS ERRMSG
RESULT:
Msg 8134, Level 16, State 1, Line 4, Procedure Divide by zero error encountered.
But when i execute the same TRY CATCH but use a backup routine that i purposly fail the query result shows the following ( which is what i want...)
Msg 4208, Level 16, State 0, Procedure usp_dbbackup2005_v1_5, Line 599
The statement BACKUP LOG is not allowed while the recovery model is SIMPLE. Use BACKUP DATABASE or change the recovery model using ALTER DATABASE.
Msg 3013, Level 16, State 1, Procedure usp_dbbackup2005_v1_5, Line 599
BACKUP LOG is terminating abnormally.
Instead i only get the last error in the series.
Msg 3013, Level 16, State 1, Procedure usp_dbbackup2005_v1_5, Line 599
BACKUP LOG is terminating abnormally.
Any Thoughts?
Thanks
Anybody have any thoughts on this? i can't see why i couldnt grab all the errors within a transaction.
Thanks
DM
|||With my understanding about Try..Catch block (any language); it always cath one exception object and transform the control to Catch block from the try block (even C#.NET or VB.NET does the same..); I dont think it is logically possible ..
Folks what about your opinion here..
|||You wont get the stack are any further executed command errors in the error functions.HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||Bummer, you would think you would be able to grab entire stack upon error. Obviously as far as a client is concerned the entire stack is pushed out.( which is what you would see if the statement was executed from a .net client or query analyzer.) so I guess that begs the question; how do you build a solid error handler if you are not provided all the tools to dissect the issue.
Thanks
DM
Tuesday, February 14, 2012
Catalog Population Fails on Cluster
SQL2000 has SP3 applied.
We created a new FTS against a single table, single row.
The table has 500,000 rows of data.
When I select "Start Full Population" the task completes immediately and the
count is one.
The edited text from the Application Log follows:
Event Type: Information
Event Source: Microsoft Search
Event Category: Gatherer
Event ID: 3019
Date: 12/14/2004
Time: 4:10:34 PM
User: N/A
Computer: NT-TWDB2
Description:
The crawl on project <SQLServer SQL0000500005> has started.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Event Type: Warning
Event Source: Microsoft Search
Event Category: Gatherer
Event ID: 3035
Date: 12/14/2004
Time: 4:10:35 PM
User: N/A
Computer: NT-TWDB2
Description:
One or more warnings or errors for Gatherer project <SQLServer
SQL0000500005> were logged to file <S:\Program Files\Microsoft SQL
Server\MSSQL\FTData\SQLServer\GatherLogs\SQL000050 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).
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Event Type: Warning
Event Source: Microsoft Search
Event Category: Gatherer
Event ID: 3036
Date: 12/14/2004
Time: 4:10:35 PM
User: N/A
Computer: NT-TWDB2
Description:
The crawl seed <MSSQL75://SQLServer/318258d2> in project <SQLServer
SQL0000500005> cannot be accessed. Error: 8007007f - The specified procedure
could not be found. .
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Event Type: Warning
Event Source: Microsoft Search
Event Category: Gatherer
Event ID: 3024
Date: 12/14/2004
Time: 4:10:35 PM
User: N/A
Computer: NT-TWDB2
Description:
The crawl for project <SQLServer SQL0000500005> could not be started,
because no crawl seeds could be accessed. Fix the errors and try the crawl
again.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Event Type: Information
Event Source: Microsoft Search
Event Category: Gatherer
Event ID: 3018
Date: 12/14/2004
Time: 4:10:36 PM
User: N/A
Computer: NT-TWDB2
Description:
The end of crawl for project <SQLServer SQL0000500005> has been detected.
The Gatherer successfully processed 0 documents totaling 0K. It failed to
filter 1 documents. 0 URLs could not be reached or were denied access.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
I followed the recommendations of
http://support.microsoft.com/default...;en-us;817301,
PRB: Microsoft Search Full-Text Catalog Population Fails When You Upgrade
SQL Server 2000 Failover Cluster to SQL Server 2000 Service Pack 3
I registered every dll in the Bin folder.
This did not help.
Where do I go from here?
Binder,
First of all, thank you for providing the "Microsoft Search" source events
from your server's Application event log as this is very helpful info in
troubleshooting this SQL FTS issue in a clustered environment!
The key error here is "Error: 8007007f - The specified procedure could not
be found." and the two following KB articles may be appropriate to this
problem, but the error reference in KB article Q304282 - "80070002 - The
system cannot find the file specified" is close, but not exactly the same
error (8007007f ). Reviewing past postings in this newsgroup, I found one
with your error and a past poster suggested this can be resolved via
re-running the SearchStp.exe program from SP3 file. Another suggestion was
to change the (fulltext) dependency to the SQL Agent - in a clean install -
this stops all errors from occurring. Below are the KB articles:
Q304282 PRB: Full Text Resource Fails to Come Online on a Cluster with
"Event ID 1069 :
SQL Cluster Resource 'Full Text' failed" Error Message
http://support.microsoft.com/default...304282&sd=tech
812666 How to recover a failed full-text search resource on a clustered
instance of SQL Server 2000
http://support.microsoft.com/default.aspx?kbid=812666
Hope this helps!
John
"Binder" <rgondzur@.NO_SPAM_aicsoft.com> wrote in message
news:uk6Hp734EHA.3908@.TK2MSFTNGP12.phx.gbl...
> I have an installation that move their database to a cluster server.
> SQL2000 has SP3 applied.
> We created a new FTS against a single table, single row.
> The table has 500,000 rows of data.
> When I select "Start Full Population" the task completes immediately and
the
> count is one.
> The edited text from the Application Log follows:
>
> Event Type: Information
> Event Source: Microsoft Search
> Event Category: Gatherer
> Event ID: 3019
> Date: 12/14/2004
> Time: 4:10:34 PM
> User: N/A
> Computer: NT-TWDB2
> Description:
> The crawl on project <SQLServer SQL0000500005> has started.
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.
> Event Type: Warning
> Event Source: Microsoft Search
> Event Category: Gatherer
> Event ID: 3035
> Date: 12/14/2004
> Time: 4:10:35 PM
> User: N/A
> Computer: NT-TWDB2
> Description:
> One or more warnings or errors for Gatherer project <SQLServer
> SQL0000500005> were logged to file <S:\Program Files\Microsoft SQL
> Server\MSSQL\FTData\SQLServer\GatherLogs\SQL000050 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).
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.
> Event Type: Warning
> Event Source: Microsoft Search
> Event Category: Gatherer
> Event ID: 3036
> Date: 12/14/2004
> Time: 4:10:35 PM
> User: N/A
> Computer: NT-TWDB2
> Description:
> The crawl seed <MSSQL75://SQLServer/318258d2> in project <SQLServer
> SQL0000500005> cannot be accessed. Error: 8007007f - The specified
procedure
> could not be found. .
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.
> Event Type: Warning
> Event Source: Microsoft Search
> Event Category: Gatherer
> Event ID: 3024
> Date: 12/14/2004
> Time: 4:10:35 PM
> User: N/A
> Computer: NT-TWDB2
> Description:
> The crawl for project <SQLServer SQL0000500005> could not be started,
> because no crawl seeds could be accessed. Fix the errors and try the crawl
> again.
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.
> Event Type: Information
> Event Source: Microsoft Search
> Event Category: Gatherer
> Event ID: 3018
> Date: 12/14/2004
> Time: 4:10:36 PM
> User: N/A
> Computer: NT-TWDB2
> Description:
> The end of crawl for project <SQLServer SQL0000500005> has been detected.
> The Gatherer successfully processed 0 documents totaling 0K. It failed to
> filter 1 documents. 0 URLs could not be reached or were denied access.
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.
>
> I followed the recommendations of
> http://support.microsoft.com/default...;en-us;817301,
> PRB: Microsoft Search Full-Text Catalog Population Fails When You Upgrade
> SQL Server 2000 Failover Cluster to SQL Server 2000 Service Pack 3
> I registered every dll in the Bin folder.
> This did not help.
> Where do I go from here?
>
>
|||John,
If the original database was backed up from another server then restored to
this cluster machine, is the FTData directory
copied from the original machine also? Does a restore affect the FTData
directory?
I believe they installed SQL to the cluster with FTS, then did a restore
from the other machine's backup.
Wouldn't the FTData folder be created when FTS was installed with the
initial SQL setup?
If this is the case, would the issues you reference concerning the FTData
folder and its files be a possible source of the problem?
Rg
"John Kane" <jt-kane@.comcast.net> wrote in message
news:ehECYk44EHA.1976@.TK2MSFTNGP09.phx.gbl...
> Binder,
> First of all, thank you for providing the "Microsoft Search" source events
> from your server's Application event log as this is very helpful info in
> troubleshooting this SQL FTS issue in a clustered environment!
> The key error here is "Error: 8007007f - The specified procedure could not
> be found." and the two following KB articles may be appropriate to this
> problem, but the error reference in KB article Q304282 - "80070002 - The
> system cannot find the file specified" is close, but not exactly the same
> error (8007007f ). Reviewing past postings in this newsgroup, I found one
> with your error and a past poster suggested this can be resolved via
> re-running the SearchStp.exe program from SP3 file. Another suggestion was
> to change the (fulltext) dependency to the SQL Agent - in a clean
install -[vbcol=seagreen]
> this stops all errors from occurring. Below are the KB articles:
> Q304282 PRB: Full Text Resource Fails to Come Online on a Cluster with
> "Event ID 1069 :
> SQL Cluster Resource 'Full Text' failed" Error Message
> http://support.microsoft.com/default...304282&sd=tech
> 812666 How to recover a failed full-text search resource on a clustered
> instance of SQL Server 2000
> http://support.microsoft.com/default.aspx?kbid=812666
> Hope this helps!
> John
>
>
> "Binder" <rgondzur@.NO_SPAM_aicsoft.com> wrote in message
> news:uk6Hp734EHA.3908@.TK2MSFTNGP12.phx.gbl...
> the
are[vbcol=seagreen]
gatherer[vbcol=seagreen]
> procedure
crawl[vbcol=seagreen]
detected.[vbcol=seagreen]
to[vbcol=seagreen]
Upgrade
>
|||Binder,
No, the FTData directory (and files under it) are not backed up with a
database backup for SQL Server 2000 and SQL Server 7.0, but this will be a
new feature in SQL Server 2005 (Yukon). However, the FTData directory is
installed by default by SQL 2000 Enterprise Edition, but not necessarily at
the same location as the original database, i.e.., different installation
paths.
If a restore was done to the same database, then an internal system table
(sysfulltextcatalogs) may not have the correct path (a value of null is
normal), as if the source server's location of the FT Catalog (may be
different from the FTData directory) is different from the destination
server's location of the FT Catalog then this may be the cause of the error.
Note, for clustered environments, the FT Catalog can only exist on the
shared drive and if the source server's drive letter for the FT Catalog is
different, then this can be correct in the sysfulltextcatalogs table. If
this is the problem, when you create a new FT Catalog in this database it
will fail with an error. Could you try this?
Thanks,
John
"Binder" <rgondzur@.NO_SPAM_aicsoft.com> wrote in message
news:uuMVoF54EHA.2624@.TK2MSFTNGP11.phx.gbl...
> John,
> If the original database was backed up from another server then restored
to[vbcol=seagreen]
> this cluster machine, is the FTData directory
> copied from the original machine also? Does a restore affect the FTData
> directory?
> I believe they installed SQL to the cluster with FTS, then did a restore
> from the other machine's backup.
> Wouldn't the FTData folder be created when FTS was installed with the
> initial SQL setup?
> If this is the case, would the issues you reference concerning the FTData
> folder and its files be a possible source of the problem?
>
> Rg
>
>
>
> "John Kane" <jt-kane@.comcast.net> wrote in message
> news:ehECYk44EHA.1976@.TK2MSFTNGP09.phx.gbl...
events[vbcol=seagreen]
not[vbcol=seagreen]
same[vbcol=seagreen]
one[vbcol=seagreen]
was[vbcol=seagreen]
> install -
and
> are
> gatherer
> crawl
> detected.
> to
> Upgrade
>