Showing posts with label enterprisemanager. Show all posts
Showing posts with label enterprisemanager. Show all posts

Tuesday, March 27, 2012

Deleting of Databases

Windows 2003 SP2 with SQL 2000:
We are trying to delete some databases that are old and the Enterprise
Manager hangs on deletion. We upgraded from SP 3a to 4 hoping that would fix
the problem but it doesn't. We've tried from other SQL boxes' Enterprise
Managers as well with no privail. Is there any way (potentially from SQLCMD)
to properly force the deletion of a database? Thanks in advance to anyone
with some info!
ctowndu33 wrote:
> Windows 2003 SP2 with SQL 2000:
> We are trying to delete some databases that are old and the Enterprise
> Manager hangs on deletion. We upgraded from SP 3a to 4 hoping that would fix
> the problem but it doesn't. We've tried from other SQL boxes' Enterprise
> Managers as well with no privail. Is there any way (potentially from SQLCMD)
> to properly force the deletion of a database? Thanks in advance to anyone
> with some info!
Have you tried to switch database to off-line mode (or detach database)
and then delete mdf/ldf files?
PL
|||1) Do you get any error message (perhaps logged in the sql server error
logs?
2) Have you tried this from the command line or from query analyzer?
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
"ctowndu33" <ctowndu33@.discussions.microsoft.com> wrote in message
news:450B4B7A-F575-4F29-8D31-55B6F395ABB4@.microsoft.com...
> Windows 2003 SP2 with SQL 2000:
> We are trying to delete some databases that are old and the Enterprise
> Manager hangs on deletion. We upgraded from SP 3a to 4 hoping that would
> fix
> the problem but it doesn't. We've tried from other SQL boxes' Enterprise
> Managers as well with no privail. Is there any way (potentially from
> SQLCMD)
> to properly force the deletion of a database? Thanks in advance to anyone
> with some info!
|||Now we realize that we can delete the databases if we clear the check mark to
remove backups. It's almost like it is searching for old backups that don't
exist any more. I though maybe I would see some really slow speeds (if it is
searching for old backups) if I try and do a restore. Turns out it took like
10 minutes for the restore box to pop up. Could the history of backups
contain orphaned informationt that would be causing this non-responsive
behavior? Thanks again everyone!
"ctowndu33" wrote:

> Windows 2003 SP2 with SQL 2000:
> We are trying to delete some databases that are old and the Enterprise
> Manager hangs on deletion. We upgraded from SP 3a to 4 hoping that would fix
> the problem but it doesn't. We've tried from other SQL boxes' Enterprise
> Managers as well with no privail. Is there any way (potentially from SQLCMD)
> to properly force the deletion of a database? Thanks in advance to anyone
> with some info!
|||Or perhaps it is simply taking forever to find the backups to delete? I
have a client with 6500+ databases on one server. I long ago had to create
several indexes on msdb tables so that things like this would work. The
index seeks enabled by the indexes let to very fast operations on
backup/restore tables.
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
"ctowndu33" <ctowndu33@.discussions.microsoft.com> wrote in message
news:AADA5A38-70AC-4B89-862E-BDE64C5F1178@.microsoft.com...[vbcol=seagreen]
> Now we realize that we can delete the databases if we clear the check mark
> to
> remove backups. It's almost like it is searching for old backups that
> don't
> exist any more. I though maybe I would see some really slow speeds (if it
> is
> searching for old backups) if I try and do a restore. Turns out it took
> like
> 10 minutes for the restore box to pop up. Could the history of backups
> contain orphaned informationt that would be causing this non-responsive
> behavior? Thanks again everyone!
> "ctowndu33" wrote:
sql

Deleting of Databases

Windows 2003 SP2 with SQL 2000:
We are trying to delete some databases that are old and the Enterprise
Manager hangs on deletion. We upgraded from SP 3a to 4 hoping that would fi
x
the problem but it doesn't. We've tried from other SQL boxes' Enterprise
Managers as well with no privail. Is there any way (potentially from SQLCMD
)
to properly force the deletion of a database? Thanks in advance to anyone
with some info!ctowndu33 wrote:
> Windows 2003 SP2 with SQL 2000:
> We are trying to delete some databases that are old and the Enterprise
> Manager hangs on deletion. We upgraded from SP 3a to 4 hoping that would
fix
> the problem but it doesn't. We've tried from other SQL boxes' Enterprise
> Managers as well with no privail. Is there any way (potentially from SQLC
MD)
> to properly force the deletion of a database? Thanks in advance to anyone
> with some info!
Have you tried to switch database to off-line mode (or detach database)
and then delete mdf/ldf files?
PL|||1) Do you get any error message (perhaps logged in the sql server error
logs?
2) Have you tried this from the command line or from query analyzer?
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
"ctowndu33" <ctowndu33@.discussions.microsoft.com> wrote in message
news:450B4B7A-F575-4F29-8D31-55B6F395ABB4@.microsoft.com...
> Windows 2003 SP2 with SQL 2000:
> We are trying to delete some databases that are old and the Enterprise
> Manager hangs on deletion. We upgraded from SP 3a to 4 hoping that would
> fix
> the problem but it doesn't. We've tried from other SQL boxes' Enterprise
> Managers as well with no privail. Is there any way (potentially from
> SQLCMD)
> to properly force the deletion of a database? Thanks in advance to anyone
> with some info!|||Now we realize that we can delete the databases if we clear the check mark t
o
remove backups. It's almost like it is searching for old backups that don't
exist any more. I though maybe I would see some really slow speeds (if it i
s
searching for old backups) if I try and do a restore. Turns out it took lik
e
10 minutes for the restore box to pop up. Could the history of backups
contain orphaned informationt that would be causing this non-responsive
behavior? Thanks again everyone!
"ctowndu33" wrote:

> Windows 2003 SP2 with SQL 2000:
> We are trying to delete some databases that are old and the Enterprise
> Manager hangs on deletion. We upgraded from SP 3a to 4 hoping that would
fix
> the problem but it doesn't. We've tried from other SQL boxes' Enterprise
> Managers as well with no privail. Is there any way (potentially from SQLC
MD)
> to properly force the deletion of a database? Thanks in advance to anyone
> with some info!|||Or perhaps it is simply taking forever to find the backups to delete? I
have a client with 6500+ databases on one server. I long ago had to create
several indexes on msdb tables so that things like this would work. The
index seeks enabled by the indexes let to very fast operations on
backup/restore tables.
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
"ctowndu33" <ctowndu33@.discussions.microsoft.com> wrote in message
news:AADA5A38-70AC-4B89-862E-BDE64C5F1178@.microsoft.com...[vbcol=seagreen]
> Now we realize that we can delete the databases if we clear the check mark
> to
> remove backups. It's almost like it is searching for old backups that
> don't
> exist any more. I though maybe I would see some really slow speeds (if it
> is
> searching for old backups) if I try and do a restore. Turns out it took
> like
> 10 minutes for the restore box to pop up. Could the history of backups
> contain orphaned informationt that would be causing this non-responsive
> behavior? Thanks again everyone!
> "ctowndu33" wrote:
>

Sunday, February 19, 2012

delete records

Hello,

I have a database called articles

I want to delete all articles from a subgroup e.g. DVD

If I am in the enterprisemanager what steps do I have to take to do this

thanks in advance

PaulI would do it in Query Analyzser (from EM you can select Tools, SQL
Query Analyzer)

Something like this:

BEGIN TRAN

DELETE
FROM articles
WHERE subgroup = 'DVD'

SELECT * FROM articles

ROLLBACK TRAN

Once you've verified that it deleted what you expected then change the
ROLLBACK to COMMIT.

Make sure you have a backup.

--
David Portas
SQL Server MVP
--|||Hello David,

thank you for your answer it is exactly what I need

kind regards Paul

"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> schreef in bericht
news:1127237303.004486.198620@.g44g2000cwa.googlegr oups.com...
>I would do it in Query Analyzser (from EM you can select Tools, SQL
> Query Analyzer)
> Something like this:
> BEGIN TRAN
> DELETE
> FROM articles
> WHERE subgroup = 'DVD'
> SELECT * FROM articles
> ROLLBACK TRAN
> Once you've verified that it deleted what you expected then change the
> ROLLBACK to COMMIT.
> Make sure you have a backup.
> --
> David Portas
> SQL Server MVP
> --|||UPDATE articles
SET subgroup ='VHS'
WHERE subgroup = 'DVD'

http://sqlservercode.blogspot.com/|||Hello David

Actually I want do also a rename command
this means not delete the record however change all subgroups with DVD in
e.g. VHS

kind regards Paul

"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> schreef in bericht
news:1127237303.004486.198620@.g44g2000cwa.googlegr oups.com...
>I would do it in Query Analyzser (from EM you can select Tools, SQL
> Query Analyzer)
> Something like this:
> BEGIN TRAN
> DELETE
> FROM articles
> WHERE subgroup = 'DVD'
> SELECT * FROM articles
> ROLLBACK TRAN
> Once you've verified that it deleted what you expected then change the
> ROLLBACK to COMMIT.
> Make sure you have a backup.
> --
> David Portas
> SQL Server MVP
> --|||I have a similar project

Database called Spot_Movers

table called Files

and column called End_Date

I need delete all records prior to 2/1/2005

I will write this out in Query Analyzer

I am just getting into the whole SQL and I am sort of struggling

TYIA

Drew