Showing posts with label deleting. Show all posts
Showing posts with label deleting. Show all posts

Wednesday, March 28, 2012

Problem in deleting rows in table

hi there!

I have encounter the problem when trying to delete the rows..with the error message

http://i5.photobucket.com/albums/y151/kangalert/untitled.jpg

http://i5.photobucket.com/albums/y151/kangalert/1231234.jpg

with contain no primary key, and no dependency

What task/component are you using to do the deletion?

Please provide as much information as you can, in a concise manner, when posting issues.

-Jamie

|||

i just click on the row/rows i want to delete in SQL Server..

But it wont let me update and delete the row!

|||

Is this at all related to SSIS?

If not then you are in the wrong forum. Try the Tools or T-SQL forum.

-Jamie

sql

Friday, March 9, 2012

Problem Deleting Rows

I have a table that was imported from an Excel 2003 worksheet. It has no
primary key. If I select one or more rows and try to delete them I get the
error:
Key column information is insufficient or incorrect. Too many rows were
affected by the update.
If I use QA I can delete the rows?
What is it trying to tell me here?
WaynePlease post the full DDL for your table, as well as the DELETE statement.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Wayne Wengert" <wayneSKIPSPAM@.wengert.org> wrote in message
news:e6dSRMHPGHA.3984@.TK2MSFTNGP14.phx.gbl...
I have a table that was imported from an Excel 2003 worksheet. It has no
primary key. If I select one or more rows and try to delete them I get the
error:
Key column information is insufficient or incorrect. Too many rows were
affected by the update.
If I use QA I can delete the rows?
What is it trying to tell me here?
Wayne|||> What is it trying to tell me here?
Two things. First, EM is not a good editing tool. Second, a table without
a primary key is, by definition, not a table.|||Interesting. Since I am importing from Excel I'll need to come up with some
autonumber key I guess?
Wayne
"Scott Morris" <bogus@.bogus.com> wrote in message
news:e2uUW4HPGHA.3732@.TK2MSFTNGP10.phx.gbl...
> Two things. First, EM is not a good editing tool. Second, a table
> without a primary key is, by definition, not a table.
>|||You can add an identity column to the target table and add a primary key
constraint on it.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Wayne Wengert" <wayneSKIPSPAM@.wengert.org> wrote in message
news:ORjDEQIPGHA.812@.TK2MSFTNGP10.phx.gbl...
Interesting. Since I am importing from Excel I'll need to come up with some
autonumber key I guess?
Wayne
"Scott Morris" <bogus@.bogus.com> wrote in message
news:e2uUW4HPGHA.3732@.TK2MSFTNGP10.phx.gbl...
> Two things. First, EM is not a good editing tool. Second, a table
> without a primary key is, by definition, not a table.
>

Problem Deleting Publications

I am running SQL Server 2000 with SP3. I receive the following message when trying to delete my publications:

SQL Server Enterprise Manager could not retrieve information about publication 'Named Publication'.

Error 2812: Could not find stored procedure ".

Also, for some reason the system is still trying to replicate even though it claims there is no distributor available... Any ideas would be greatly appreciated.

Thanks,

absoluttUse Profiler to check for command what EM is trying to execute and you will know what is going on.

Problem deleting publication

Hi All,

I have a problem, a user deleted some tables from a couple db's dealing
with replication. I now get this error on those db's.

The process could not execute 'sp_repldone/sp_replcounters on
servername

I have deleted one of the database's and neither are listed under
publications but they still show up under replication monitor.

Any ideas on how to delete them would be great. When I try I get

Error 208: Invalid object name 'sysarticles'
Invalid object name 'sysschemaarticles'
Could not use view or function 'sysextendedarticlesview' because of
binding errors.

TIA
DaveI figured it out, hope this helps someone.

I went into the distribution db and went thru every table and removed
any reference to the databases that were giving me problems. That got
rid of the ghost entries in the replication monitor folder. Oddly I
still had the red X's on the folders them selves but nothing under the
folders had X's and a refresh didnt make them go away. A
sp_MSload_replication_status did though.

Now just the database of the two that were needed still had the repl
hand icon on the database. The good old sp_removedbreplication got rid
of that.

Thanks,
Dave

problem deleting large no. of records

Hi all,
I have a table with 6 million rows which takes up about 2GB of memory on
hard disk. So we have decided to clean this table up. We have decided to
delete all records that have syncstamp and logstamp field values less than
the value correspoing '20040131'. This will probably delete 5.5 million rows
out of total 6 million.
When I try to delete records using following script, it is very slow. The
script did not finish executing in three hours. So we had to cancel the
execution of the script. Also the users were not able to use conttlog table
when this query was executing although I am using ROWLOCK table hint.
Is there any other way to fix the speed and concurrency issues with this
script? I know I can't use a loop to delete 5.5 million rows because it will
probably take days to execute it.
Thanks in advance.
-- ****************************************
*******
-- Variable declaration
-- ****************************************
*******
DECLARE @.Date datetime,
@.syncstamp varchar(7)
-- ****************************************
*******
-- Assign variable values
-- ****************************************
*******
SET @.Date = '20040131' -- yyyymmdd -> purge logs upto this date
-- ****************************************
*******
-- Delete conttlog records
-- ****************************************
*******
SET @.syncstamp = dbo.WF_GetSyncStamp(@.Date)
DELETE
FROM conttlog with(rowlock)
WHERE syncstamp < @.syncstamp
AND logstamp < @.syncstampsql
Do you have Primary key on the table?
I'd try to divide the 'big' transaction/deletion into small ones
See this example
SET ROWCOUNT 1000 --Set the value
WHILE 1 = 1
BEGIN
UPDATE MyTable WHERE col <= datetimecolumn
IF @.@.ROWCOUNT = 0
BEGIN
BREAK
END
ELSE
BEGIN
CHECKPOINT
END
END
SET ROWCOUNT 0
"sql" <donotspam@.nospaml.com> wrote in message
news:uUV2eXbGFHA.3284@.TK2MSFTNGP10.phx.gbl...
> Hi all,
> I have a table with 6 million rows which takes up about 2GB of memory
on
> hard disk. So we have decided to clean this table up. We have decided to
> delete all records that have syncstamp and logstamp field values less than
> the value correspoing '20040131'. This will probably delete 5.5 million
rows
> out of total 6 million.
> When I try to delete records using following script, it is very slow.
The
> script did not finish executing in three hours. So we had to cancel the
> execution of the script. Also the users were not able to use conttlog
table
> when this query was executing although I am using ROWLOCK table hint.
> Is there any other way to fix the speed and concurrency issues with
this
> script? I know I can't use a loop to delete 5.5 million rows because it
will
> probably take days to execute it.
> Thanks in advance.
> -- ****************************************
*******
> -- Variable declaration
> -- ****************************************
*******
> DECLARE @.Date datetime,
> @.syncstamp varchar(7)
> -- ****************************************
*******
> -- Assign variable values
> -- ****************************************
*******
> SET @.Date = '20040131' -- yyyymmdd -> purge logs upto this date
> -- ****************************************
*******
> -- Delete conttlog records
> -- ****************************************
*******
> SET @.syncstamp = dbo.WF_GetSyncStamp(@.Date)
> DELETE
> FROM conttlog with(rowlock)
> WHERE syncstamp < @.syncstamp
> AND logstamp < @.syncstamp
>|||I would recommend doing this in smaller batches -- maybe 10,000 rows at
once:
-- ****************************************
*******
-- Variable declaration
-- ****************************************
*******
DECLARE @.Date datetime,
@.syncstamp varchar(7)
-- ****************************************
*******
-- Assign variable values
-- ****************************************
*******
SET @.Date = '20040131' -- yyyymmdd -> purge logs upto this date
-- ****************************************
*******
-- Delete conttlog records
-- ****************************************
*******
SET @.syncstamp = dbo.WF_GetSyncStamp(@.Date)
SET ROWCOUNT 10000
DELETE
FROM conttlog
WHERE syncstamp < @.syncstamp
AND logstamp < @.syncstamp
WHILE @.@.ROWCOUNT > 0
BEGIN
DELETE
FROM conttlog
WHERE syncstamp < @.syncstamp
AND logstamp < @.syncstamp
END
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"sql" <donotspam@.nospaml.com> wrote in message
news:uUV2eXbGFHA.3284@.TK2MSFTNGP10.phx.gbl...
> Hi all,
> I have a table with 6 million rows which takes up about 2GB of memory
on
> hard disk. So we have decided to clean this table up. We have decided to
> delete all records that have syncstamp and logstamp field values less than
> the value correspoing '20040131'. This will probably delete 5.5 million
rows
> out of total 6 million.
> When I try to delete records using following script, it is very slow.
The
> script did not finish executing in three hours. So we had to cancel the
> execution of the script. Also the users were not able to use conttlog
table
> when this query was executing although I am using ROWLOCK table hint.
> Is there any other way to fix the speed and concurrency issues with
this
> script? I know I can't use a loop to delete 5.5 million rows because it
will
> probably take days to execute it.
> Thanks in advance.
> -- ****************************************
*******
> -- Variable declaration
> -- ****************************************
*******
> DECLARE @.Date datetime,
> @.syncstamp varchar(7)
> -- ****************************************
*******
> -- Assign variable values
> -- ****************************************
*******
> SET @.Date = '20040131' -- yyyymmdd -> purge logs upto this date
> -- ****************************************
*******
> -- Delete conttlog records
> -- ****************************************
*******
> SET @.syncstamp = dbo.WF_GetSyncStamp(@.Date)
> DELETE
> FROM conttlog with(rowlock)
> WHERE syncstamp < @.syncstamp
> AND logstamp < @.syncstamp
>|||Hi
Do it in smaller batches. This will help with performance.
SET @.syncstamp = dbo.WF_GetSyncStamp(@.Date)
SET ROWCOUNT 10000
DELETE
FROM conttlog with(rowlock)
WHERE syncstamp < @.syncstamp
AND logstamp < @.syncstamp
Regards
Mike
"sql" wrote:

> Hi all,
> I have a table with 6 million rows which takes up about 2GB of memory o
n
> hard disk. So we have decided to clean this table up. We have decided to
> delete all records that have syncstamp and logstamp field values less than
> the value correspoing '20040131'. This will probably delete 5.5 million ro
ws
> out of total 6 million.
> When I try to delete records using following script, it is very slow. Th
e
> script did not finish executing in three hours. So we had to cancel the
> execution of the script. Also the users were not able to use conttlog tabl
e
> when this query was executing although I am using ROWLOCK table hint.
> Is there any other way to fix the speed and concurrency issues with th
is
> script? I know I can't use a loop to delete 5.5 million rows because it wi
ll
> probably take days to execute it.
> Thanks in advance.
> -- ****************************************
*******
> -- Variable declaration
> -- ****************************************
*******
> DECLARE @.Date datetime,
> @.syncstamp varchar(7)
> -- ****************************************
*******
> -- Assign variable values
> -- ****************************************
*******
> SET @.Date = '20040131' -- yyyymmdd -> purge logs upto this date
> -- ****************************************
*******
> -- Delete conttlog records
> -- ****************************************
*******
> SET @.syncstamp = dbo.WF_GetSyncStamp(@.Date)
> DELETE
> FROM conttlog with(rowlock)
> WHERE syncstamp < @.syncstamp
> AND logstamp < @.syncstamp
>
>|||Uri,
One comment on this; I would personally be wary of doing that many
checkpoints during the process, as I believe that it would bring overall
system performance down quite a bit due to the constant disk activity. Is
there a reason you'd recommend doing a checkpoint on every iteration?
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:OvmficbGFHA.3608@.TK2MSFTNGP14.phx.gbl...
> sql
> Do you have Primary key on the table?
> I'd try to divide the 'big' transaction/deletion into small ones
> See this example
> SET ROWCOUNT 1000 --Set the value
> WHILE 1 = 1
> BEGIN
> UPDATE MyTable WHERE col <= datetimecolumn
> IF @.@.ROWCOUNT = 0
> BEGIN
> BREAK
> END
> ELSE
> BEGIN
> CHECKPOINT
> END
> END
> SET ROWCOUNT 0
>|||Thank you all for your answers. I will set the ROWCOUNT at the beginning of
the script to either 1000 or 10000. Do you think it is worth creating a
clusterd index on SYNCSTAMP and LOGSTAMP to improve the performance of this
script and then drop it. If so how long do you think it will take to create
such an index. both fields are varchar(7).
Thanks.
"sql" <donotspam@.nospaml.com> wrote in message
news:uUV2eXbGFHA.3284@.TK2MSFTNGP10.phx.gbl...
> Hi all,
> I have a table with 6 million rows which takes up about 2GB of memory on
> hard disk. So we have decided to clean this table up. We have decided to
> delete all records that have syncstamp and logstamp field values less than
> the value correspoing '20040131'. This will probably delete 5.5 million
> rows out of total 6 million.
> When I try to delete records using following script, it is very slow. The
> script did not finish executing in three hours. So we had to cancel the
> execution of the script. Also the users were not able to use conttlog
> table when this query was executing although I am using ROWLOCK table
> hint.
> Is there any other way to fix the speed and concurrency issues with
> this script? I know I can't use a loop to delete 5.5 million rows because
> it will probably take days to execute it.
> Thanks in advance.
> -- ****************************************
*******
> -- Variable declaration
> -- ****************************************
*******
> DECLARE @.Date datetime,
> @.syncstamp varchar(7)
> -- ****************************************
*******
> -- Assign variable values
> -- ****************************************
*******
> SET @.Date = '20040131' -- yyyymmdd -> purge logs upto this date
> -- ****************************************
*******
> -- Delete conttlog records
> -- ****************************************
*******
> SET @.syncstamp = dbo.WF_GetSyncStamp(@.Date)
> DELETE
> FROM conttlog with(rowlock)
> WHERE syncstamp < @.syncstamp
> AND logstamp < @.syncstamp
>|||Hi
Creating a clustetred index will cause the whole table to be re-written.
This will take longer to do than running the delete.
Regards
Mike
"sql" wrote:

> Thank you all for your answers. I will set the ROWCOUNT at the beginning o
f
> the script to either 1000 or 10000. Do you think it is worth creating a
> clusterd index on SYNCSTAMP and LOGSTAMP to improve the performance of thi
s
> script and then drop it. If so how long do you think it will take to creat
e
> such an index. both fields are varchar(7).
> Thanks.
> "sql" <donotspam@.nospaml.com> wrote in message
> news:uUV2eXbGFHA.3284@.TK2MSFTNGP10.phx.gbl...
>
>|||Hi
My Sfr 0.02
It is in an implicit transaction, so until the whole batch completes,
nothing is committed.
Regards
Mike
"Adam Machanic" wrote:

> Uri,
> One comment on this; I would personally be wary of doing that many
> checkpoints during the process, as I believe that it would bring overall
> system performance down quite a bit due to the constant disk activity. Is
> there a reason you'd recommend doing a checkpoint on every iteration?
>
> --
> Adam Machanic
> SQL Server MVP
> http://www.sqljunkies.com/weblog/amachanic
> --
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:OvmficbGFHA.3608@.TK2MSFTNGP14.phx.gbl...
>
>|||sql wrote:
> Thank you all for your answers. I will set the ROWCOUNT at the
> beginning of the script to either 1000 or 10000. Do you think it is
> worth creating a clusterd index on SYNCSTAMP and LOGSTAMP to improve
> the performance of this script and then drop it. If so how long do
> you think it will take to create such an index. both fields are
> varchar(7).
If you do this, understand that SQL Server will have to rebuild all
non-clustered indexes. So do it off-hours, if at all. I would recommend
you not mess with the indexes since you are working on live data and
use the small batch size.
Is there any way you can do all this testing on a dev/test server?
David Gugick
Imceda Software
www.imceda.com|||What I've done in the past is stuff the records I wish to retain into a new
table and do a rename. The table will need to be offline during this
operation, simply run a test to see how long it takes to populate the new
table with the half million rows. The rename takes less than a second. If yo
u
try this technique I'd recommend doing a create table instead of a select
into so you can double check the referential integrity, default values,
index(s) and all else.
Dan
"sql" wrote:

> Hi all,
> I have a table with 6 million rows which takes up about 2GB of memory o
n
> hard disk. So we have decided to clean this table up. We have decided to
> delete all records that have syncstamp and logstamp field values less than
> the value correspoing '20040131'. This will probably delete 5.5 million ro
ws
> out of total 6 million.
> When I try to delete records using following script, it is very slow. Th
e
> script did not finish executing in three hours. So we had to cancel the
> execution of the script. Also the users were not able to use conttlog tabl
e
> when this query was executing although I am using ROWLOCK table hint.
> Is there any other way to fix the speed and concurrency issues with th
is
> script? I know I can't use a loop to delete 5.5 million rows because it wi
ll
> probably take days to execute it.
> Thanks in advance.
> -- ****************************************
*******
> -- Variable declaration
> -- ****************************************
*******
> DECLARE @.Date datetime,
> @.syncstamp varchar(7)
> -- ****************************************
*******
> -- Assign variable values
> -- ****************************************
*******
> SET @.Date = '20040131' -- yyyymmdd -> purge logs upto this date
> -- ****************************************
*******
> -- Delete conttlog records
> -- ****************************************
*******
> SET @.syncstamp = dbo.WF_GetSyncStamp(@.Date)
> DELETE
> FROM conttlog with(rowlock)
> WHERE syncstamp < @.syncstamp
> AND logstamp < @.syncstamp
>
>

problem deleting file

Hi all,
I need to delete files using UNC path of the file in xp_cmdshell
procedure.
The @.FileUNCPath variable contains the UNC path of the file and it has
correct value.
The SQL server service and Sql server agent service are running under
CSQL5 windows account. CSQL5 has full access to the files I am trying to
delete. But when I try to delete the file using the following statements,
@.Result is always 1 and the file does not get deleted.
So please help. Thanks in advance.
SET @.ShellCommand = 'delete "'+@.FileUNCPath+'"'
EXEC @.Result = master..xp_cmdshell @.ShellCommandYour OS use "delete" or "del", check the correct command to be used.
AMB
"sql" wrote:

> Hi all,
> I need to delete files using UNC path of the file in xp_cmdshell
> procedure.
> The @.FileUNCPath variable contains the UNC path of the file and it has
> correct value.
> The SQL server service and Sql server agent service are running under
> CSQL5 windows account. CSQL5 has full access to the files I am trying to
> delete. But when I try to delete the file using the following statements,
> @.Result is always 1 and the file does not get deleted.
> So please help. Thanks in advance.
> SET @.ShellCommand = 'delete "'+@.FileUNCPath+'"'
> EXEC @.Result = master..xp_cmdshell @.ShellCommand
>
>|||Try these examples to see if you get any more info on what the command is
actually doing:
CREATE TABLE #Errors (Results VARCHAR(1000))
INSERT INTO #Errors (FName)
exec @.Return = master..xp_cmdshell @.Cmd
DECLARE @.cmd sysname, @.var sysname
SET @.var = 'Hello world'
SET @.cmd = 'echo ' + @.var + ' > var_out.txt'
EXEC master..xp_cmdshell @.cmd
Andrew J. Kelly SQL MVP
"sql" <donotspam@.nospaml.com> wrote in message
news:eKsGUWsOFHA.3072@.TK2MSFTNGP09.phx.gbl...
> Hi all,
> I need to delete files using UNC path of the file in xp_cmdshell
> procedure.
> The @.FileUNCPath variable contains the UNC path of the file and it has
> correct value.
> The SQL server service and Sql server agent service are running under
> CSQL5 windows account. CSQL5 has full access to the files I am trying to
> delete. But when I try to delete the file using the following statements,
> @.Result is always 1 and the file does not get deleted.
> So please help. Thanks in advance.
> SET @.ShellCommand = 'delete "'+@.FileUNCPath+'"'
> EXEC @.Result = master..xp_cmdshell @.ShellCommand
>

Problem Deleting Duplicate Data

I have a table that contains more than 10,000 rows of

duplicate data. The script below copies the data to a temp table then

deletes from the original table. My problem is that after it runs, I now

have 122 rows of triplicate data (but dups are gone). If I rerun the script, it doesn't see the

triplicate data and returns 0 rows. I've use three different versions of

delete dup row scripts with the same result. There are no triggers or

constraints on the table, not even a primary key. What am I missing?

-

/**********************************************
Delete Duplicate Data
**********************************************/

--Create temp table to hold duplicate data
CREATE TABLE #tempduplicatedata
(
[student_test_uniq] [bigint] NULL,
[test_uniq] [int] NULL,
[concept_id] [smallint] NULL,
[test_id] [varchar](12) NULL,
[questions_correct] [smallint] NULL,
[questions_count] [smallint] NULL,
[percentage_correct] [decimal](6, 3) NULL,
[concept_response_count] [smallint] NULL
)

--Identify and save dup data into temp table
INSERT INTO #tempduplicatedata
SELECT * FROM crt_concept_score
GROUP BY student_test_uniq,
test_uniq,
concept_id,
test_id,
questions_correct,
questions_count,
percentage_correct,
concept_response_count
HAVING COUNT(*) > 1

--Confirm number of dup rows
SELECT @.@.ROWCOUNT AS 'Number of Duplicate Rows'

--Delete dup from original table
DELETE FROM crt_concept_score
FROM crt_concept_score
INNER JOIN #tempduplicatedata
ON crt_concept_score.student_test_uniq = #tempduplicatedata.student_test_uniq
AND crt_concept_score.test_uniq = #tempduplicatedata.test_uniq
AND crt_concept_score.concept_id = #tempduplicatedata.concept_id
AND crt_concept_score.test_id = #tempduplicatedata.test_id
AND crt_concept_score.questions_correct = #tempduplicatedata.questions_correct
AND crt_concept_score.questions_count = #tempduplicatedata.questions_count
AND crt_concept_score.percentage_correct = #tempduplicatedata.percentage_correct
AND crt_concept_score.concept_response_count = #tempduplicatedata.concept_response_count

--Insert the delete data back
INSERT INTO crt_concept_score
SELECT * FROM #tempduplicatedata

--Check for dup data.
SELECT * FROM crt_concept_score
GROUP BY student_test_uniq,
test_uniq,
concept_id,
test_id,
questions_correct,
questions_count,
percentage_correct,
concept_response_count
HAVING COUNT(*) > 1

--Check table
-- SELECT * FROM crt_concept_score

--Drop temp table
DROP TABLE #tempduplicatedata
GO

i've seen something like this in one of Kat's post

here's the link

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=746636&SiteID=1

problem deleting database using enterprise manager

I am trying to delete a database using Enterprise Manager. It seems like
everything works fine, the db is gone from the Databases tree, but when I
try to create a new database with the same name as the one I just deleted, I
get an error stating that the database exists. Also if I try to delete a
login associated to the deleted database, I get the error that it cannot be
deleted because it owns objects in the deleted db. I really don't understand
what's going on here. Could anybody help me out?Richard
Have you REFRESH the EM after droping db?
"Richard Gjerde" <richard_gjerde@.yahoo.no> wrote in message
news:fdKNd.7739$IW4.168987@.news2.e.nsc.no...
> I am trying to delete a database using Enterprise Manager. It seems like
> everything works fine, the db is gone from the Databases tree, but when I
> try to create a new database with the same name as the one I just deleted,
I
> get an error stating that the database exists. Also if I try to delete a
> login associated to the deleted database, I get the error that it cannot
be
> deleted because it owns objects in the deleted db. I really don't
understand
> what's going on here. Could anybody help me out?
>|||Well, I just did:-) And the db came up as "suspect". When I dropped it again
it was OK.
So the problem sort of disappeared, but I am still unsure about why it
ocurred in the first place.
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23OH5euRDFHA.512@.TK2MSFTNGP15.phx.gbl...
> Richard
> Have you REFRESH the EM after droping db?
>
> "Richard Gjerde" <richard_gjerde@.yahoo.no> wrote in message
> news:fdKNd.7739$IW4.168987@.news2.e.nsc.no...
I[vbcol=seagreen]
deleted,[vbcol=seagreen]
> I
> be
> understand
>|||Richard
I prefer using DROP Database by QA not by EM.
"Richard Gjerde" <richard_gjerde@.yahoo.no> wrote in message
news:sEKNd.7744$IW4.168621@.news2.e.nsc.no...
> Well, I just did:-) And the db came up as "suspect". When I dropped it
again
> it was OK.
> So the problem sort of disappeared, but I am still unsure about why it
> ocurred in the first place.
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:%23OH5euRDFHA.512@.TK2MSFTNGP15.phx.gbl...
like[vbcol=seagreen]
when[vbcol=seagreen]
> I
> deleted,
a[vbcol=seagreen]
cannot[vbcol=seagreen]
>

problem deleting database using enterprise manager

I am trying to delete a database using Enterprise Manager. It seems like
everything works fine, the db is gone from the Databases tree, but when I
try to create a new database with the same name as the one I just deleted, I
get an error stating that the database exists. Also if I try to delete a
login associated to the deleted database, I get the error that it cannot be
deleted because it owns objects in the deleted db. I really don't understand
what's going on here. Could anybody help me out?
Richard
Have you REFRESH the EM after droping db?
"Richard Gjerde" <richard_gjerde@.yahoo.no> wrote in message
news:fdKNd.7739$IW4.168987@.news2.e.nsc.no...
> I am trying to delete a database using Enterprise Manager. It seems like
> everything works fine, the db is gone from the Databases tree, but when I
> try to create a new database with the same name as the one I just deleted,
I
> get an error stating that the database exists. Also if I try to delete a
> login associated to the deleted database, I get the error that it cannot
be
> deleted because it owns objects in the deleted db. I really don't
understand
> what's going on here. Could anybody help me out?
>
|||Well, I just did:-) And the db came up as "suspect". When I dropped it again
it was OK.
So the problem sort of disappeared, but I am still unsure about why it
ocurred in the first place.
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23OH5euRDFHA.512@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> Richard
> Have you REFRESH the EM after droping db?
>
> "Richard Gjerde" <richard_gjerde@.yahoo.no> wrote in message
> news:fdKNd.7739$IW4.168987@.news2.e.nsc.no...
I[vbcol=seagreen]
deleted,
> I
> be
> understand
>
|||Richard
I prefer using DROP Database by QA not by EM.
"Richard Gjerde" <richard_gjerde@.yahoo.no> wrote in message
news:sEKNd.7744$IW4.168621@.news2.e.nsc.no...
> Well, I just did:-) And the db came up as "suspect". When I dropped it
again[vbcol=seagreen]
> it was OK.
> So the problem sort of disappeared, but I am still unsure about why it
> ocurred in the first place.
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:%23OH5euRDFHA.512@.TK2MSFTNGP15.phx.gbl...
like[vbcol=seagreen]
when[vbcol=seagreen]
> I
> deleted,
a[vbcol=seagreen]
cannot
>

problem deleting database using enterprise manager

I am trying to delete a database using Enterprise Manager. It seems like
everything works fine, the db is gone from the Databases tree, but when I
try to create a new database with the same name as the one I just deleted, I
get an error stating that the database exists. Also if I try to delete a
login associated to the deleted database, I get the error that it cannot be
deleted because it owns objects in the deleted db. I really don't understand
what's going on here. Could anybody help me out?Richard
Have you REFRESH the EM after droping db?
"Richard Gjerde" <richard_gjerde@.yahoo.no> wrote in message
news:fdKNd.7739$IW4.168987@.news2.e.nsc.no...
> I am trying to delete a database using Enterprise Manager. It seems like
> everything works fine, the db is gone from the Databases tree, but when I
> try to create a new database with the same name as the one I just deleted,
I
> get an error stating that the database exists. Also if I try to delete a
> login associated to the deleted database, I get the error that it cannot
be
> deleted because it owns objects in the deleted db. I really don't
understand
> what's going on here. Could anybody help me out?
>|||Well, I just did:-) And the db came up as "suspect". When I dropped it again
it was OK.
So the problem sort of disappeared, but I am still unsure about why it
ocurred in the first place.
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23OH5euRDFHA.512@.TK2MSFTNGP15.phx.gbl...
> Richard
> Have you REFRESH the EM after droping db?
>
> "Richard Gjerde" <richard_gjerde@.yahoo.no> wrote in message
> news:fdKNd.7739$IW4.168987@.news2.e.nsc.no...
> > I am trying to delete a database using Enterprise Manager. It seems like
> > everything works fine, the db is gone from the Databases tree, but when
I
> > try to create a new database with the same name as the one I just
deleted,
> I
> > get an error stating that the database exists. Also if I try to delete a
> > login associated to the deleted database, I get the error that it cannot
> be
> > deleted because it owns objects in the deleted db. I really don't
> understand
> > what's going on here. Could anybody help me out?
> >
> >
>|||Richard
I prefer using DROP Database by QA not by EM.
"Richard Gjerde" <richard_gjerde@.yahoo.no> wrote in message
news:sEKNd.7744$IW4.168621@.news2.e.nsc.no...
> Well, I just did:-) And the db came up as "suspect". When I dropped it
again
> it was OK.
> So the problem sort of disappeared, but I am still unsure about why it
> ocurred in the first place.
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:%23OH5euRDFHA.512@.TK2MSFTNGP15.phx.gbl...
> > Richard
> > Have you REFRESH the EM after droping db?
> >
> >
> > "Richard Gjerde" <richard_gjerde@.yahoo.no> wrote in message
> > news:fdKNd.7739$IW4.168987@.news2.e.nsc.no...
> > > I am trying to delete a database using Enterprise Manager. It seems
like
> > > everything works fine, the db is gone from the Databases tree, but
when
> I
> > > try to create a new database with the same name as the one I just
> deleted,
> > I
> > > get an error stating that the database exists. Also if I try to delete
a
> > > login associated to the deleted database, I get the error that it
cannot
> > be
> > > deleted because it owns objects in the deleted db. I really don't
> > understand
> > > what's going on here. Could anybody help me out?
> > >
> > >
> >
> >
>

Problem deleting

I have a sick subscriber in a transactional replication.
I want to delete it but I don't succeed.
When I try from Tools\Replication\Create and manage publications Entreprise Manager crush.
I try with
exec sp_dropsubscription @.publication = N'PublicationName', @.article = N'all', @.subscriber = N'SubscriberName', @.destination_db = N'DatabaseName' but execution take a long, long time ..without any end.
I don't want to delete all replication.
Any ideeas?
10x a lot!Whats the size of Subscriber?
Check for any other errors from SQL error log.|||In the end I deleted all replication and recreated it. Now it's working.