Showing posts with label server2000. Show all posts
Showing posts with label server2000. Show all posts

Monday, March 26, 2012

How to remove (uninstall ) cluster sql server manually?

Hi All,
Environment:windows2003 sp1
SQl server 2000, sp2, and It is clustered(2 nodes)
I need to uninstall SQL server2000 . When i tried to uninstall from setup,
i have got error and so i have deleted manually so sql binaries and registry
key(services\mssqlserver and sqlagent).
Now i am not able to uninstall completely..
Can anyone help me what are the registry keys, files etc need to be deleted
for this unstallation to complete?How to clean it properly?
Thanks in adavnce
Suchi
How to manually remove SQL Server 2000 default, named, or virtual instance
http://support.microsoft.com/kb/290991/en-us
Geoff N. Hiten
Senior SQL Infrastructure Consultant
Microsoft SQL Server MVP
"Suchi" <Suchi@.discussions.microsoft.com> wrote in message
news:CC2377D2-7128-4C59-AF25-29136F9AB016@.microsoft.com...
> Hi All,
> Environment:windows2003 sp1
> SQl server 2000, sp2, and It is clustered(2 nodes)
> I need to uninstall SQL server2000 . When i tried to uninstall from
> setup,
> i have got error and so i have deleted manually so sql binaries and
> registry
> key(services\mssqlserver and sqlagent).
> Now i am not able to uninstall completely..
> Can anyone help me what are the registry keys, files etc need to be
> deleted
> for this unstallation to complete?How to clean it properly?
> Thanks in adavnce
> Suchi
|||Thanks Hiten for the quick reponse.
I have gone through the below Link before uninstalling .
As i was getting error while uninstalling from setup(method 2),I removed the
data and some of binaries . I cloud not delete the reg key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer.
Getting "Cannot delet MSsqlserver: Error while deleting key" error.
SQL server is clustered.Even i could not delet some binaries. Getting access
denied error. I am using admin account with full permissions..
Thanks..
Suchi
"Geoff N. Hiten" wrote:

> How to manually remove SQL Server 2000 default, named, or virtual instance
> http://support.microsoft.com/kb/290991/en-us
> --
> Geoff N. Hiten
> Senior SQL Infrastructure Consultant
> Microsoft SQL Server MVP
>
> "Suchi" <Suchi@.discussions.microsoft.com> wrote in message
> news:CC2377D2-7128-4C59-AF25-29136F9AB016@.microsoft.com...
>
|||You may have to reboot nodes to clear some leftover file locks.
Geoff N. Hiten
Senior SQL Infrastructure Consultant
Microsoft SQL Server MVP
"Suchi" <Suchi@.discussions.microsoft.com> wrote in message
news:2CBE9799-2529-40D0-B4F3-621629258E63@.microsoft.com...[vbcol=seagreen]
> Thanks Hiten for the quick reponse.
> I have gone through the below Link before uninstalling .
> As i was getting error while uninstalling from setup(method 2),I removed
> the
> data and some of binaries . I cloud not delete the reg key
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer.
> Getting "Cannot delet MSsqlserver: Error while deleting key" error.
> SQL server is clustered.Even i could not delet some binaries. Getting
> access
> denied error. I am using admin account with full permissions..
> Thanks..
> Suchi
> "Geoff N. Hiten" wrote:
|||Hiten,
can you please let me know any reg keys need to be deleted before rebooting?
"Geoff N. Hiten" wrote:

> You may have to reboot nodes to clear some leftover file locks.
> --
> Geoff N. Hiten
> Senior SQL Infrastructure Consultant
> Microsoft SQL Server MVP
>
> "Suchi" <Suchi@.discussions.microsoft.com> wrote in message
> news:2CBE9799-2529-40D0-B4F3-621629258E63@.microsoft.com...
>
|||It sounds like you may have some SQL services still running. That will lock
down certain file folders and possibly registry keys. Stop all the SQL
services and follow the instructions that match your setup (named or default
instance) exactly on all nodes. If something prevents a folder or reg key
deletion, then it is time to reboot, verify the services are not running,
and try again.
Geoff N. Hiten
Senior SQL Infrastructure Consultant
Microsoft SQL Server MVP
"Suchi" <Suchi@.discussions.microsoft.com> wrote in message
news:07AC7A23-0505-473D-BC3D-FFB13321AC07@.microsoft.com...[vbcol=seagreen]
> Hiten,
> can you please let me know any reg keys need to be deleted before
> rebooting?
> "Geoff N. Hiten" wrote:
|||You my need to remove some virtual resources if the processes outlined in
the KB article do not clear them out. Basically, try and get the cluster
back to where it was before the blown SQL install.
Geoff N. Hiten
Senior SQL Infrastructure Consultant
Microsoft SQL Server MVP
"Suchi" <Suchi@.discussions.microsoft.com> wrote in message
news:CEF3C105-C5F4-4B53-926A-B4D90C8CD53F@.microsoft.com...[vbcol=seagreen]
> Thanks much..
> Do i need to delete resources from cluster admin?
> If yes, is it from resorces or from groups?
>
> "Geoff N. Hiten" wrote:

Monday, March 19, 2012

How to recover Master database table data

Hi all, I am working with SQL Server2000 and I have done a horrible thing here.
We here have an script that delete all data from all user tables of a database, and I run it in the master DATABASE.
As we don't made backups of this database, now somethings of the database aren't working.

Here is the script:

declare @.table_name sysname
declare @.alter_table_statement varchar(256)
declare @.delete_statement varchar(256)

-- definindo o cursor...
declare table_name_cursor cursor local fast_forward for
select
name
from
sysobjects
where
xtype = 'U'
and
name <> 'dtproperties'

-- desligando os vĂ­nculos...
open table_name_cursor
fetch next from table_name_cursor into @.table_name
select @.alter_table_statement = 'alter table ' + ltrim(rtrim(@.table_name)) + ' nocheck constraint all'
exec(@.alter_table_statement)
while @.@.Fetch_Status = 0
begin
fetch next from table_name_cursor into @.table_name
select @.alter_table_statement = 'alter table ' + ltrim(rtrim(@.table_name)) + ' nocheck constraint all'
exec(@.alter_table_statement)
end
close table_name_cursor

open table_name_cursor
fetch next from table_name_cursor into @.table_name
select @.delete_statement = 'delete from ' + ltrim(rtrim(@.table_name))
exec(@.delete_statement)
while @.@.Fetch_Status = 0
begin
fetch next from table_name_cursor into @.table_name
select @.delete_statement = 'delete from ' + ltrim(rtrim(@.table_name))
exec(@.delete_statement)
end
close table_name_cursor

open table_name_cursor
fetch next from table_name_cursor into @.table_name
select @.alter_table_statement = 'alter table ' + ltrim(rtrim(@.table_name)) + ' check constraint all'
exec(@.alter_table_statement)
while @.@.Fetch_Status = 0
begin
fetch next from table_name_cursor into @.table_name
select @.alter_table_statement = 'alter table ' + ltrim(rtrim(@.table_name)) + ' check constraint all'
exec(@.alter_table_statement)
end
close table_name_cursor

deallocate table_name_cursor

I have tried to restore master table with the restore function, but it doesn't work. When I try to do this I received a message informing that it can't copy the data because one file was in use. The server was in a single user mode.

Is there anyway to recover the data that I have lost?

Help me understand this.

At the beginning, you say that you don't have backups of the master database.

At the end you say that you tried to restore the master database, but had problems.

You should be able to restore the master database if you have a backup of it, and this would be the best method to use.

Can you clarify, and also let us know what method (T-SQL commands etc.) you used to attempt the restore?

|||Kevin don't have any backup of this database, I tried to rebuild it, not restore it, I used the wrong word for it.|||

There isn't any easy answer to this. If you have already rebuilt master then you should have SQL Server up and running with a clean master. Realize that by rebuilding the master database all your jobs and maintenance plans in MSDB have been lost, unless you have a backup of msdb or scripts to recreate the jobs.

The datafiles for your user databases should still be on the disk, you will need to attach those using sp_attach_db.

Once you have the databases attached you still won't have the logins. You will need to recreate the logins, then remap those new logins using the procedure outlined in http://support.microsoft.com/kb/274188/en-us

|||Ok thanks... one more explanation
In fact my real problem isn't on the databases and user logins, becaus this I doesn't lost. I lost the access to table metadata (via jdbc driver) and the permission to create diagrams. Probably this can be done by reconfiguring the server, but I doesn't know how to do it.