Thursday, March 29, 2012
Error removing a view
Cannot drop the view 'V_RATE_CATEGORY', because it does not exist in the system catalog.
Any help on how I can get this view would dropped would be greatly appreciated
Thanks,
Jerry
hi,
"Jerbear64" <Jerbear64@.discussions.microsoft.com> ha scritto nel messaggio
news:77383992-90E5-4220-9866-01EDDAC0ADDF@.microsoft.com...
> I have developer who created a view on a database in SQL MSDE 2000 and for
>some reason it was created without an owner. When I try to DROP this view
I get
> the following error message:
> Cannot drop the view 'V_RATE_CATEGORY', because it does not exist in the
system
>catalog.
> Any help on how I can get this view would dropped would be greatly
appreciated
it's actually not possible the object not having an owner... it will inherit
the creator owner name...
if you logged in with a different login that not maps to that user, try
locating it with it's owner name in the form , owner_name.object_name
if his user name in the database is minnie, try
minnie.V_RATE_CATEGORY
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Jerry,
A similar question was just raised in the .server group. Do you know what
tool the developer was using? (I have only seen this when developing using
Access 2000 ADPs. But that may not be the only cause. That is why I am
curious.)
Russell Fields
"Jerbear64" <anonymous@.discussions.microsoft.com> wrote in message
news:27d5901c46449$0f74ce80$a601280a@.phx.gbl...[vbcol=seagreen]
> Modify the table sysobjects field UID and change it from a
> 11 to 1 and then I was able to remove the view.
> Jerry
>
> MSDE 2000 and for some reason it was created without an
> owner. When I try to DROP this view I get the following
> error message:
> not exist in the system catalog.
> be greatly appreciated
|||I know it should not be possible, but the owner came up showing a "null" value. How it happen I don't but it did.
Jerry
"Andrea Montanari" wrote:
> hi,
> "Jerbear64" <Jerbear64@.discussions.microsoft.com> ha scritto nel messaggio
> news:77383992-90E5-4220-9866-01EDDAC0ADDF@.microsoft.com...
> I get
> system
> appreciated
> it's actually not possible the object not having an owner... it will inherit
> the creator owner name...
> if you logged in with a different login that not maps to that user, try
> locating it with it's owner name in the form , owner_name.object_name
> if his user name in the database is minnie, try
> minnie.V_RATE_CATEGORY
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
Monday, March 19, 2012
Error on DROP TABLE
Hi,
I was trying to drop a table (or alter it in any way) and the Managment Studio Express gave me an error of timeout. So I say something like DROP TABLE myTable, and it takes a while and gives me the error. Does anybody know how to unlock a table?
Thanks
Hi Alessandro,
As this is Express, I'm guessing that a stopping and restarting the SQL Server service sin't going to impact usage? If not, do this and re-issue your drop command, you'll probably that an application is placing a lock on the table in question and blocking the ddl command.
There are other ways to identify the offending session (spid), but this is probably easiest in your case.
Cheers,
Rob
|||post back the actual error u gets...
Madhu
|||Hi
Possible to post the error message to further explore your problem?
At the mean time:
1. Check whether the table really exists in the correct database. Do the folowing:
Select Name from Sys.Objects where name='tablename' -- (if exist)
Drop table databasename.schema.tablename
2. Check that the Login that you are using to execute this query has the approriate permission. You can do so by verify the user properties in the security node.
3. Check whether the table has any reference to other tables
4. Verify whether the table is locked using the current activity. If necessary, you can end the lock by killing the session.
Error on deleting SQL/MSDE database
On calling the source attached below to drop sql database, I get the
following error randomly,
"Cannot detach the database 'DBNAME' because it is currently in use.
[Microsoft OLE DB Provider for SQL Server]"
I am not sure what am I doing wrong here.
Any pointers in this regard will be appreciated.
Regards,
Usman
con.Execute "use master"
' Get list of processes blocking this catalog and try to
kill all them
Set rs = con.Execute("sp_who2", , adCmdStoredProc)
If Err.Number = 0 And Not rs Is Nothing Then
While Not rs.EOF
If StrComp(rs("dbname"), sCatalog, vbTextCompare)
= 0 Then
con.Execute "kill " & rs("spid")
' Ignore errors
Err.Clear
End If
rs.MoveNext
Wend
rs.Close
End If
con.Execute "sp_detach_db('" & sCatalog & "', 'true')", ,
adCmdStoredProc ''''''''$$$$$$$$$$$$$$$
Hello,
Do the below command from ISQL window
USE MASTER
GO
ALTER DATABASE <DBNAME> Set SINGLE_USER with Rollback Immediate
GO
DROP Database <dbname>
Thanks
Hari
"Usman" <khanusman@.gmail.com> wrote in message
news:1170770913.673583.11240@.s48g2000cws.googlegro ups.com...
> Hi,
> On calling the source attached below to drop sql database, I get the
> following error randomly,
> "Cannot detach the database 'DBNAME' because it is currently in use.
> [Microsoft OLE DB Provider for SQL Server]"
> I am not sure what am I doing wrong here.
> Any pointers in this regard will be appreciated.
> Regards,
> Usman
>
> con.Execute "use master"
> ' Get list of processes blocking this catalog and try to
> kill all them
> Set rs = con.Execute("sp_who2", , adCmdStoredProc)
> If Err.Number = 0 And Not rs Is Nothing Then
> While Not rs.EOF
> If StrComp(rs("dbname"), sCatalog, vbTextCompare)
> = 0 Then
> con.Execute "kill " & rs("spid")
> ' Ignore errors
> Err.Clear
> End If
> rs.MoveNext
> Wend
> rs.Close
> End If
> con.Execute "sp_detach_db('" & sCatalog & "', 'true')", ,
> adCmdStoredProc ''''''''$$$$$$$$$$$$$$$
>