Groups | Blog | Home
all groups > sql server clustering > october 2004 >

sql server clustering : SQL 2000 instance showing up as version6.5 after running fixrep sc


bradchand
10/28/2004 2:44:01 PM
just a quick background
SQl 2000 running as a cluster. We started a merge replication and had
problems so i removed it.
we had probelems with the database after I removed it so a programmer
suggested I run a fixrep.sql script to remove traces of replication.

After I ran the script the instance would not come up in enterprise manager,
it says the database has to be version 7 to be managed. It show up as version
6.5, but it is SQl 2000.

Is there a way to get it to show back up as SQL 2000 and manage it?

Thanks in advance,
Brad
uttamkp NO[at]SPAM online.microsoft.com
10/29/2004 12:00:27 AM
Hello Brad,

Never heard of fixrep.sql. What does this do? Review the script and see what it does?
Depending on what the script did you have to take the next steps.

Can you start SQL Server from the DOS command prompt using

sqlservr -c -sIntancename

What is the version of sqlservr.exe ?

If you have recent good backups of your dbs, this may be time to make use of them.

Best Regards,

Uttam Parui
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit http://www.microsoft.com/security.

Microsoft highly recommends that users with Internet access update their Microsoft software to better protect against viruses and security vulnerabilities. The easiest way to do this is to visit the following websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx

bradchand
10/29/2004 8:42:54 AM
Sql server will start and stop from the comp management services console I
just cannot get to the database in Enterprise manager to manage, import ,and
export. It says the instance must be version 7.0 to be managed in this DMO

sqlservr.exe version is: 2000.80.760.0

What will "sqlservr -c -sIntancename" do. Is this just starting the database?

The fixrep.sql script that I ran is below:
exec sp_configure N'allow updates', 1
go
reconfigure with override
go

DECLARE @name varchar(129)
DECLARE @username varchar(129)
DECLARE @insname varchar(129)
DECLARE @delname varchar(129)
DECLARE @updname varchar(129)
set @insname=''
set @updname=''
set @delname=''

DECLARE list_triggers CURSOR FOR
select distinct replace(artid,'-',''), sysusers.name from
sysmergearticles,sysobjects, sysusers where
sysmergearticles.objid=sysobjects.id
and sysusers.uid=sysobjects.uid

OPEN list_triggers

FETCH NEXT FROM list_triggers INTO @name, @username
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'dropping trigger ins_' +@name
select @insname='drop trigger ' +@username+'.ins_'+@name
exec (@insname)
PRINT 'dropping trigger upd_' +@name
select @updname='drop trigger ' +@username+'.upd_'+@name
exec (@delname)
PRINT 'dropping trigger del_' +@name
select @delname='drop trigger ' +@username+'.del_'+@name
exec (@updname)
FETCH NEXT FROM list_triggers INTO @name, @username
END

CLOSE list_triggers
DEALLOCATE list_triggers
go

if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[syspublications]') and OBJECTPROPERTY(id, N'IsUserTable')
= 1) begin DECLARE @name varchar(129)
DECLARE list_pubs CURSOR FOR
SELECT name FROM syspublications

OPEN list_pubs

FETCH NEXT FROM list_pubs INTO @name
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'dropping publication ' +@name
EXEC sp_dropsubscription @publication=@name, @article='all', @subscriber
='all'
EXEC sp_droppublication @name
FETCH NEXT FROM list_pubs INTO @name
END

CLOSE list_pubs
DEALLOCATE list_pubs
end
GO


DECLARE @name varchar(129)
DECLARE list_replicated_tables CURSOR FOR
SELECT name FROM sysobjects WHERE replinfo <>0
UNION
SELECT name FROM sysmergearticles

OPEN list_replicated_tables

FETCH NEXT FROM list_replicated_tables INTO @name
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'unmarking replicated table ' +@name
--select @name='drop Table ' + @name
EXEC sp_msunmarkreplinfo @name
FETCH NEXT FROM list_replicated_tables INTO @name
END

CLOSE list_replicated_tables
DEALLOCATE list_replicated_tables

GO

UPDATE syscolumns set colstat = colstat & ~4096 WHERE colstat &4096 <>0
GO
UPDATE sysobjects set replinfo=0
GO

DECLARE @name nvarchar(129)
DECLARE list_views CURSOR FOR
SELECT name FROM sysobjects WHERE type='V' and (name like 'syncobj_%' or
name
like 'ctsv_%' or name like 'tsvw_%' or name like 'ms_bi%')

OPEN list_views

FETCH NEXT FROM list_views INTO @name
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'dropping View ' +@name
select @name='drop View ' + @name
EXEC sp_executesql @name
FETCH NEXT FROM list_views INTO @name
END

CLOSE list_views
DEALLOCATE list_views

GO

DECLARE @name nvarchar(129)
DECLARE list_procs CURSOR FOR
SELECT name FROM sysobjects WHERE type='p' and (name like 'sp_ins_%' or
name
like 'sp_MSdel_%' or name like 'sp_MSins_%'or name like 'sp_MSupd_%' or name
like 'sp_sel_%' or name like 'sp_upd_%')

OPEN list_procs

FETCH NEXT FROM list_procs INTO @name
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'dropping procs ' +@name
select @name='drop procedure ' + @name
EXEC sp_executesql @name
FETCH NEXT FROM list_procs INTO @name
END

CLOSE list_procs
DEALLOCATE list_procs

GO

DECLARE @name nvarchar(129)
DECLARE list_conflict_tables CURSOR FOR
SELECT name From sysobjects WHERE type='u' and name like '_onflict%'

OPEN list_conflict_tables

FETCH NEXT FROM list_conflict_tables INTO @name
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'dropping conflict_tables ' +@name
select @name='drop Table ' + @name
EXEC sp_executesql @name
FETCH NEXT FROM list_conflict_tables INTO @name
END

CLOSE list_conflict_tables
DEALLOCATE list_conflict_tables

GO

UPDATE syscolumns set colstat=2 WHERE name='rowguid'

GO


Declare @name nvarchar(200), @constraint nvarchar(200)
DECLARE list_rowguid_constraints CURSOR FOR
select sysusers.name+'.'+object_name(sysobjects.parent_obj), sysobjects.name
from sysobjects, syscolumns,sysusers where sysobjects.type ='d' and
syscolumns.id=sysobjects.parent_obj
and sysusers.uid=sysobjects.uid
and syscolumns.name='rowguid'

OPEN list_rowguid_constraints

FETCH NEXT FROM list_rowguid_constraints INTO @name, @constraint WHILE
@@FETCH_STATUS = 0 BEGIN
PRINT 'dropping rowguid constraints ' +@name
select @name='ALTER TABLE ' + rtrim(@name) + ' DROP CONSTRAINT '
+@constraint
print @name
EXEC sp_executesql @name
FETCH NEXT FROM list_rowguid_constraints INTO @name, @constraint END

CLOSE list_rowguid_constraints
DEALLOCATE list_rowguid_constraints

GO

Declare @name nvarchar(129), @constraint nvarchar(129)
DECLARE list_rowguid_indexes CURSOR FOR
select sysusers.name+'.'+object_name(sysindexes.id), sysindexes.name from
sysindexes, sysobjects,sysusers where sysindexes.name like 'index%' and
sysobjects.id=sysindexes.id and sysusers.uid=sysobjects.uid

OPEN list_rowguid_indexes

FETCH NEXT FROM list_rowguid_indexes INTO @name, @constraint WHILE
@@FETCH_STATUS = 0 BEGIN
PRINT 'dropping rowguid indexes ' +@name
select @name='drop index ' + rtrim(@name ) + '.' +@constraint
EXEC sp_executesql @name
FETCH NEXT FROM list_rowguid_indexes INTO @name, @constraint END

CLOSE list_rowguid_indexes
DEALLOCATE list_rowguid_indexes
GO


Declare @name nvarchar(129), @constraint nvarchar(129)
DECLARE list_ms_bidi_tables CURSOR FOR
select sysusers.name+'.'+sysobjects.name from
sysobjects,sysusers where sysobjects.name like 'ms_bi%'
and sysusers.uid=sysobjects.uid
and sysobjects.type='u'

OPEN list_ms_bidi_tables

FETCH NEXT FROM list_ms_bidi_tables INTO @name
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'dropping ms_bidi ' +@name
select @name='drop table ' + rtrim(@name )
EXEC sp_executesql @name
FETCH NEXT FROM list_ms_bidi_tables INTO @name
END

CLOSE list_ms_bidi_tables
DEALLOCATE list_ms_bidi_tables

GO

Declare @name nvarchar(129)
DECLARE list_rowguid_columns CURSOR FOR
select sysusers.name+'.'+object_name(syscolumns.id) from syscolumns,
sysobjects,sysusers where syscolumns.name like 'rowguid' and
object_Name(sysobjects.id) not like 'msmerge%'
and sysobjects.id=syscolumns.id
and sysusers.uid=sysobjects.uid
and sysobjects.type='u' order by 1


OPEN list_rowguid_columns

FETCH NEXT FROM list_rowguid_columns INTO @name
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'dropping rowguid columns ' +@name
select @name='Alter Table ' + rtrim(@name ) + ' drop column rowguid'
print @name
EXEC sp_executesql @name
bradchand
10/29/2004 1:13:03 PM
The SQL server resource does come online in Cluster Administrator, The
databases even work and our sites run. I just cannot manage it in ENT
manager.
I am able to manage 4 other instances of SQL in ENT manager, One of them is
running on the Cluster. It just seems to be a problem with this instance. I
get the same error in ENT. manager from 5 different machines.

The select @@version returned just as you thought. 8.00.760]

I tried reinstalling/upgrade the instance but it will not let me because it
shows up as the same version as the install. Do I just need to remove the
instance and reinstall it from scratch?

Did anything in the script from my last post raise a flag for you?

Thanks for your time in this,
Brad



[quoted text, click to view]
uttamkp NO[at]SPAM online.microsoft.com
10/29/2004 6:36:26 PM
sqlservr -c -sInstanceName

will start SQL Server from the command prompt. -s parameter is required only for named instances.

SQL Server Books Online explains all the options for sqlservr

You mentioned that SQL Server started from Services applet. Does the SQL Server resource come online from the Cluster Administrator?

Once it comes online, try connecting to it using Query Analyzer and run

select @@version

See what it results.

I am thinking it will return Microsoft SQL Server 2000 - 8.00.760. This will mean that you have SQL Server 2000 SP3 or 3a (based on version of ssnetlib.dll)

If that is the case then the issue may be Enterprise Manager related and follow the same steps that you would take to troubleshoot an Enterprise Manager issue.. Try
connecting to this instance of SQL Server using another Enterprise Manager to see if you get the same error.

Best Regards,

Uttam Parui
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.

Microsoft highly recommends that users with Internet access update their Microsoft software to better protect against viruses and security vulnerabilities. The easiest way
to do this is to visit the following websites: http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx

uttamkp NO[at]SPAM online.microsoft.com
11/1/2004 12:17:47 AM
I would try to reapply SP3a for this instance of SQL Server and see if it helps.

Best Regards,

Uttam Parui
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit http://www.microsoft.com/security.

Microsoft highly recommends that users with Internet access update their Microsoft software to better protect against viruses and security vulnerabilities. The easiest way to do this is to visit the following websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx

AddThis Social Bookmark Button