Showing posts with label delete. Show all posts
Showing posts with label delete. Show all posts

Tuesday, March 20, 2012

Can't drop SQL Mobile subscription at Publisher

I have a program running on Pocket PCs that synchronizes with a desktop SQL database using SQL Mobile. My problem is that I can't delete old subscriptions from the publication; now the publication has 25 subscriptions and won't accept any more (limit of SQL Workgroup edition). I can delete non-SQL Mobile subcriptions just fine.

Running sp_replmonitorhelpsubscription provides this information:

subscriber: LVCONTACTSMERGE - 5FA305234F0C
subscriber_db: Program Files\PocketLVContacts\LVContacts.sdf
publisher_db: LVContacts
publication: LVContactsMerge

So I set up this bit of code:

USE LVContacts
EXEC sp_dropmergesubscription
@.publication = 'LVContactsMerge',
@.subscriber = 'LVCONTACTSMERGE - 5FA305234F0C',
@.subscriber_db = 'Program Files\PocketLVContacts\LVContacts.sdf',
@.subscription_type='all';
GO

No errors are reported, but the subscription doesn't get deleted.

I've tried shutting down SQL Server Agent (mentioned in another thread); makes no difference.

Any ideas?

--Evan

If you query sysmergesubscriptions, do you get the same values returned as|||

If you query sysmergesubscriptions, do you get the same values returned as sp_replmonitorhelpsubscription? I'm just wondering if the subscriber_db name returned is correct or not.

|||

Yes, both sysmergesubscriptions and sp_replmonitorhelpsubscription give the same subscriber_db name. Note that the name returned, i.e. 'Program Files\PocketLVContacts\LVContactsData.sdf', is the path on the mobile device.

I wonder if it is safe to manually delete a row from sysmergesubscriptions. It seems to work, but no Distributor clean-up is done.

|||

I've found where I was going wrong. The code I cited in my original post DOES work, but to see the changes you must use sysmergesubscriptions, NOT sp_replmonitorhelpsubscription. The latter apparently reflects the distribution database, which is not cleaned up when you use sp_dropmergesubscription.

When you use SQL Server Management Studio to delete a subscription on a mobile device running SQL Mobile, the subscription on the Publisher is NOT also deleted; you must do it manually (or wait until the subscription expires). But it is difficult to determine which subscription on the Publisher corresponds to the one you want to delete on the mobile Subscriber. What I did was first query the mobile Subscriber system table __sysMergeSubscriptions, note the SubscriptionID field, then query the sysmergesubscriptions on the Publisher database, and find the row with a SubID that matches. Then you can run sp_dropmergesubscription using the subscriber_server field as @.subscriber and the db_name field as @.subscriber_db.

Can't drop constraint

Hello,
I am using SS7.
I have a table with a column "yn_LockOut" with a default set to 0. I tried
to delete the column and got the following:
'tblGuidelineResponseOwner' table
- Error modifying column properties for 'yn_LockOut'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL
Server]'DF_tblGuideLineResponse_yn_LockOut' is not a constraint.
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not drop constraint.
See previous errors.
When I ran exec sp_helpconstraint 'tblGuidelineResponseOwner', I got:
constraint_type constraint_name
DEFAULT on column yn_LockOut DF_tblGuideLineResponse_yn_LockOut
I ran:
alter table tblGuidelineResponseOwner DROP CONSTRAINT
DF_tblGuideLineResponse_yn_LockOut
and got the error message:
'DF_tblGuideLineResponse_yn_LockOut' is not a constraint.
Server: Msg 3727, Level 16, State 1, Line 5
Could not drop constraint. See previous errors.
Any help with this would be appreciated.
--
Thanks in advance,
StevenSteven,
Check sp_unbindefault in BOL.
-Mark
This positing is as is
>--Original Message--
>Hello,
>I am using SS7.
>I have a table with a column "yn_LockOut" with a default
set to 0. I tried
>to delete the column and got the following:
>'tblGuidelineResponseOwner' table
>- Error modifying column properties for 'yn_LockOut'.
>ODBC error: [Microsoft][ODBC SQL Server Driver][SQL
>Server]'DF_tblGuideLineResponse_yn_LockOut' is not a
constraint.
>[Microsoft][ODBC SQL Server Driver][SQL Server]Could not
drop constraint.
>See previous errors.
>
>When I ran exec
sp_helpconstraint 'tblGuidelineResponseOwner', I got:
>constraint_type
constraint_name
>DEFAULT on column yn_LockOut
DF_tblGuideLineResponse_yn_LockOut
>
>I ran:
>alter table tblGuidelineResponseOwner DROP CONSTRAINT
>DF_tblGuideLineResponse_yn_LockOut
>and got the error message:
>'DF_tblGuideLineResponse_yn_LockOut' is not a constraint.
>Server: Msg 3727, Level 16, State 1, Line 5
>Could not drop constraint. See previous errors.
>Any help with this would be appreciated.
>--
>Thanks in advance,
>Steven
>
>.
>sql

Sunday, March 11, 2012

Can't delete Web Assistant task

I used the Web Assistant tool to monitor a couple of tables. When I was fin
ished with the monitoring after a couple of weeks, I didn't want to monitor
the tables anymore. I deleted the proceedure, and now when I add data to th
e tables, I get an error me
ssage:
Failed@.CDBBaseGroupObj::dbwrite attribute xref.Database error:[Microsoft][ODBC SQL Serv
er Driver][SQL Server] SQL Web Assistant: Could not execute the SQL statemen
t.
I click "OK" on the error message and proceed as normal.
Can anyone point me in the right direction of getting rid of this error mess
age popping up?
thanks,
SKClarkWhen you select the option to monitor tables in the Web Assistant, it
also creates triggers. If all you did was manually drop the stored
procedure, then the triggers likley still exist. At this point you'll
need to delete them manually. In future, use sp_dropwebtask, which
will clean up all of the objects.
-- Mary
MCW Technologies
http://www.mcwtech.com
On Tue, 10 Feb 2004 08:51:08 -0800, "SKClark"
<anonymous@.discussions.microsoft.com> wrote:

>I used the Web Assistant tool to monitor a couple of tables. When I was finished w
ith the monitoring after a couple of weeks, I didn't want to monitor the tables anym
ore. I deleted the proceedure, and now when I add data to the tables, I get an erro
r m
essage:
>Failed@.CDBBaseGroupObj::dbwrite attribute xref.Database error:[Microsoft][ODBC SQL Ser
ver Driver][SQL Server] SQL Web Assistant: Could not execute the SQL stateme
nt.
>I click "OK" on the error message and proceed as normal.
>Can anyone point me in the right direction of getting rid of this error mes
sage popping up?
>thanks,
>SKClark|||cool...I found 3 triggers attached to a table. I deleted them and now the
error message doesn't show up anymore.
Thanks for your help!!! :-)
-- Mary Chipman wrote: --
When you select the option to monitor tables in the Web Assistant, it
also creates triggers. If all you did was manually drop the stored
procedure, then the triggers likley still exist. At this point you'll
need to delete them manually. In future, use sp_dropwebtask, which
will clean up all of the objects.
-- Mary
MCW Technologies
http://www.mcwtech.com
On Tue, 10 Feb 2004 08:51:08 -0800, "SKClark"
<anonymous@.discussions.microsoft.com> wrote:

>I used the Web Assistant tool to monitor a couple of tables. When I was finished w
ith the monitoring after a couple of weeks, I didn't want to monitor the tables anym
ore. I deleted the proceedure, and now when I add data to the tables, I get an er[/
color]
ror message:
>thanks,
>SKClark

Cant delete user table

I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
The type and xtype in sysobjects are both U. They show up in object browser
under user tables. When I try to delete them I get the following message:
You tried to delete one or more system objects. They were not deleted.
Anyone have any ideas as to what is going on here and how I can delete these?
Can you mention the name of these tables?
Thanks
GYK
"Lyle" wrote:

> I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
> The type and xtype in sysobjects are both U. They show up in object browser
> under user tables. When I try to delete them I get the following message:
> You tried to delete one or more system objects. They were not deleted.
> Anyone have any ideas as to what is going on here and how I can delete these?
|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_History_Detai l
conflict_pubInvHist_Head_Det_Invoice_History_Heade r
conflict_PubInvoice_Head_Det_Invoice_History_Detai l
conflict_PubInvoice_Head_Det_Invoice_History_Heade r
Lyle
"GYK" wrote:
[vbcol=seagreen]
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:
|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_History_Detai l
conflict_pubInvHist_Head_Det_Invoice_History_Heade r
conflict_PubInvoice_Head_Det_Invoice_History_Detai l
conflict_PubInvoice_Head_Det_Invoice_History_Heade r
Lyle
"GYK" wrote:
[vbcol=seagreen]
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:
|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_History_Detai l
conflict_pubInvHist_Head_Det_Invoice_History_Heade r
conflict_PubInvoice_Head_Det_Invoice_History_Detai l
conflict_PubInvoice_Head_Det_Invoice_History_Heade r
Lyle
"GYK" wrote:
[vbcol=seagreen]
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:

Cant delete user table

I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
The type and xtype in sysobjects are both U. They show up in object browser
under user tables. When I try to delete them I get the following message:
You tried to delete one or more system objects. They were not deleted.
Anyone have any ideas as to what is going on here and how I can delete these?Can you mention the name of these tables?
Thanks
GYK
"Lyle" wrote:
> I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
> The type and xtype in sysobjects are both U. They show up in object browser
> under user tables. When I try to delete them I get the following message:
> You tried to delete one or more system objects. They were not deleted.
> Anyone have any ideas as to what is going on here and how I can delete these?|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_History_Detail
conflict_pubInvHist_Head_Det_Invoice_History_Header
conflict_PubInvoice_Head_Det_Invoice_History_Detail
conflict_PubInvoice_Head_Det_Invoice_History_Header
Lyle
"GYK" wrote:
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:
> > I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
> > The type and xtype in sysobjects are both U. They show up in object browser
> > under user tables. When I try to delete them I get the following message:
> >
> > You tried to delete one or more system objects. They were not deleted.
> >
> > Anyone have any ideas as to what is going on here and how I can delete these?|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_History_Detail
conflict_pubInvHist_Head_Det_Invoice_History_Header
conflict_PubInvoice_Head_Det_Invoice_History_Detail
conflict_PubInvoice_Head_Det_Invoice_History_Header
Lyle
"GYK" wrote:
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:
> > I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
> > The type and xtype in sysobjects are both U. They show up in object browser
> > under user tables. When I try to delete them I get the following message:
> >
> > You tried to delete one or more system objects. They were not deleted.
> >
> > Anyone have any ideas as to what is going on here and how I can delete these?|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_History_Detail
conflict_pubInvHist_Head_Det_Invoice_History_Header
conflict_PubInvoice_Head_Det_Invoice_History_Detail
conflict_PubInvoice_Head_Det_Invoice_History_Header
Lyle
"GYK" wrote:
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:
> > I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
> > The type and xtype in sysobjects are both U. They show up in object browser
> > under user tables. When I try to delete them I get the following message:
> >
> > You tried to delete one or more system objects. They were not deleted.
> >
> > Anyone have any ideas as to what is going on here and how I can delete these?

Cant delete user table

I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
The type and xtype in sysobjects are both U. They show up in object browser
under user tables. When I try to delete them I get the following message:
You tried to delete one or more system objects. They were not deleted.
Anyone have any ideas as to what is going on here and how I can delete these
?Can you mention the name of these tables?
Thanks
GYK
"Lyle" wrote:
[vbcol=seagreen]
> I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
> The type and xtype in sysobjects are both U. They show up in object brows
er
> under user tables. When I try to delete them I get the following message:
> You tried to delete one or more system objects. They were not deleted.
> Anyone have any ideas as to what is going on here and how I can delete these?[/vbc
ol]|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_His
tory_Detail
conflict_pubInvHist_Head_Det_Invoice_His
tory_Header
conflict_PubInvoice_Head_Det_Invoice_His
tory_Detail
conflict_PubInvoice_Head_Det_Invoice_His
tory_Header
Lyle
"GYK" wrote:
[vbcol=seagreen]
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:
>|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_His
tory_Detail
conflict_pubInvHist_Head_Det_Invoice_His
tory_Header
conflict_PubInvoice_Head_Det_Invoice_His
tory_Detail
conflict_PubInvoice_Head_Det_Invoice_His
tory_Header
Lyle
"GYK" wrote:
[vbcol=seagreen]
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:
>|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_His
tory_Detail
conflict_pubInvHist_Head_Det_Invoice_His
tory_Header
conflict_PubInvoice_Head_Det_Invoice_His
tory_Detail
conflict_PubInvoice_Head_Det_Invoice_His
tory_Header
Lyle
"GYK" wrote:
[vbcol=seagreen]
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:
>

Can't delete subscription

Hello,

I delete the publication, but the subscription still exists.

If I will delete the abonement I get following error 21776(Can't find Name xxx in the list of the TransPublications).

I tryed to craete the publication for the failed subscription again, but then I get the error, that a subscription for this publication still exists.

What can I do? How can I delete the subscription ?

Many thx for help!

Which SQL version are you using? Do you use scripts or UI to drop publication and subscription? Is subscription pull and located on the remote server? Could you please provide detailed repro step by step?

Thanks

Yunjing

|||

hello,

we use sql server 2000 and droped the replication via tsql

subscription is push and located on the remote server. I think I must delete all informations manuell in the server protocols, but how?

thx

Can't delete SQL user because they own objects

How do I find out what objects they own and then how do I drop those objects
so I can delete the user?
Goto Security >>
Logins >>
Properties of the User you want to delete >>
"Database Access" Tab >>
under the "User" column , you will find all of the databases he owns
because "dbo" will be showing, then you can delete the db's if you want
"Dan Marth" <danmarth@.earthlink.net> wrote in message
news:Oo7Kj5bGEHA.3188@.TK2MSFTNGP10.phx.gbl...
> How do I find out what objects they own and then how do I drop those
objects
> so I can delete the user?
>
|||Hi Dan
You could run the following:
select table_name, table_type from information_schema.tables
where table_schema = 'user_name'
This will return both tables and views. You can use DROP TABLE for the
tables and DROP VIEW for the views, and you must preface the object name
with the user_name of the owner in the drop command.
You could also just change the owner of these objects with
sp_ChangeObjectOwner if you don't want to drop them.
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Dan Marth" <danmarth@.earthlink.net> wrote in message
news:Oo7Kj5bGEHA.3188@.TK2MSFTNGP10.phx.gbl...
> How do I find out what objects they own and then how do I drop those
objects
> so I can delete the user?
>
|||So I have to do it table by table or is there someway to find out what
objects the user owns? There are close to a hundred tables in the database
that I want to delete the user from. Seems like there should be a better
way and yes I don't want to delete any database objects (I guess I worded
that wrong) just change ownership or whatever it takes to delete the user.
Thanks,
Dan
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:%23$NADUcGEHA.704@.tk2msftngp13.phx.gbl...
> Hi Dan
> You could run the following:
> select table_name, table_type from information_schema.tables
> where table_schema = 'user_name'
> This will return both tables and views. You can use DROP TABLE for the
> tables and DROP VIEW for the views, and you must preface the object name
> with the user_name of the owner in the drop command.
> You could also just change the owner of these objects with
> sp_ChangeObjectOwner if you don't want to drop them.
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "Dan Marth" <danmarth@.earthlink.net> wrote in message
> news:Oo7Kj5bGEHA.3188@.TK2MSFTNGP10.phx.gbl...
> objects
>
|||Two possibilities, both of which use undocumented features:
1. Direct update of system tables. If you've never done this before, this is
not a good time to start.
update sysobjects
set uid = <user_id of some other user>
where uid = <uid of user you want to delete.
2. Use the undocumented procedure sp_execresultset to build a select
statement that generates the sp_changeobjectowner commands, and then
executes them. This is a little tricky, so you should practice in a test db
first.
First construct the select that builds the commands:
select 'exec sp_changeobjectowner [olduser.' + table_name + '], newuser'
from information_schema.tables
where table_schema = 'olduser'
Substitute usernames as appropriate. When you run the above you should get a
whole bunch of EXEC sp_changeobjectowner commands in the result window. You
can either copy from the result window, and paste into the query window, and
execute, OR
wrap the whole thing in sp_execresultset.
All the quotes in the original command must be turned into two single quotes
in the new command, because the whole thing (the argument to
sp_execresultset) is wrapped in single quotes:
exec sp_execresultset 'select ''exec sp_changeobjectowner [olduser.'' +
table_name + ''], newuser'' from information_schema.tables
where table_schema = ''olduser'' '
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Dan Marth" <danmarth@.earthlink.net> wrote in message
news:#Fg$EqeGEHA.1396@.TK2MSFTNGP11.phx.gbl...
> So I have to do it table by table or is there someway to find out what
> objects the user owns? There are close to a hundred tables in the
database
> that I want to delete the user from. Seems like there should be a better
> way and yes I don't want to delete any database objects (I guess I worded
> that wrong) just change ownership or whatever it takes to delete the user.
> Thanks,
> Dan
> "Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
> news:%23$NADUcGEHA.704@.tk2msftngp13.phx.gbl...
>

Can't delete SQL user because they own objects

How do I find out what objects they own and then how do I drop those objects
so I can delete the user?Goto Security >>
Logins >>
Properties of the User you want to delete >>
"Database Access" Tab >>
under the "User" column , you will find all of the databases he owns
because "dbo" will be showing, then you can delete the db's if you want
"Dan Marth" <danmarth@.earthlink.net> wrote in message
news:Oo7Kj5bGEHA.3188@.TK2MSFTNGP10.phx.gbl...
> How do I find out what objects they own and then how do I drop those
objects
> so I can delete the user?
>|||Hi Dan
You could run the following:
select table_name, table_type from information_schema.tables
where table_schema = 'user_name'
This will return both tables and views. You can use DROP TABLE for the
tables and DROP VIEW for the views, and you must preface the object name
with the user_name of the owner in the drop command.
You could also just change the owner of these objects with
sp_ChangeObjectOwner if you don't want to drop them.
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Dan Marth" <danmarth@.earthlink.net> wrote in message
news:Oo7Kj5bGEHA.3188@.TK2MSFTNGP10.phx.gbl...
> How do I find out what objects they own and then how do I drop those
objects
> so I can delete the user?
>|||So I have to do it table by table or is there someway to find out what
objects the user owns? There are close to a hundred tables in the database
that I want to delete the user from. Seems like there should be a better
way and yes I don't want to delete any database objects (I guess I worded
that wrong) just change ownership or whatever it takes to delete the user.
Thanks,
Dan
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:%23$NADUcGEHA.704@.tk2msftngp13.phx.gbl...
> Hi Dan
> You could run the following:
> select table_name, table_type from information_schema.tables
> where table_schema = 'user_name'
> This will return both tables and views. You can use DROP TABLE for the
> tables and DROP VIEW for the views, and you must preface the object name
> with the user_name of the owner in the drop command.
> You could also just change the owner of these objects with
> sp_ChangeObjectOwner if you don't want to drop them.
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "Dan Marth" <danmarth@.earthlink.net> wrote in message
> news:Oo7Kj5bGEHA.3188@.TK2MSFTNGP10.phx.gbl...
> objects
>|||Two possibilities, both of which use undocumented features:
1. Direct update of system tables. If you've never done this before, this is
not a good time to start.
update sysobjects
set uid = <user_id of some other user>
where uid = <uid of user you want to delete.
2. Use the undocumented procedure sp_execresultset to build a select
statement that generates the sp_changeobjectowner commands, and then
executes them. This is a little tricky, so you should practice in a test db
first.
First construct the select that builds the commands:
select 'exec sp_changeobjectowner [olduser.' + table_name + '], newuser
'
from information_schema.tables
where table_schema = 'olduser'
Substitute usernames as appropriate. When you run the above you should get a
whole bunch of EXEC sp_changeobjectowner commands in the result window. You
can either copy from the result window, and paste into the query window, and
execute, OR
wrap the whole thing in sp_execresultset.
All the quotes in the original command must be turned into two single quotes
in the new command, because the whole thing (the argument to
sp_execresultset) is wrapped in single quotes:
exec sp_execresultset 'select ''exec sp_changeobjectowner [olduser.'' +
table_name + ''], newuser'' from information_schema.tables
where table_schema = ''olduser'' '
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Dan Marth" <danmarth@.earthlink.net> wrote in message
news:#Fg$EqeGEHA.1396@.TK2MSFTNGP11.phx.gbl...
> So I have to do it table by table or is there someway to find out what
> objects the user owns? There are close to a hundred tables in the
database
> that I want to delete the user from. Seems like there should be a better
> way and yes I don't want to delete any database objects (I guess I worded
> that wrong) just change ownership or whatever it takes to delete the user.
> Thanks,
> Dan
> "Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
> news:%23$NADUcGEHA.704@.tk2msftngp13.phx.gbl...
>

Can't delete SQL 2005 user from SQL 2000 database

I have a SQL 2000 database from another system. The database has user
IIS_WPG.
I restore a backup of this to a SQL 2005 database (working on a migration to
SQL 2005). Since IIS_WPG is not a Security Login on SQL 2005, when I go to
delete the database user IIS_WPG, it fails with "Drop failed for user
IIS_WPG".
How can I delete this user from the database instance?
Thanks. AmilThe fact that the DB came from SQL 2000 originally ought to be
irrelevant. As soon as you restore it on the SQL 2005 server it becomes
a SQL 2005 database (albeit in 8.0 compatibility mode but that's also
not important). You should be able to drop any users of the DB (except
dbo, which is a special user) with a simple DROP USER
<http://msdn2.microsoft.com/en-us/library/ms189438.aspx> statement in
T-SQL. For example:
use MyDB;
drop user IIS_WPG;
If this doesn't work can you please post the exactly error message that
SQL Server raises. Also posting the result of:
use MyDB;
select current_user;
select
principal_id,
cast(name as varchar(50)) as name,
type_desc
from sys.database_principals
where is_fixed_role = 0;
might help troubleshooting.
*mike hodgson*
http://sqlnerd.blogspot.com
Amil Hanish wrote:

>I have a SQL 2000 database from another system. The database has user
>IIS_WPG.
>I restore a backup of this to a SQL 2005 database (working on a migration t
o
>SQL 2005). Since IIS_WPG is not a Security Login on SQL 2005, when I go to
>delete the database user IIS_WPG, it fails with "Drop failed for user
>IIS_WPG".
>How can I delete this user from the database instance?
>Thanks. Amil
>
>|||Mike, that didn't work.
The iis_wpg user doesn't appear in the Security | Logins so I don't know why
it's complaining. Here is the query info.
use mydb;
drop user iis_wpg
Msg 15138, Level 16, State 1, Line 2
The database principal owns a schema in the database, and cannot be dropped.
=======================
use mydb;
select current_user;
select
principal_id,
cast(name as varchar(50)) as name,
type_desc
from sys.database_principals
where is_fixed_role = 0;
0 public DATABASE_ROLE
1 dbo WINDOWS_USER
2 guest SQL_USER
3 INFORMATION_SCHEMA SQL_USER
4 sys SQL_USER
5 ASPNET WINDOWS_USER
6 IIS_WPG WINDOWS_GROUP
"Mike Hodgson" <e1minst3r@.gmail.com> wrote in message
news:ufZs8F%23cGHA.3888@.TK2MSFTNGP02.phx.gbl...
> The fact that the DB came from SQL 2000 originally ought to be
> irrelevant. As soon as you restore it on the SQL 2005 server it becomes
> a SQL 2005 database (albeit in 8.0 compatibility mode but that's also
> not important). You should be able to drop any users of the DB (except
> dbo, which is a special user) with a simple DROP USER
> <http://msdn2.microsoft.com/en-us/library/ms189438.aspx> statement in
> T-SQL. For example:
> use MyDB;
> drop user IIS_WPG;
> If this doesn't work can you please post the exactly error message that
> SQL Server raises. Also posting the result of:
> use MyDB;
> select current_user;
> select
> principal_id,
> cast(name as varchar(50)) as name,
> type_desc
> from sys.database_principals
> where is_fixed_role = 0;
> might help troubleshooting.
> --
> *mike hodgson*
> http://sqlnerd.blogspot.com
>
> Amil Hanish wrote:
>
>|||Ah. Now we're getting somewhere. The IIS_WPG user owns a schema! OK,
you have 2 options: 1) transfer the ownership of the schema(s) owned by
IIS_WPG to a different user in the database or 2) drop the schema(s)
owned by IIS_WPG.
First you need to know which schema(s) IIS_WPG owns (obviously this
should all be done in the context of the database in question):
use myDB;
select s.* from sys.schemas as s
inner join sys.database_principals as dp on dp.principal_id =
s.principal_id
where dp.[name] = 'IIS_WPG';
Next you should check to see if there are any objects within that/those
schema(s):
select s.[name] as schemaname, o.[name] as objectname, o.type_desc
from sys.objects as o
inner join sys.schemas as s on s.schema_id = o.schema_id
inner join sys.database_principals as dp on dp.principal_id =
s.principal_id
where dp.[name] = 'IIS_WPG'
order by s.[name], o.type_desc, o.[name];
If there any no objects in the schema then you may as well just drop the
schema and be done with it:
drop schema foo;
where foo is the name of the schema. (Do this for each schema you want
to drop.) However, if the schema contains objects (views, tables,
procs, functions, etc.) that you wish to keep then you should either
transfer them to another schema (so you can drop their original schema,
which is owned by IIS_WPG) with the ALTER SCHEMA statement or transfer
ownership of the schema(s) that IIS_WPG currently owns. Transferring
ownership is easier and less likely to break code referencing those
objects. You transfer ownership with the ALTER AUTHORIZATION statement:
alter authorization on schema::foo to MyOtherDBUser;
where foo is the name of the schema you're transferring ownership of and
MyOtherDBUser is another user in the DB to which you wish to transfer
ownership (the dbo user is always a potential candidate). You'd do this
for each schema owned by IIS_WPG.
After all that the IIS_WPG user shouldn't own any schemas any more and
you should be able to drop the user with a DROP USER statement:
drop user IIS_WPG;
This is all documented in BOL if you need any more info about any of
these individual statements (including the sys.objects, sys.schemas &
sys.database_principals catalog views).
Hope this helps.
*mike hodgson*
http://sqlnerd.blogspot.com
Amil Hanish wrote:

>Mike, that didn't work.
>The iis_wpg user doesn't appear in the Security | Logins so I don't know wh
y
>it's complaining. Here is the query info.
>use mydb;
>drop user iis_wpg
>Msg 15138, Level 16, State 1, Line 2
>The database principal owns a schema in the database, and cannot be dropped
.
>=======================
>use mydb;
> select current_user;
> select
> principal_id,
> cast(name as varchar(50)) as name,
> type_desc
> from sys.database_principals
> where is_fixed_role = 0;
>0 public DATABASE_ROLE
>1 dbo WINDOWS_USER
>2 guest SQL_USER
>3 INFORMATION_SCHEMA SQL_USER
>4 sys SQL_USER
>5 ASPNET WINDOWS_USER
>6 IIS_WPG WINDOWS_GROUP
>
>"Mike Hodgson" <e1minst3r@.gmail.com> wrote in message
>news:ufZs8F%23cGHA.3888@.TK2MSFTNGP02.phx.gbl...
>
>
>|||Mike...much thanks! All your info worked like a charm and without issues.
Since the schema had no object, I was able to simply delete. I'll save your
help in case I need it in the future.
Amil
"Mike Hodgson" <e1minst3r@.gmail.com> wrote in message
news:%233VIaFIdGHA.1208@.TK2MSFTNGP04.phx.gbl...
> Ah. Now we're getting somewhere. The IIS_WPG user owns a schema! OK,
> you have 2 options: 1) transfer the ownership of the schema(s) owned by
> IIS_WPG to a different user in the database or 2) drop the schema(s)
> owned by IIS_WPG.
> First you need to know which schema(s) IIS_WPG owns (obviously this
> should all be done in the context of the database in question):
> use myDB;
> select s.* from sys.schemas as s
> inner join sys.database_principals as dp on dp.principal_id =
> s.principal_id
> where dp.[name] = 'IIS_WPG';
> Next you should check to see if there are any objects within that/those
> schema(s):
> select s.[name] as schemaname, o.[name] as objectname, o.type_d
esc
> from sys.objects as o
> inner join sys.schemas as s on s.schema_id = o.schema_id
> inner join sys.database_principals as dp on dp.principal_id =
> s.principal_id
> where dp.[name] = 'IIS_WPG'
> order by s.[name], o.type_desc, o.[name];
> If there any no objects in the schema then you may as well just drop the
> schema and be done with it:
> drop schema foo;
> where foo is the name of the schema. (Do this for each schema you want
> to drop.) However, if the schema contains objects (views, tables,
> procs, functions, etc.) that you wish to keep then you should either
> transfer them to another schema (so you can drop their original schema,
> which is owned by IIS_WPG) with the ALTER SCHEMA statement or transfer
> ownership of the schema(s) that IIS_WPG currently owns. Transferring
> ownership is easier and less likely to break code referencing those
> objects. You transfer ownership with the ALTER AUTHORIZATION statement:
> alter authorization on schema::foo to MyOtherDBUser;
> where foo is the name of the schema you're transferring ownership of and
> MyOtherDBUser is another user in the DB to which you wish to transfer
> ownership (the dbo user is always a potential candidate). You'd do this
> for each schema owned by IIS_WPG.
> After all that the IIS_WPG user shouldn't own any schemas any more and
> you should be able to drop the user with a DROP USER statement:
> drop user IIS_WPG;
> This is all documented in BOL if you need any more info about any of
> these individual statements (including the sys.objects, sys.schemas &
> sys.database_principals catalog views).
> Hope this helps.
> --
> *mike hodgson*
> http://sqlnerd.blogspot.com
>
> Amil Hanish wrote:
>
>

Cant delete single record? HELP!

OK,

This one is driving me nuts. I've issued a very simple statement to delete a single row from a table. It appears that when I execute it in SQL Query Analyzer the CPUTime spikes and holds one of the CPUs on the box pegged at 100%. I've let this thing run for over a day, and it's not deleting the one damn record. Any thoughts? :confused: :confused: Here's the command I'm executing:

DELETE FROM Invoices WHERE InvoiceID = 153345

Running SELECT * FROM Invoices WHERE InvoiceID = 153345 returns only a single record as it should. InvoiceID is the PK in this table. Any and all help is greatly appreciated. I've rebooted the server, but to no avail. Same thing happens after a reboot.

TIAAny triggers on the table?|||Any triggers on the table?
No, no triggers on the table.|||Any triggles on this table?
No triggles either ;)|||what does the execution plan looks like for the delete statement?

Are there foreign key constraints on Invoices table ?
run something similar to the following:

select object_name(constid) as FkeyName,
object_name(fkeyid) as DependentTable from sysforeignkeys where rkeyid=object_id('Invoices')

Is anything locking Invoices table when you try the delete?

simas|||It won't even pull up an estimated execution plan. It just sits there doing nothing. There are several foreign keys, but I'm deleting from those tables prior to this delete, and they all delete without a hitch. It's just this table. I don't see anything locking the Invoices table.|||Have you ran a DBCC CHECKDB to see if there are any integrity issues?|||use <Your_Database_Name>
go
dbcc opentran
go

You have to have an open transaction that references this table. Oh, and do KILL your DELETE before you issue the DBCC. Make sure that any rollback (doubt it) completes before you fire DBCC.|||CHECKDB found 0 allocation errors and 0 consistency errors in database 'Accounting'.

Nice thought though.|||This is trying to pull a rabit out of the hat, but try to run UPDATE STATISTICS on the table. Also, try to drop and recreate the PRIMARY KEY index on that table. Then, see if you can delete the rows.

Also, I don't know why in the world I didn't suggest this earlier. In Query Analyzer before you do anything else, run: SELECT @.@.SPID. Set up a profiler to capture all activity using that SPID as a filter. In particular, look for SQL:Batch Started; SQL:Batch Completed; all errors, all recompiles, all locks and blocks; RPC:Started; RPC:Completed. See if you can see anything in the profiler that would lead to this problem.

Also, when this is running, if you run this in Query Analyzer do you get any results?

SELECT * FROM master..sysprocesses WHERE blocked <> 0|||UPDATE: DELETING THE PRIMARY KEY AND RECREATING IT WORKED. (no comment on how bad I think it is that this should ever have to be done, but it's fixed so I won't complain)

Mad Thanks go out to those that helped me out with this!

Special Thanks to Derrick! :D|||And you're sure you're on the latest service packs, critical updates, etc for Windows and SQL Server? Make sure the machine that has Query Analyzer on it has also been updated.|||SP3a on both, I'll have to check on the critical updates (since my boss thinks the internet is a fad). Thanks again for everything!

Cant Delete Row

I ran into a scenerio this morning

I made a table with no relations or primary id

It is an error log table basically

I went to delete a row and I got an error of

Cant delete row because it does not make them unigue or it alters multiple rows(3)

I didnt want this by no means, what did i not sdet right and how do you delete the rows without deleting the table and starting out new again?

Davids Learning

hi,

you'll often see this kind of problems on a table without a primary key... try defining one..

regards

|||

It wouldnt let me do that, so I deleted the table and started again(no big loss), but I did make a primary this time!

Thanks

Davids Learning

Can't delete Replicated Database

I was just experimenting with something in replication and created a test
database called "ReplicationTest"
This is on a server that is currently a subscriber for other databases, but I
thought I'd also be able to set up a publication from "ReplicationTest" Db.
I tried to create a publication and got the error:
Error 14294 supply either @.Job_id or @.Job_name to identify the job.
What does that mean ?
So I said "to heck with it" (or something like that) and decided to just
delete ReplicationTest database since I got stuck & had real work to do and
no publication had been created. But now it won't let me delete
ReplicationTest database because it says it's being used for replication ....
.... So, what should I try ?
Before you can delete it.
Right click on the replication folder on your enterprise manager treeview,
click on the configure publishers, subscribers, distributions on the context
menu that pops up, go to the publication database tabs and make sure you
untick the boxes next to Replication Test.
Once that is done you can delete the db.
"Gabriel D via droptable.com" wrote:

> I was just experimenting with something in replication and created a test
> database called "ReplicationTest"
> This is on a server that is currently a subscriber for other databases, but I
> thought I'd also be able to set up a publication from "ReplicationTest" Db.
>
> I tried to create a publication and got the error:
> Error 14294 supply either @.Job_id or @.Job_name to identify the job.
> What does that mean ?
>
> So I said "to heck with it" (or something like that) and decided to just
> delete ReplicationTest database since I got stuck & had real work to do and
> no publication had been created. But now it won't let me delete
> ReplicationTest database because it says it's being used for replication ....
> .... So, what should I try ?
>

Cant delete records from DB .. says : Too many rows were affected by update.

Hi,

I've added multiple records with same info during practice. Now I"m trying to delete those records from SQL Server DB. but it says

"Key column information is insufficient or incorrect. To many rows were affected by update."

What to do, to delete these records?

Appreciated..if you post the code we can help you out but the error message you're getting means you're trying to update a row that has a duplicate. So, if your table had a primary key, you couldn't have a duplicate row and wouldn't have a problem.

hth|||Add a new column to your table and give each record a unique value for the column. Quickest way to do this is to add an Indentity column to the table (SQL Server will add the unique values). Delete the records you don't want and then you can remove the Indentity column if you want.

Can't delete orphaned Mirror because the principal server is decommissioned

Hoping someone can help me with this. I have a SQL 2005 box which was
formerly in a '2005 mirror.' The SQL server containing the
'principal' is now dead (ceased to exist). That is not the problem.
The problem is that I now want to delete the mirror as it is no longer
needed. The status of the mirror is 'Disconnected / In Recovery.'
Problem is that when I try to delete it, I get the message "Database x
is enabled for Database Mirroring, Database Mirroring must be removed
before dropping the database. (Microsoft SQL Server, Error: 3743).
O.K., this is another fine mess you've gotten me into Olly.... Ho do I
delete the 'mirroring relationship' if the server containing the
Principal has 'gone to a better life?' Until I work out how, I will
have to just ignore it and continue to put he server into production.
Not a great option. Thanks in advance.On Jul 13, 12:53 pm, togbabe <togb...@.yahoo.co.uk> wrote:
> Hoping someone can help me with this. I have a SQL 2005 box which was
> formerly in a '2005mirror.' The SQL server containing the
> 'principal' is now dead (ceased to exist). That is not the problem.
> The problem is that I now want todeletethemirroras it is no longer
> needed. The status of themirroris 'Disconnected / In Recovery.'
> Problem is that when I try todeleteit, I get the message "Database x
> is enabled for Database Mirroring, Database Mirroring must be removed
> before dropping the database. (Microsoft SQL Server, Error: 3743).
> O.K., this is another fine mess you've gotten me into Olly.... Ho do Ideletethe 'mirroring relationship' if the server containing the
> Principal has 'gone to a better life?' Until I work out how, I will
> have to just ignore it and continue to put he server into production.
> Not a great option. Thanks in advance.
Here is what I have done with this. I know it is not nice but it has
partially worked. I simply stopped SQL server, renamed the mdf file
and restarted the server. This has worked. I actually thought I
would have to still delete the artifact of the database in a 'suspect
state.' But I didn't even have to do this. It was just gone. One
problem - though - the event log still contains an error "FCB::Open
failed: Could not open file D:\Microsoft SQL Server\MSSQL\Data\x.mdf
for file number 1. OS error: 2(error not found)." Anybody have any
ideas of how I can get rid of this?|||Try to restore over it with any old database backup and use overwrite
database while restoring.
Make sure you no longer need this database before performing above step.
Manu Jaidka
"togbabe" wrote:
> On Jul 13, 12:53 pm, togbabe <togb...@.yahoo.co.uk> wrote:
> > Hoping someone can help me with this. I have a SQL 2005 box which was
> > formerly in a '2005mirror.' The SQL server containing the
> > 'principal' is now dead (ceased to exist). That is not the problem.
> > The problem is that I now want todeletethemirroras it is no longer
> > needed. The status of themirroris 'Disconnected / In Recovery.'
> > Problem is that when I try todeleteit, I get the message "Database x
> > is enabled for Database Mirroring, Database Mirroring must be removed
> > before dropping the database. (Microsoft SQL Server, Error: 3743).
> > O.K., this is another fine mess you've gotten me into Olly.... Ho do Ideletethe 'mirroring relationship' if the server containing the
> > Principal has 'gone to a better life?' Until I work out how, I will
> > have to just ignore it and continue to put he server into production.
> > Not a great option. Thanks in advance.
> Here is what I have done with this. I know it is not nice but it has
> partially worked. I simply stopped SQL server, renamed the mdf file
> and restarted the server. This has worked. I actually thought I
> would have to still delete the artifact of the database in a 'suspect
> state.' But I didn't even have to do this. It was just gone. One
> problem - though - the event log still contains an error "FCB::Open
> failed: Could not open file D:\Microsoft SQL Server\MSSQL\Data\x.mdf
> for file number 1. OS error: 2(error not found)." Anybody have any
> ideas of how I can get rid of this?
>

Can't delete orphaned Mirror because the principal server is decommissioned

Hoping someone can help me with this. I have a SQL 2005 box which was
formerly in a '2005 mirror.' The SQL server containing the
'principal' is now dead (ceased to exist). That is not the problem.
The problem is that I now want to delete the mirror as it is no longer
needed. The status of the mirror is 'Disconnected / In Recovery.'
Problem is that when I try to delete it, I get the message "Database x
is enabled for Database Mirroring, Database Mirroring must be removed
before dropping the database. (Microsoft SQL Server, Error: 3743).
O.K., this is another fine mess you've gotten me into Olly.... Ho do I
delete the 'mirroring relationship' if the server containing the
Principal has 'gone to a better life?' Until I work out how, I will
have to just ignore it and continue to put he server into production.
Not a great option. Thanks in advance.
On Jul 13, 12:53 pm, togbabe <togb...@.yahoo.co.uk> wrote:
> Hoping someone can help me with this. I have a SQL 2005 box which was
> formerly in a '2005mirror.' The SQL server containing the
> 'principal' is now dead (ceased to exist). That is not the problem.
> The problem is that I now want todeletethemirroras it is no longer
> needed. The status of themirroris 'Disconnected / In Recovery.'
> Problem is that when I try todeleteit, I get the message "Database x
> is enabled for Database Mirroring, Database Mirroring must be removed
> before dropping the database. (Microsoft SQL Server, Error: 3743).
> O.K., this is another fine mess you've gotten me into Olly.... Ho do Ideletethe 'mirroring relationship' if the server containing the
> Principal has 'gone to a better life?' Until I work out how, I will
> have to just ignore it and continue to put he server into production.
> Not a great option. Thanks in advance.
Here is what I have done with this. I know it is not nice but it has
partially worked. I simply stopped SQL server, renamed the mdf file
and restarted the server. This has worked. I actually thought I
would have to still delete the artifact of the database in a 'suspect
state.' But I didn't even have to do this. It was just gone. One
problem - though - the event log still contains an error "FCB::Open
failed: Could not open file D:\Microsoft SQL Server\MSSQL\Data\x.mdf
for file number 1. OS error: 2(error not found)." Anybody have any
ideas of how I can get rid of this?
|||Try to restore over it with any old database backup and use overwrite
database while restoring.
Make sure you no longer need this database before performing above step.
Manu Jaidka
"togbabe" wrote:

> On Jul 13, 12:53 pm, togbabe <togb...@.yahoo.co.uk> wrote:
> Here is what I have done with this. I know it is not nice but it has
> partially worked. I simply stopped SQL server, renamed the mdf file
> and restarted the server. This has worked. I actually thought I
> would have to still delete the artifact of the database in a 'suspect
> state.' But I didn't even have to do this. It was just gone. One
> problem - though - the event log still contains an error "FCB::Open
> failed: Could not open file D:\Microsoft SQL Server\MSSQL\Data\x.mdf
> for file number 1. OS error: 2(error not found)." Anybody have any
> ideas of how I can get rid of this?
>

Can't delete orphaned Mirror because the principal server is decommissioned

Hoping someone can help me with this. I have a SQL 2005 box which was
formerly in a '2005 mirror.' The SQL server containing the
'principal' is now dead (ceased to exist). That is not the problem.
The problem is that I now want to delete the mirror as it is no longer
needed. The status of the mirror is 'Disconnected / In Recovery.'
Problem is that when I try to delete it, I get the message "Database x
is enabled for Database Mirroring, Database Mirroring must be removed
before dropping the database. (Microsoft SQL Server, Error: 3743).
O.K., this is another fine mess you've gotten me into Olly.... Ho do I
delete the 'mirroring relationship' if the server containing the
Principal has 'gone to a better life?' Until I work out how, I will
have to just ignore it and continue to put he server into production.
Not a great option. Thanks in advance.On Jul 13, 12:53 pm, togbabe <togb...@.yahoo.co.uk> wrote:
> Hoping someone can help me with this. I have a SQL 2005 box which was
> formerly in a '2005mirror.' The SQL server containing the
> 'principal' is now dead (ceased to exist). That is not the problem.
> The problem is that I now want todeletethemirroras it is no longer
> needed. The status of themirroris 'Disconnected / In Recovery.'
> Problem is that when I try todeleteit, I get the message "Database x
> is enabled for Database Mirroring, Database Mirroring must be removed
> before dropping the database. (Microsoft SQL Server, Error: 3743).
> O.K., this is another fine mess you've gotten me into Olly.... Ho do Idel
etethe 'mirroring relationship' if the server containing the
> Principal has 'gone to a better life?' Until I work out how, I will
> have to just ignore it and continue to put he server into production.
> Not a great option. Thanks in advance.
Here is what I have done with this. I know it is not nice but it has
partially worked. I simply stopped SQL server, renamed the mdf file
and restarted the server. This has worked. I actually thought I
would have to still delete the artifact of the database in a 'suspect
state.' But I didn't even have to do this. It was just gone. One
problem - though - the event log still contains an error "FCB::Open
failed: Could not open file D:\Microsoft SQL Server\MSSQL\Data\x.mdf
for file number 1. OS error: 2(error not found)." Anybody have any
ideas of how I can get rid of this?

Can't delete or overwrite report

When I try to delete this report from the admin it times out, same if I try
to republish from the report designer. I am admin on the box and in reporting
services.
Error looks like:
System.Web.Services.Protocols.SoapException: Server was unable to process
request. --> System.Data.SqlClient.SqlException: Timeout expired. The
timeout period elapsed prior to completion of the operation or the server is
not responding. at
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior,
RunBehavior runBehavior, Boolean returnStream) at
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at
Microsoft.ReportingServices.Library.InstrumentedSqlCommand.ExecuteNonQuery()
at Microsoft.ReportingServices.Library.DBInterface.DeleteObject(String
objectName) at
Microsoft.ReportingServices.Library.RSService._DeleteItem(String item) at
Microsoft.ReportingServices.Library.RSService.DeleteItem(CallParameters
parameters) at
Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId) at
Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch() --
End of inner exception stack trace --
How can I delete the report?I have the exact same problem. I can move the report to another folder but
any attempt to delete it or overwrite it via Designer results in the Server
going to 100% CPU utilisation and everything grinding to a halt until the
timeout error below appears.
Can someone please help us? Thanks.
"bmurtha" wrote:
> When I try to delete this report from the admin it times out, same if I try
> to republish from the report designer. I am admin on the box and in reporting
> services.
> Error looks like:
> System.Web.Services.Protocols.SoapException: Server was unable to process
> request. --> System.Data.SqlClient.SqlException: Timeout expired. The
> timeout period elapsed prior to completion of the operation or the server is
> not responding. at
> System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior,
> RunBehavior runBehavior, Boolean returnStream) at
> System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at
> Microsoft.ReportingServices.Library.InstrumentedSqlCommand.ExecuteNonQuery()
> at Microsoft.ReportingServices.Library.DBInterface.DeleteObject(String
> objectName) at
> Microsoft.ReportingServices.Library.RSService._DeleteItem(String item) at
> Microsoft.ReportingServices.Library.RSService.DeleteItem(CallParameters
> parameters) at
> Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId) at
> Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch() --
> End of inner exception stack trace --
> How can I delete the report?|||I finally deleted the culprit report by removing it from the ReportServer
database. First identify the datasource it is using and then delete the
datasource from this table:
reportserver.dbo.[datasource]
If it's shared you will have to recreate it again afterwards.
Then delete the offending report from:
reportserver.dbo.[catalog]
That did it for me, but obviously I have no idea what the consequences might
be!
"bmurtha" wrote:
> When I try to delete this report from the admin it times out, same if I try
> to republish from the report designer. I am admin on the box and in reporting
> services.
> Error looks like:
> System.Web.Services.Protocols.SoapException: Server was unable to process
> request. --> System.Data.SqlClient.SqlException: Timeout expired. The
> timeout period elapsed prior to completion of the operation or the server is
> not responding. at
> System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior,
> RunBehavior runBehavior, Boolean returnStream) at
> System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at
> Microsoft.ReportingServices.Library.InstrumentedSqlCommand.ExecuteNonQuery()
> at Microsoft.ReportingServices.Library.DBInterface.DeleteObject(String
> objectName) at
> Microsoft.ReportingServices.Library.RSService._DeleteItem(String item) at
> Microsoft.ReportingServices.Library.RSService.DeleteItem(CallParameters
> parameters) at
> Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId) at
> Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch() --
> End of inner exception stack trace --
> How can I delete the report?

Cant delete or add a user....

SQL 7
Have a user: John
Restored a backup database, of which John is aliased to the dbo
However, cannot connect as John to this database.
Tried to drop and recreate him, but it does not work, he is sort of
ghosting..
Is in Roles, Public as \John (I have NO idea what that \ means, but it
seems to be the problem)
sp_droprole 'John' or '\John' - says John doesnt exist
sp_dropuser 'John' or '\John' - says John doesnt exit
sp_addalias or sp_adduser says - cant add john, already exists as user or
role in the database !
I deleted the LOGIN and recreated, then went to the databsae sp_addalias
'John','dbo' - said it worked, but still cannot login as John and connect to
this database.
BTW: User must be 'John' as is built into the application .
Anyone 'Try this in TSQ
Use 'YourDatabase
sp_change_users_login 'auto_fix', 'YourLoginUser
This is a classic example of a broken login after restoring a backup from one machine to another. Logins have the SID of the machine they created on|||Thanks Kelly,
I have used this , many times, in the past, but its not working on this one
(number of orphaned users: 0, number fix: 0)
It seems to have something to do with the \ in front of the user name, and I
dont know what that means...cuz I can do this for OTHER users and it works
no problem...
"Kelly" <anonymous@.discussions.microsoft.com> wrote in message
news:FA0EA8D0-D72A-47C5-AC78-F81523F9579A@.microsoft.com...
> Try this in TSQL
> Use 'YourDatabase'
> sp_change_users_login 'auto_fix', 'YourLoginUser'
>
> This is a classic example of a broken login after restoring a backup from
one machine to another. Logins have the SID of the machine they created on.
>
>

Cant delete or add a user....

SQL 7
Have a user: John
Restored a backup database, of which John is aliased to the dbo
However, cannot connect as John to this database.
Tried to drop and recreate him, but it does not work, he is sort of
ghosting..
Is in Roles, Public as \John (I have NO idea what that \ means, but it
seems to be the problem)
sp_droprole 'John' or '\John' - says John doesnt exist
sp_dropuser 'John' or '\John' - says John doesnt exit
sp_addalias or sp_adduser says - cant add john, already exists as user or
role in the database !
I deleted the LOGIN and recreated, then went to the databsae sp_addalias
'John','dbo' - said it worked, but still cannot login as John and connect to
this database.
BTW: User must be 'John' as is built into the application .
Anyone 'Try this in TSQL
Use 'YourDatabase'
sp_change_users_login 'auto_fix', 'YourLoginUser'
This is a classic example of a broken login after restoring a backup from on
e machine to another. Logins have the SID of the machine they created on.|||Thanks Kelly,
I have used this , many times, in the past, but its not working on this one
(number of orphaned users: 0, number fix: 0)
It seems to have something to do with the \ in front of the user name, and I
dont know what that means...cuz I can do this for OTHER users and it works
no problem...
"Kelly" <anonymous@.discussions.microsoft.com> wrote in message
news:FA0EA8D0-D72A-47C5-AC78-F81523F9579A@.microsoft.com...
> Try this in TSQL
> Use 'YourDatabase'
> sp_change_users_login 'auto_fix', 'YourLoginUser'
>
> This is a classic example of a broken login after restoring a backup from
one machine to another. Logins have the SID of the machine they created on.
>
>