Showing posts with label select. Show all posts
Showing posts with label select. Show all posts

Tuesday, March 27, 2012

cannot edit text cell

I am trying to edit a long text cell in Enterprise Manager but when I select
"<long text>" and try to delete it, I get an error saying "cannot edit this
cell".

Could anyone tell me how to edit this cell?

Thanks, AmandaHi

When your text column has more than 900 characters it will not allow you to
enter it via EM.

You can use Query Analyser (which is usually easier and safer IMO) to issue
an update statement, or for more complicated changes look up UPDATETEXT in
books online.

John

"Amanda H" <amanda2@.southwind.org> wrote in message
news:K58Pd.1784$VI1.215392@.twister.southeast.rr.co m...
>I am trying to edit a long text cell in Enterprise Manager but when I
>select
> "<long text>" and try to delete it, I get an error saying "cannot edit
> this
> cell".
> Could anyone tell me how to edit this cell?
> Thanks, Amanda|||"Amanda H" <amanda2@.southwind.org> wrote in message
news:K58Pd.1784$VI1.215392@.twister.southeast.rr.co m...
>I am trying to edit a long text cell in Enterprise Manager but when I
>select
> "<long text>" and try to delete it, I get an error saying "cannot edit
> this
> cell".
> Could anyone tell me how to edit this cell?
> Thanks, Amanda

Use an UPDATE statement in Query Analyzer is probably the best thing to do -
EM isn't really a data manipulation or development tool, and it has a number
of 'features'.

http://www.aspfaq.com/show.asp?id=2455

Simonsql

Cannot edit SQL Job in Management Studio.

Hello,

In SQL Management Studio, I cannot edit a SQL Job. When I double-click on a sql job or select properties on the context menu, I get a "New Job" window. This was working fine a few days back. Any help will be appreciated.

Thanks,

Ashish.

What happens when you right click and select properties on the job?|||Try installing SQL Server 2005 SP2 on the client. This should solve your problem.|||

I installed SP2 on the client. It didn't help. Thanks for replying back to my post.

Also, we have 3 other developers in the team who are having the same problem.

|||

Thanks for your reply. When I right-click and select properties, I still get the "New Job" window.

|||It could be an issues with SQL tools, have you tried accessing the same job from another client's machine.|||

Hi Satya,

Thanks for your reply. I tried editing the sql job from another computer. I was able to edit it. I know it's issue with the client tools, but cannot figure out to resolve the problem. I installed SP2 on the client side. That also didn't help.

|||You may need to uninstall the client tools, and reinstall them, and also add SP2 again.

Cannot edit maintenance plans post SP2

I have some maintenance plans written for SQL Server 2005 SP1. After we
upgraded to SP2 I can no longer edit them. If I select the Maintneance Plans
node in Object Explorer and double click on any plan I get "Microsoft SQL
Server Management Studio is unable to load this document: One or more error
occured."
The popup message box says "Value cannot be null. Parameter name: component
(System.Design)"
Details are:"
Program Location:
at
System.ComponentModel.Design.DesignerHost.System.C omponentModel.Design.IDesignerHost.GetDesigner(ICo mponent component)
at
Microsoft.DataTransformationServices.VsIntegration .DtsDesignerService.OpenDesigner(String connectionString, Object connection, String objectUrn)
at
Microsoft.SqlServer.Management.DatabaseMaintenance .MaintDesignerMenuHandler.Invoke()"
I saw one post that sugget there is a fix that ought to be in cumulative
update package 4, but I can't see any items in that which match this problem.
The maintenance plans appear to run when called by the SQl Agent Jobs they
were initially set up with. However, I am calling one of them from another
Job and this has started throwing this error since SP2:
"Error: 2007-11-04 18:00:01.81 Code: 0xC0024104 Source: Reporting
Task for subplan-{03E683E8-5A40-4697-BF2F-E93EBA6E96E7} Description: The
Execute method on the task returned error code 0x80131904 (Conversion failed
when converting from a character string to uniqueidentifier.). The Execute
method must succeed<c/> and indicate the result using an "out" parameter.
End Error"
but when I went to look at the plan, I couldn't edit it!
Any advice on how to edit the maintenance plans or fix the second error
would be great.
Thanks,
Charles
Yes. From Help -> about:
"Microsoft SQL Server Management Studio9.00.3042.00
Microsoft Analysis Services Client Tools2005.090.3042.00
Microsoft Data Access Components (MDAC)2000.085.1117.00
(xpsp_sp2_rtm.040803-2158)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer6.0.2900.2180
Microsoft .NET Framework2.0.50727.832
Operating System5.1.2600"
"Tibor Karaszi" wrote:

> Did you install sp2 for the clients components (SSMS) on the machine where you try to edit the plan?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "CharlesB1" <CharlesB1@.discussions.microsoft.com> wrote in message
> news:CC70B322-EBCB-4D2E-B1DA-98AAEDDBF86A@.microsoft.com...
>
>
sql

Cannot edit maintenance plans post SP2

I have some maintenance plans written for SQL Server 2005 SP1. After we
upgraded to SP2 I can no longer edit them. If I select the Maintneance Plans
node in Object Explorer and double click on any plan I get "Microsoft SQL
Server Management Studio is unable to load this document: One or more error
occured."
The popup message box says "Value cannot be null. Parameter name: component
(System.Design)"
Details are:"
Program Location:
at
System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesi
gnerHost.GetDesigner(IComponent component)
at
Microsoft.DataTransformationServices.VsIntegration.DtsDesignerService.OpenDe
signer(String connectionString, Object connection, String objectUrn)
at
Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.
Invoke()"
I saw one post that sugget there is a fix that ought to be in cumulative
update package 4, but I can't see any items in that which match this problem
.
The maintenance plans appear to run when called by the SQl Agent Jobs they
were initially set up with. However, I am calling one of them from another
Job and this has started throwing this error since SP2:
"Error: 2007-11-04 18:00:01.81 Code: 0xC0024104 Source: Reporting
Task for subplan-{03E683E8-5A40-4697-BF2F-E93EBA6E96E7} Descriptio
n: The
Execute method on the task returned error code 0x80131904 (Conversion failed
when converting from a character string to uniqueidentifier.). The Execute
method must succeed<c/> and indicate the result using an "out" parameter.
End Error"
but when I went to look at the plan, I couldn't edit it!
Any advice on how to edit the maintenance plans or fix the second error
would be great.
Thanks,
CharlesDid you install sp2 for the clients components (SSMS) on the machine where y
ou try to edit the plan?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"CharlesB1" <CharlesB1@.discussions.microsoft.com> wrote in message
news:CC70B322-EBCB-4D2E-B1DA-98AAEDDBF86A@.microsoft.com...
>I have some maintenance plans written for SQL Server 2005 SP1. After we
> upgraded to SP2 I can no longer edit them. If I select the Maintneance Pla
ns
> node in Object Explorer and double click on any plan I get "Microsoft SQL
> Server Management Studio is unable to load this document: One or more erro
r
> occured."
> The popup message box says "Value cannot be null. Parameter name: componen
t
> (System.Design)"
> Details are:"
> Program Location:
> at
> System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDe
signerHost.GetDesigner(IComponent
> component)
> at
> Microsoft.DataTransformationServices.VsIntegration.DtsDesignerService.Open
Designer(String
> connectionString, Object connection, String objectUrn)
> at
> Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandle
r.Invoke()"
> I saw one post that sugget there is a fix that ought to be in cumulative
> update package 4, but I can't see any items in that which match this probl
em.
> The maintenance plans appear to run when called by the SQl Agent Jobs they
> were initially set up with. However, I am calling one of them from another
> Job and this has started throwing this error since SP2:
> "Error: 2007-11-04 18:00:01.81 Code: 0xC0024104 Source: Reporting
> Task for subplan-{03E683E8-5A40-4697-BF2F-E93EBA6E96E7} Descript
ion: The
> Execute method on the task returned error code 0x80131904 (Conversion fail
ed
> when converting from a character string to uniqueidentifier.). The Execute
> method must succeed<c/> and indicate the result using an "out" parameter.
> End Error"
> but when I went to look at the plan, I couldn't edit it!
> Any advice on how to edit the maintenance plans or fix the second error
> would be great.
> Thanks,
> Charles
>|||Yes. From Help -> about :
"Microsoft SQL Server Management Studio 9.00.3042.00
Microsoft Analysis Services Client Tools 2005.090.3042.00
Microsoft Data Access Components (MDAC) 2000.085.1117.00
(xpsp_sp2_rtm.040803-2158)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 6.0.2900.2180
Microsoft .NET Framework 2.0.50727.832
Operating System 5.1.2600"
"Tibor Karaszi" wrote:

> Did you install sp2 for the clients components (SSMS) on the machine where
you try to edit the plan?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "CharlesB1" <CharlesB1@.discussions.microsoft.com> wrote in message
> news:CC70B322-EBCB-4D2E-B1DA-98AAEDDBF86A@.microsoft.com...
>
>

Cannot edit maintenance plans post SP2

I have some maintenance plans written for SQL Server 2005 SP1. After we
upgraded to SP2 I can no longer edit them. If I select the Maintneance Plans
node in Object Explorer and double click on any plan I get "Microsoft SQL
Server Management Studio is unable to load this document: One or more error
occured."
The popup message box says "Value cannot be null. Parameter name: component
(System.Design)"
Details are:"
Program Location:
at
System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.GetDesigner(IComponent component)
at
Microsoft.DataTransformationServices.VsIntegration.DtsDesignerService.OpenDesigner(String connectionString, Object connection, String objectUrn)
at
Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.Invoke()"
I saw one post that sugget there is a fix that ought to be in cumulative
update package 4, but I can't see any items in that which match this problem.
The maintenance plans appear to run when called by the SQl Agent Jobs they
were initially set up with. However, I am calling one of them from another
Job and this has started throwing this error since SP2:
"Error: 2007-11-04 18:00:01.81 Code: 0xC0024104 Source: Reporting
Task for subplan-{03E683E8-5A40-4697-BF2F-E93EBA6E96E7} Description: The
Execute method on the task returned error code 0x80131904 (Conversion failed
when converting from a character string to uniqueidentifier.). The Execute
method must succeed<c/> and indicate the result using an "out" parameter.
End Error"
but when I went to look at the plan, I couldn't edit it!
Any advice on how to edit the maintenance plans or fix the second error
would be great.
Thanks,
CharlesDid you install sp2 for the clients components (SSMS) on the machine where you try to edit the plan?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"CharlesB1" <CharlesB1@.discussions.microsoft.com> wrote in message
news:CC70B322-EBCB-4D2E-B1DA-98AAEDDBF86A@.microsoft.com...
>I have some maintenance plans written for SQL Server 2005 SP1. After we
> upgraded to SP2 I can no longer edit them. If I select the Maintneance Plans
> node in Object Explorer and double click on any plan I get "Microsoft SQL
> Server Management Studio is unable to load this document: One or more error
> occured."
> The popup message box says "Value cannot be null. Parameter name: component
> (System.Design)"
> Details are:"
> Program Location:
> at
> System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.GetDesigner(IComponent
> component)
> at
> Microsoft.DataTransformationServices.VsIntegration.DtsDesignerService.OpenDesigner(String
> connectionString, Object connection, String objectUrn)
> at
> Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.Invoke()"
> I saw one post that sugget there is a fix that ought to be in cumulative
> update package 4, but I can't see any items in that which match this problem.
> The maintenance plans appear to run when called by the SQl Agent Jobs they
> were initially set up with. However, I am calling one of them from another
> Job and this has started throwing this error since SP2:
> "Error: 2007-11-04 18:00:01.81 Code: 0xC0024104 Source: Reporting
> Task for subplan-{03E683E8-5A40-4697-BF2F-E93EBA6E96E7} Description: The
> Execute method on the task returned error code 0x80131904 (Conversion failed
> when converting from a character string to uniqueidentifier.). The Execute
> method must succeed<c/> and indicate the result using an "out" parameter.
> End Error"
> but when I went to look at the plan, I couldn't edit it!
> Any advice on how to edit the maintenance plans or fix the second error
> would be great.
> Thanks,
> Charles
>|||Yes. From Help -> About:
"Microsoft SQL Server Management Studio 9.00.3042.00
Microsoft Analysis Services Client Tools 2005.090.3042.00
Microsoft Data Access Components (MDAC) 2000.085.1117.00
(xpsp_sp2_rtm.040803-2158)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 6.0.2900.2180
Microsoft .NET Framework 2.0.50727.832
Operating System 5.1.2600"
"Tibor Karaszi" wrote:
> Did you install sp2 for the clients components (SSMS) on the machine where you try to edit the plan?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "CharlesB1" <CharlesB1@.discussions.microsoft.com> wrote in message
> news:CC70B322-EBCB-4D2E-B1DA-98AAEDDBF86A@.microsoft.com...
> >I have some maintenance plans written for SQL Server 2005 SP1. After we
> > upgraded to SP2 I can no longer edit them. If I select the Maintneance Plans
> > node in Object Explorer and double click on any plan I get "Microsoft SQL
> > Server Management Studio is unable to load this document: One or more error
> > occured."
> >
> > The popup message box says "Value cannot be null. Parameter name: component
> > (System.Design)"
> > Details are:"
> > Program Location:
> >
> > at
> > System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.GetDesigner(IComponent
> > component)
> > at
> > Microsoft.DataTransformationServices.VsIntegration.DtsDesignerService.OpenDesigner(String
> > connectionString, Object connection, String objectUrn)
> > at
> > Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.Invoke()"
> >
> > I saw one post that sugget there is a fix that ought to be in cumulative
> > update package 4, but I can't see any items in that which match this problem.
> >
> > The maintenance plans appear to run when called by the SQl Agent Jobs they
> > were initially set up with. However, I am calling one of them from another
> > Job and this has started throwing this error since SP2:
> > "Error: 2007-11-04 18:00:01.81 Code: 0xC0024104 Source: Reporting
> > Task for subplan-{03E683E8-5A40-4697-BF2F-E93EBA6E96E7} Description: The
> > Execute method on the task returned error code 0x80131904 (Conversion failed
> > when converting from a character string to uniqueidentifier.). The Execute
> > method must succeed<c/> and indicate the result using an "out" parameter.
> > End Error"
> >
> > but when I went to look at the plan, I couldn't edit it!
> >
> > Any advice on how to edit the maintenance plans or fix the second error
> > would be great.
> >
> > Thanks,
> >
> > Charles
> >
>
>

Cannot drop triggers using dynamic SQL

Hi,
I'm using:
SELECT 'DROP TRIGGER ' + name FROM SYSOBJECTS WHERE type = 'TR'
I've used this on a number of occaisions but it doesn't seem to be dropping
the triggers this time.
Can anybody think of what I may be doing wrong here?
Many thanks for any assistance in advance
AntHi Ant
This SELECT will generate DROP TRIGGER statements, but it will not execute
them to actually drop the triggers. You need to take the output and execute
it.
--
HTH
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
http://sqlblog.com
"Ant" <Ant@.discussions.microsoft.com> wrote in message
news:16961357-9B6B-4878-9E5C-47C532BAF8EA@.microsoft.com...
> Hi,
> I'm using:
> SELECT 'DROP TRIGGER ' + name FROM SYSOBJECTS WHERE type = 'TR'
> I've used this on a number of occaisions but it doesn't seem to be
> dropping
> the triggers this time.
> Can anybody think of what I may be doing wrong here?
> Many thanks for any assistance in advance
> Ant|||Hi Kalen,
Apoligies but you might have to walk me through that.
I tried:
exec(SELECT DROP TRIGGER ' + name FROM SYSOBJECTS WHERE type = 'TR'
)
but naturally I got an error.
How is this done?
Many thanks for your answer.
Ant
"Kalen Delaney" wrote:
> Hi Ant
> This SELECT will generate DROP TRIGGER statements, but it will not execute
> them to actually drop the triggers. You need to take the output and execute
> it.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.InsideSQLServer.com
> http://sqlblog.com
>
> "Ant" <Ant@.discussions.microsoft.com> wrote in message
> news:16961357-9B6B-4878-9E5C-47C532BAF8EA@.microsoft.com...
> > Hi,
> > I'm using:
> >
> > SELECT 'DROP TRIGGER ' + name FROM SYSOBJECTS WHERE type = 'TR'
> >
> > I've used this on a number of occaisions but it doesn't seem to be
> > dropping
> > the triggers this time.
> >
> > Can anybody think of what I may be doing wrong here?
> >
> > Many thanks for any assistance in advance
> >
> > Ant
>
>|||Ant
DECLARE @.DeleteTrigger nvarchar(4000)
DECLARE DeleteTrigger CURSOR LOCAL FAST_FORWARD
FOR
SELECT N'DROP TRIGGER ' + name FROM SYSOBJECTS WHERE type = 'TR'
OPEN DeleteTrigger
WHILE 1 = 1
BEGIN
FETCH NEXT FROM DeleteTrigger INTO @.DeleteTrigger
IF @.@.FETCH_STATUS <> 0 BREAK
RAISERROR (@.DeleteTrigger , 0, 1) WITH NOWAIT
EXEC(@.DeleteTrigger)
END
CLOSE DeleteTrigger
DEALLOCATE DeleteTrigger
"Ant" <Ant@.discussions.microsoft.com> wrote in message
news:A03F503E-6EF6-47EA-BAEB-4E52857F6F98@.microsoft.com...
> Hi Kalen,
> Apoligies but you might have to walk me through that.
> I tried:
> exec(SELECT DROP TRIGGER ' + name FROM SYSOBJECTS WHERE type = 'TR'
> )
> but naturally I got an error.
> How is this done?
> Many thanks for your answer.
> Ant
>
> "Kalen Delaney" wrote:
>> Hi Ant
>> This SELECT will generate DROP TRIGGER statements, but it will not
>> execute
>> them to actually drop the triggers. You need to take the output and
>> execute
>> it.
>> --
>> HTH
>> Kalen Delaney, SQL Server MVP
>> www.InsideSQLServer.com
>> http://sqlblog.com
>>
>> "Ant" <Ant@.discussions.microsoft.com> wrote in message
>> news:16961357-9B6B-4878-9E5C-47C532BAF8EA@.microsoft.com...
>> > Hi,
>> > I'm using:
>> >
>> > SELECT 'DROP TRIGGER ' + name FROM SYSOBJECTS WHERE type = 'TR'
>> >
>> > I've used this on a number of occaisions but it doesn't seem to be
>> > dropping
>> > the triggers this time.
>> >
>> > Can anybody think of what I may be doing wrong here?
>> >
>> > Many thanks for any assistance in advance
>> >
>> > Ant
>>|||Thank you.
Can this be done with Dynamic SQL? I'm sure I've done this before without
having to resort to using a Cursor(?)
"Uri Dimant" wrote:
> Ant
> DECLARE @.DeleteTrigger nvarchar(4000)
> DECLARE DeleteTrigger CURSOR LOCAL FAST_FORWARD
> FOR
> SELECT N'DROP TRIGGER ' + name FROM SYSOBJECTS WHERE type = 'TR'
> OPEN DeleteTrigger
> WHILE 1 = 1
> BEGIN
> FETCH NEXT FROM DeleteTrigger INTO @.DeleteTrigger
> IF @.@.FETCH_STATUS <> 0 BREAK
> RAISERROR (@.DeleteTrigger , 0, 1) WITH NOWAIT
> EXEC(@.DeleteTrigger)
> END
> CLOSE DeleteTrigger
> DEALLOCATE DeleteTrigger
>
>
> "Ant" <Ant@.discussions.microsoft.com> wrote in message
> news:A03F503E-6EF6-47EA-BAEB-4E52857F6F98@.microsoft.com...
> > Hi Kalen,
> >
> > Apoligies but you might have to walk me through that.
> >
> > I tried:
> >
> > exec(SELECT DROP TRIGGER ' + name FROM SYSOBJECTS WHERE type = 'TR'
> > )
> >
> > but naturally I got an error.
> >
> > How is this done?
> >
> > Many thanks for your answer.
> > Ant
> >
> >
> >
> > "Kalen Delaney" wrote:
> >
> >> Hi Ant
> >>
> >> This SELECT will generate DROP TRIGGER statements, but it will not
> >> execute
> >> them to actually drop the triggers. You need to take the output and
> >> execute
> >> it.
> >>
> >> --
> >> HTH
> >> Kalen Delaney, SQL Server MVP
> >> www.InsideSQLServer.com
> >> http://sqlblog.com
> >>
> >>
> >> "Ant" <Ant@.discussions.microsoft.com> wrote in message
> >> news:16961357-9B6B-4878-9E5C-47C532BAF8EA@.microsoft.com...
> >> > Hi,
> >> > I'm using:
> >> >
> >> > SELECT 'DROP TRIGGER ' + name FROM SYSOBJECTS WHERE type = 'TR'
> >> >
> >> > I've used this on a number of occaisions but it doesn't seem to be
> >> > dropping
> >> > the triggers this time.
> >> >
> >> > Can anybody think of what I may be doing wrong here?
> >> >
> >> > Many thanks for any assistance in advance
> >> >
> >> > Ant
> >>
> >>
> >>
>
>|||Uri's solution IS dynamic SQL. Dynamic SQL means that we are building the
SQL command and then using EXEC to execute it, and he has this:
EXEC(@.DeleteTrigger)
I am assuming you are looking for a way to do it all with one statement.
You have not said what version you are using.
SQL 2000 has a procedures sp_execresultset that lets you execute the output
of another statement. This was not included in SQL 2005; I don't know why.
However, you should be able to get the definition of sp_execresultset from a
SQL 2000 server and create it in the master database of a SQL 2005 server
and get the same behavior.
--
HTH
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
http://sqlblog.com
"Ant" <Ant@.discussions.microsoft.com> wrote in message
news:E46E8721-4815-4025-8C0E-D2092AF975DF@.microsoft.com...
> Thank you.
> Can this be done with Dynamic SQL? I'm sure I've done this before without
> having to resort to using a Cursor(?)
>
> "Uri Dimant" wrote:
>> Ant
>> DECLARE @.DeleteTrigger nvarchar(4000)
>> DECLARE DeleteTrigger CURSOR LOCAL FAST_FORWARD
>> FOR
>> SELECT N'DROP TRIGGER ' + name FROM SYSOBJECTS WHERE type = 'TR'
>> OPEN DeleteTrigger
>> WHILE 1 = 1
>> BEGIN
>> FETCH NEXT FROM DeleteTrigger INTO @.DeleteTrigger
>> IF @.@.FETCH_STATUS <> 0 BREAK
>> RAISERROR (@.DeleteTrigger , 0, 1) WITH NOWAIT
>> EXEC(@.DeleteTrigger)
>> END
>> CLOSE DeleteTrigger
>> DEALLOCATE DeleteTrigger
>>
>>
>> "Ant" <Ant@.discussions.microsoft.com> wrote in message
>> news:A03F503E-6EF6-47EA-BAEB-4E52857F6F98@.microsoft.com...
>> > Hi Kalen,
>> >
>> > Apoligies but you might have to walk me through that.
>> >
>> > I tried:
>> >
>> > exec(SELECT DROP TRIGGER ' + name FROM SYSOBJECTS WHERE type = 'TR'
>> > )
>> >
>> > but naturally I got an error.
>> >
>> > How is this done?
>> >
>> > Many thanks for your answer.
>> > Ant
>> >
>> >
>> >
>> > "Kalen Delaney" wrote:
>> >
>> >> Hi Ant
>> >>
>> >> This SELECT will generate DROP TRIGGER statements, but it will not
>> >> execute
>> >> them to actually drop the triggers. You need to take the output and
>> >> execute
>> >> it.
>> >>
>> >> --
>> >> HTH
>> >> Kalen Delaney, SQL Server MVP
>> >> www.InsideSQLServer.com
>> >> http://sqlblog.com
>> >>
>> >>
>> >> "Ant" <Ant@.discussions.microsoft.com> wrote in message
>> >> news:16961357-9B6B-4878-9E5C-47C532BAF8EA@.microsoft.com...
>> >> > Hi,
>> >> > I'm using:
>> >> >
>> >> > SELECT 'DROP TRIGGER ' + name FROM SYSOBJECTS WHERE type = 'TR'
>> >> >
>> >> > I've used this on a number of occaisions but it doesn't seem to be
>> >> > dropping
>> >> > the triggers this time.
>> >> >
>> >> > Can anybody think of what I may be doing wrong here?
>> >> >
>> >> > Many thanks for any assistance in advance
>> >> >
>> >> > Ant
>> >>
>> >>
>> >>
>>|||Hello Uri,
Thank you for this solution. I thought I'd exhaust all possiblities before
commiting to this. It does seem to ber the best one.
Much appreciated & sorry for the late reply
Ant
"Uri Dimant" wrote:
> Ant
> DECLARE @.DeleteTrigger nvarchar(4000)
> DECLARE DeleteTrigger CURSOR LOCAL FAST_FORWARD
> FOR
> SELECT N'DROP TRIGGER ' + name FROM SYSOBJECTS WHERE type = 'TR'
> OPEN DeleteTrigger
> WHILE 1 = 1
> BEGIN
> FETCH NEXT FROM DeleteTrigger INTO @.DeleteTrigger
> IF @.@.FETCH_STATUS <> 0 BREAK
> RAISERROR (@.DeleteTrigger , 0, 1) WITH NOWAIT
> EXEC(@.DeleteTrigger)
> END
> CLOSE DeleteTrigger
> DEALLOCATE DeleteTrigger
>
>
> "Ant" <Ant@.discussions.microsoft.com> wrote in message
> news:A03F503E-6EF6-47EA-BAEB-4E52857F6F98@.microsoft.com...
> > Hi Kalen,
> >
> > Apoligies but you might have to walk me through that.
> >
> > I tried:
> >
> > exec(SELECT DROP TRIGGER ' + name FROM SYSOBJECTS WHERE type = 'TR'
> > )
> >
> > but naturally I got an error.
> >
> > How is this done?
> >
> > Many thanks for your answer.
> > Ant
> >
> >
> >
> > "Kalen Delaney" wrote:
> >
> >> Hi Ant
> >>
> >> This SELECT will generate DROP TRIGGER statements, but it will not
> >> execute
> >> them to actually drop the triggers. You need to take the output and
> >> execute
> >> it.
> >>
> >> --
> >> HTH
> >> Kalen Delaney, SQL Server MVP
> >> www.InsideSQLServer.com
> >> http://sqlblog.com
> >>
> >>
> >> "Ant" <Ant@.discussions.microsoft.com> wrote in message
> >> news:16961357-9B6B-4878-9E5C-47C532BAF8EA@.microsoft.com...
> >> > Hi,
> >> > I'm using:
> >> >
> >> > SELECT 'DROP TRIGGER ' + name FROM SYSOBJECTS WHERE type = 'TR'
> >> >
> >> > I've used this on a number of occaisions but it doesn't seem to be
> >> > dropping
> >> > the triggers this time.
> >> >
> >> > Can anybody think of what I may be doing wrong here?
> >> >
> >> > Many thanks for any assistance in advance
> >> >
> >> > Ant
> >>
> >>
> >>
>
>

Sunday, March 25, 2012

Cannot display database properties windows in Sql server management studio.

I use sql server 2005 developer edition with service pack 1.

When i right click on a database and i select properties an error occured with the folowing stack trace

===================================

Cannot show requested dialog.

===================================

Cannot show requested dialog. (SqlMgmt)


Program Location:

at Microsoft.SqlServer.Management.SqlMgmt.DefaultLaunchFormHostedControlAllocator.AllocateDialog(XmlDocument initializationXml, IServiceProvider dialogServiceProvider, CDataContainer dc)
at Microsoft.SqlServer.Management.SqlMgmt.DefaultLaunchFormHostedControlAllocator.Microsoft.SqlServer.Management.SqlMgmt.ILaunchFormHostedControlAllocator.CreateDialog(XmlDocument initializationXml, IServiceProvider dialogServiceProvider)
at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm.InitializeForm(XmlDocument doc, IServiceProvider provider, ISqlControlCollection control)
at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm..ctor(XmlDocument doc, IServiceProvider provider)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItem.OnCreateAndShowForm(IServiceProvider sp, XmlDocument doc)
at Microsoft.SqlServer.Management.SqlMgmt.RunningFormsTable.RunningFormsTableImpl.ThreadStarter.StartThread()

===================================

Object reference not set to an instance of an object. (System.Data)


Program Location:

at System.Data.SqlClient.TdsParserStateObject.ReadStringWithEncoding(Int32 length, Encoding encoding, Boolean isPlp)
at System.Data.SqlClient.TdsParser.ReadSqlStringValue(SqlBuffer value, Byte type, Int32 length, Encoding encoding, Boolean isPlp, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.ReadSqlValue(SqlBuffer value, SqlMetaDataPriv md, Int32 length, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ReadColumnData()
at System.Data.SqlClient.SqlDataReader.ReadColumn(Int32 i, Boolean setTimeout)
at System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetValues(Object[] values)
at Microsoft.SqlServer.Management.Smo.DataProvider.SetConnectionAndQuery(ExecuteSql execSql, String query)
at Microsoft.SqlServer.Management.Smo.ExecuteSql.GetDataProvider(StringCollection query, Object con, StatementBuilder sb, RetriveMode rm)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillData(ResultType resultType, StringCollection sql, Object connectionInfo, StatementBuilder sb)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillDataWithUseFailure(SqlEnumResult sqlresult, ResultType resultType)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.BuildResult(EnumResult result)
at Microsoft.SqlServer.Management.Smo.DatabaseLevel.GetData(EnumResult res)
at Microsoft.SqlServer.Management.Smo.Environment.GetData()
at Microsoft.SqlServer.Management.Smo.Environment.GetData(Request req, Object ci)
at Microsoft.SqlServer.Management.Smo.Enumerator.GetData(Object connectionInfo, Request request)
at Microsoft.SqlServer.Management.Smo.ExecutionManager.GetEnumeratorDataReader(Request req)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.GetInitDataReader(String[] fields, OrderBy[] orderby)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.ImplInitialize(String[] fields, OrderBy[] orderby)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.Initialize(Boolean allProperties)
at Microsoft.SqlServer.Management.Smo.SmoCollectionBase.GetObjectByKey(ObjectKeyBase key)
at Microsoft.SqlServer.Management.Smo.DatabaseCollection.get_Item(String name)
at Microsoft.SqlServer.Management.SqlManagerUI.CreateDatabaseData.DatabasePrototype.DatabaseData..ctor(CDataContainer context, String databaseName)
at Microsoft.SqlServer.Management.SqlManagerUI.CreateDatabaseData.DatabasePrototype.LoadDefinition(String newName)
at Microsoft.SqlServer.Management.SqlManagerUI.CreateDatabaseData.DatabasePrototype..ctor(CDataContainer context)
at Microsoft.SqlServer.Management.SqlManagerUI.DBPropSheet..ctor(CDataContainer context)

Accroding to the reflected sources:

public DatabaseData(CDataContainer context, string databaseName)
{
this.mirrorSafetyLevel = MirroringSafetyLevel.Off;
this.witnessServer = string.Empty;
Database database1 = context.Server.Databases[databaseName];


There might be a problem in getting the information from the database collection. So do the following steps:

-Run the profiler to the when the execution of the command stops. (Guess it has to do something with the database name)
-Select the database name from the sysdatabases and post it here

SELECT Name, DATALENGTH(Name),LEN(Name) from sys.databases

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

When i try to create a new view, in any of the databases i saw an error


Object reference not set to an instance of an object. (SQLEditors)


Program Location:

at System.Data.SqlClient.TdsParserStateObject.ReadStringWithEncoding(Int32 length, Encoding encoding, Boolean isPlp)
at System.Data.SqlClient.TdsParser.ReadSqlStringValue(SqlBuffer value, Byte type, Int32 length, Encoding encoding, Boolean isPlp, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.ReadSqlValue(SqlBuffer value, SqlMetaDataPriv md, Int32 length, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ReadColumnData()
at System.Data.SqlClient.SqlDataReader.ReadColumn(Int32 i, Boolean setTimeout)
at System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetValues(Object[] values)
at Microsoft.SqlServer.Management.Smo.DataProvider.SetConnectionAndQuery(ExecuteSql execSql, String query)
at Microsoft.SqlServer.Management.Smo.ExecuteSql.GetDataProvider(StringCollection query, Object con, StatementBuilder sb, RetriveMode rm)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillData(ResultType resultType, StringCollection sql, Object connectionInfo, StatementBuilder sb)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillDataWithUseFailure(SqlEnumResult sqlresult, ResultType resultType)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.BuildResult(EnumResult result)
at Microsoft.SqlServer.Management.Smo.DatabaseLevel.GetData(EnumResult res)
at Microsoft.SqlServer.Management.Smo.Environment.GetData()
at Microsoft.SqlServer.Management.Smo.Environment.GetData(Request req, Object ci)
at Microsoft.SqlServer.Management.Smo.Enumerator.GetData(Object connectionInfo, Request request)
at Microsoft.SqlServer.Management.Smo.ExecutionManager.GetEnumeratorDataReader(Request req)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.GetInitDataReader(String[] fields, OrderBy[] orderby)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.ImplInitialize(String[] fields, OrderBy[] orderby)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.OnPropertyMissing(String propname)
at Microsoft.SqlServer.Management.Smo.Database.get_DefaultSchema()
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDataDesignerNode.GetDefaultSchema(Server server, String databaseName)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDataDesignerNode.GenerateNewObjectUrn()
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDataDesignerNode.SetObjectAndParentUrns(Urn originalUrn)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VirtualProjectNode..ctor(Urn urn, DocumentOptions options, IManagedConnection connection)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VirtualProjectNode.Allocate(Urn origUrn, DocumentType editorType, DocumentOptions options, IManagedConnection connection)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VirtualProject.Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ISqlVirtualProject.CreateDesigner(Urn origUrn, DocumentType editorType, DocumentOptions aeOptions, IManagedConnection con)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ISqlVirtualProject.CreateDesigner(Urn origUrn, DocumentType editorType, DocumentOptions aeOptions, IManagedConnection con)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDocumentMenuItem.CreateDesignerWindow(IManagedConnection mc, DocumentOptions options)

I think that there is a problem with the server installation. I will try to reinstalle it.

|||If you want to solve the problem, follow the mentioned steps to reproduce the executed script on the server. That might also help others to solve their problems and help to improve the product itself.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Hi,

Please make sure the database exists and is not deleted by clicking refresh on the server node and see if you can still see the database whose properties you were not able to access. I believe the database was dropped by some other means and your SSMS window was not refreshed after that.

Hope this helps.

Thanks,

Sravanthi.

|||Stack trace dump means there might be a probelm with the Windows, a virus or mismatch of hotfix/service pack on operating system. Make sure to check what has been changed since this was working correctly in previous state, if not you might try testing the same on other machine.|||All databases are in place. i can open tables and see their data.|||

thats what i believe too.

The problem appears after an update from microsoft windows update which find that my windows sql server installation need the service pack 1 update. I selected and install it.

after that i download and install service pack 2 for sql server 2005 but of course this doesn't correct anything.

I have in the same computer a sqlserver express edition installed and from microsoft sql server managment studio i can work properly with this instance without a problem (in case i thought that was a problem from microsoft sql server managment studio).

About response from Jens K. Suessmeyer .

Whene i execute the line

SELECT 'AdventureWorks', DATALENGTH('AdventureWorks'),LEN('AdventureWorks') from sys.databases

i get

'An error occurred while executing batch. Error message is: Object reference not set to an instance of an object.'

with any database there are in this installation.


|||

Hi,

From where are you running the queries? Please run the query SELECT Name, DATALENGTH(Name),LEN(Name) from sys.databases (run it as is as Jens K. Suessmeyer has given, dont replace Name in the query, if you want it specific to AdventureWorks just add a where clause). Run this query from new query window in SSMS and let us know the output. From the error that you are getting "Object reference..." looks like you are trying to run the query programmatically. Just run it from a SSMS query window and let us know the output. Make sure the database that is causing all these issues comes up in the query result.

Sravanthi

|||If you believe its SSMS tools problem, try to reinstall them again.|||

All databases causing that issues

The result after executing the above query is

NAME (no column name) (no column name)

master 12 6
tempdb 12 6
model 10 5
msdb 8 4
ReportServer$MAIMOY2005 46 23
ReportServer$MAIMOY2005TempDB 58 29
BASE DE DATOS ORIGINAL 44 22
ALKI 8 4
aspnetdb_ALKI 26 13
AdventureWorks 28 14
AdventureWorksDW 32 16

(11 row(s) affected)

|||After a full uninstall and reinstall everything seems to work perfect. Aftes installation i install also service pack 2 downloaded and installed locally and everything works properly.|||

somehow, i missed this thread and I am sure if I could furnish this information bit earlier it would have been helpful. nevertheless, i think i should share my experience in this regards. the story is as follows :)

One of our development server had the same problem and I have documented this error. But at that time I was on the tows and somehow I was to get rid of this problem and I did the same trick - reinstalling the SQL Server. But I was not satisfied by this solution. when I did the postmortem of the process then I realized that our TL used to synchronies the Development database from Visio. There were many connection used to connect to different database (from visio) and one of them was to connect to master database. He used the master connection , and Visio automatically detects the objects in the connected database which are not there in the Model and it ask whether u want to delete those object or not. He selected Yes and Visio deleted all the objects from master database which are not there in the model. I verified the objects between two instances Master databases. There were five system tables missing , the missing tables were spt_fallback_db,spt_fallback_dev,spt_fallback_usg,spt_monitor,spt_value. Then I created the script of these tables from other instance and run on the problem server, but those tables were not having owner , though it shows owner as DBO. Actually these tables comes under System Tables tree but when I created these by the script those created as user table. I was pretty sure that these problem were because of these tables got deleted. But I was not having time to do R&D on this and I reinstalled the instance.

(a) How come Visio able to delete system tables (the irony is that , in SSMO these tables are shown as System Tables , but if u use sp_help it is shown as Usertable).

(b) IF somehow these tables got deleted, how can we restore these table and revert back to normal stage without reinstalling anything.

Also question to Antonisk, is something like this was happened in your side…

I think we need to dig out the root of this problem. If these tables are so critical , then these should not be deletable from anywhere. If it is a bug the we need to report this to MS..

Thanks for the time

Madhu

|||I don't use Visio at all. Also i can't check if this was the problem (system tables missing) because I reinstall the Sql Server.

Cannot display database properties windows in Sql server management studio.

I use sql server 2005 developer edition with service pack 1.

When i right click on a database and i select properties an error occured with the folowing stack trace

===================================

Cannot show requested dialog.

===================================

Cannot show requested dialog. (SqlMgmt)


Program Location:

at Microsoft.SqlServer.Management.SqlMgmt.DefaultLaunchFormHostedControlAllocator.AllocateDialog(XmlDocument initializationXml, IServiceProvider dialogServiceProvider, CDataContainer dc)
at Microsoft.SqlServer.Management.SqlMgmt.DefaultLaunchFormHostedControlAllocator.Microsoft.SqlServer.Management.SqlMgmt.ILaunchFormHostedControlAllocator.CreateDialog(XmlDocument initializationXml, IServiceProvider dialogServiceProvider)
at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm.InitializeForm(XmlDocument doc, IServiceProvider provider, ISqlControlCollection control)
at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm..ctor(XmlDocument doc, IServiceProvider provider)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItem.OnCreateAndShowForm(IServiceProvider sp, XmlDocument doc)
at Microsoft.SqlServer.Management.SqlMgmt.RunningFormsTable.RunningFormsTableImpl.ThreadStarter.StartThread()

===================================

Object reference not set to an instance of an object. (System.Data)


Program Location:

at System.Data.SqlClient.TdsParserStateObject.ReadStringWithEncoding(Int32 length, Encoding encoding, Boolean isPlp)
at System.Data.SqlClient.TdsParser.ReadSqlStringValue(SqlBuffer value, Byte type, Int32 length, Encoding encoding, Boolean isPlp, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.ReadSqlValue(SqlBuffer value, SqlMetaDataPriv md, Int32 length, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ReadColumnData()
at System.Data.SqlClient.SqlDataReader.ReadColumn(Int32 i, Boolean setTimeout)
at System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetValues(Object[] values)
at Microsoft.SqlServer.Management.Smo.DataProvider.SetConnectionAndQuery(ExecuteSql execSql, String query)
at Microsoft.SqlServer.Management.Smo.ExecuteSql.GetDataProvider(StringCollection query, Object con, StatementBuilder sb, RetriveMode rm)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillData(ResultType resultType, StringCollection sql, Object connectionInfo, StatementBuilder sb)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillDataWithUseFailure(SqlEnumResult sqlresult, ResultType resultType)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.BuildResult(EnumResult result)
at Microsoft.SqlServer.Management.Smo.DatabaseLevel.GetData(EnumResult res)
at Microsoft.SqlServer.Management.Smo.Environment.GetData()
at Microsoft.SqlServer.Management.Smo.Environment.GetData(Request req, Object ci)
at Microsoft.SqlServer.Management.Smo.Enumerator.GetData(Object connectionInfo, Request request)
at Microsoft.SqlServer.Management.Smo.ExecutionManager.GetEnumeratorDataReader(Request req)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.GetInitDataReader(String[] fields, OrderBy[] orderby)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.ImplInitialize(String[] fields, OrderBy[] orderby)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.Initialize(Boolean allProperties)
at Microsoft.SqlServer.Management.Smo.SmoCollectionBase.GetObjectByKey(ObjectKeyBase key)
at Microsoft.SqlServer.Management.Smo.DatabaseCollection.get_Item(String name)
at Microsoft.SqlServer.Management.SqlManagerUI.CreateDatabaseData.DatabasePrototype.DatabaseData..ctor(CDataContainer context, String databaseName)
at Microsoft.SqlServer.Management.SqlManagerUI.CreateDatabaseData.DatabasePrototype.LoadDefinition(String newName)
at Microsoft.SqlServer.Management.SqlManagerUI.CreateDatabaseData.DatabasePrototype..ctor(CDataContainer context)
at Microsoft.SqlServer.Management.SqlManagerUI.DBPropSheet..ctor(CDataContainer context)

Accroding to the reflected sources:

public DatabaseData(CDataContainer context, string databaseName)
{
this.mirrorSafetyLevel = MirroringSafetyLevel.Off;
this.witnessServer = string.Empty;
Database database1 = context.Server.Databases[databaseName];


There might be a problem in getting the information from the database collection. So do the following steps:

-Run the profiler to the when the execution of the command stops. (Guess it has to do something with the database name)
-Select the database name from the sysdatabases and post it here

SELECT Name, DATALENGTH(Name),LEN(Name) from sys.databases

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

When i try to create a new view, in any of the databases i saw an error


Object reference not set to an instance of an object. (SQLEditors)


Program Location:

at System.Data.SqlClient.TdsParserStateObject.ReadStringWithEncoding(Int32 length, Encoding encoding, Boolean isPlp)
at System.Data.SqlClient.TdsParser.ReadSqlStringValue(SqlBuffer value, Byte type, Int32 length, Encoding encoding, Boolean isPlp, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.ReadSqlValue(SqlBuffer value, SqlMetaDataPriv md, Int32 length, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ReadColumnData()
at System.Data.SqlClient.SqlDataReader.ReadColumn(Int32 i, Boolean setTimeout)
at System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetValues(Object[] values)
at Microsoft.SqlServer.Management.Smo.DataProvider.SetConnectionAndQuery(ExecuteSql execSql, String query)
at Microsoft.SqlServer.Management.Smo.ExecuteSql.GetDataProvider(StringCollection query, Object con, StatementBuilder sb, RetriveMode rm)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillData(ResultType resultType, StringCollection sql, Object connectionInfo, StatementBuilder sb)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillDataWithUseFailure(SqlEnumResult sqlresult, ResultType resultType)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.BuildResult(EnumResult result)
at Microsoft.SqlServer.Management.Smo.DatabaseLevel.GetData(EnumResult res)
at Microsoft.SqlServer.Management.Smo.Environment.GetData()
at Microsoft.SqlServer.Management.Smo.Environment.GetData(Request req, Object ci)
at Microsoft.SqlServer.Management.Smo.Enumerator.GetData(Object connectionInfo, Request request)
at Microsoft.SqlServer.Management.Smo.ExecutionManager.GetEnumeratorDataReader(Request req)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.GetInitDataReader(String[] fields, OrderBy[] orderby)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.ImplInitialize(String[] fields, OrderBy[] orderby)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.OnPropertyMissing(String propname)
at Microsoft.SqlServer.Management.Smo.Database.get_DefaultSchema()
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDataDesignerNode.GetDefaultSchema(Server server, String databaseName)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDataDesignerNode.GenerateNewObjectUrn()
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDataDesignerNode.SetObjectAndParentUrns(Urn originalUrn)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VirtualProjectNode..ctor(Urn urn, DocumentOptions options, IManagedConnection connection)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VirtualProjectNode.Allocate(Urn origUrn, DocumentType editorType, DocumentOptions options, IManagedConnection connection)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VirtualProject.Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ISqlVirtualProject.CreateDesigner(Urn origUrn, DocumentType editorType, DocumentOptions aeOptions, IManagedConnection con)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ISqlVirtualProject.CreateDesigner(Urn origUrn, DocumentType editorType, DocumentOptions aeOptions, IManagedConnection con)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDocumentMenuItem.CreateDesignerWindow(IManagedConnection mc, DocumentOptions options)

I think that there is a problem with the server installation. I will try to reinstalle it.

|||If you want to solve the problem, follow the mentioned steps to reproduce the executed script on the server. That might also help others to solve their problems and help to improve the product itself.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Hi,

Please make sure the database exists and is not deleted by clicking refresh on the server node and see if you can still see the database whose properties you were not able to access. I believe the database was dropped by some other means and your SSMS window was not refreshed after that.

Hope this helps.

Thanks,

Sravanthi.

|||Stack trace dump means there might be a probelm with the Windows, a virus or mismatch of hotfix/service pack on operating system. Make sure to check what has been changed since this was working correctly in previous state, if not you might try testing the same on other machine.|||All databases are in place. i can open tables and see their data.|||

thats what i believe too.

The problem appears after an update from microsoft windows update which find that my windows sql server installation need the service pack 1 update. I selected and install it.

after that i download and install service pack 2 for sql server 2005 but of course this doesn't correct anything.

I have in the same computer a sqlserver express edition installed and from microsoft sql server managment studio i can work properly with this instance without a problem (in case i thought that was a problem from microsoft sql server managment studio).

About response from Jens K. Suessmeyer .

Whene i execute the line

SELECT 'AdventureWorks', DATALENGTH('AdventureWorks'),LEN('AdventureWorks') from sys.databases

i get

'An error occurred while executing batch. Error message is: Object reference not set to an instance of an object.'

with any database there are in this installation.


|||

Hi,

From where are you running the queries? Please run the query SELECT Name, DATALENGTH(Name),LEN(Name) from sys.databases (run it as is as Jens K. Suessmeyer has given, dont replace Name in the query, if you want it specific to AdventureWorks just add a where clause). Run this query from new query window in SSMS and let us know the output. From the error that you are getting "Object reference..." looks like you are trying to run the query programmatically. Just run it from a SSMS query window and let us know the output. Make sure the database that is causing all these issues comes up in the query result.

Sravanthi

|||If you believe its SSMS tools problem, try to reinstall them again.|||

All databases causing that issues

The result after executing the above query is

NAME (no column name) (no column name)

master 12 6
tempdb 12 6
model 10 5
msdb 8 4
ReportServer$MAIMOY2005 46 23
ReportServer$MAIMOY2005TempDB 58 29
BASE DE DATOS ORIGINAL 44 22
ALKI 8 4
aspnetdb_ALKI 26 13
AdventureWorks 28 14
AdventureWorksDW 32 16

(11 row(s) affected)

|||After a full uninstall and reinstall everything seems to work perfect. Aftes installation i install also service pack 2 downloaded and installed locally and everything works properly.|||

somehow, i missed this thread and I am sure if I could furnish this information bit earlier it would have been helpful. nevertheless, i think i should share my experience in this regards. the story is as follows :)

One of our development server had the same problem and I have documented this error. But at that time I was on the tows and somehow I was to get rid of this problem and I did the same trick - reinstalling the SQL Server. But I was not satisfied by this solution. when I did the postmortem of the process then I realized that our TL used to synchronies the Development database from Visio. There were many connection used to connect to different database (from visio) and one of them was to connect to master database. He used the master connection , and Visio automatically detects the objects in the connected database which are not there in the Model and it ask whether u want to delete those object or not. He selected Yes and Visio deleted all the objects from master database which are not there in the model. I verified the objects between two instances Master databases. There were five system tables missing , the missing tables were spt_fallback_db,spt_fallback_dev,spt_fallback_usg,spt_monitor,spt_value. Then I created the script of these tables from other instance and run on the problem server, but those tables were not having owner , though it shows owner as DBO. Actually these tables comes under System Tables tree but when I created these by the script those created as user table. I was pretty sure that these problem were because of these tables got deleted. But I was not having time to do R&D on this and I reinstalled the instance.

(a) How come Visio able to delete system tables (the irony is that , in SSMO these tables are shown as System Tables , but if u use sp_help it is shown as Usertable).

(b) IF somehow these tables got deleted, how can we restore these table and revert back to normal stage without reinstalling anything.

Also question to Antonisk, is something like this was happened in your side…

I think we need to dig out the root of this problem. If these tables are so critical , then these should not be deletable from anywhere. If it is a bug the we need to report this to MS..

Thanks for the time

Madhu

|||I don't use Visio at all. Also i can't check if this was the problem (system tables missing) because I reinstall the Sql Server.sql

Tuesday, March 20, 2012

Cannot create subscription in with Report Manager

While on the Report Delivery Options page if I click "Select Schedule" or
"OK" nothing happens; no error message, no postback, nothing in the logs,
nothing in a SQL Trace. I cannot create a File Share nor an e-mail
subcription.
I am able to programmaticaly (using ReportServer WebService and
ASP.NET/VB.NET) create a subscription but not with the Report Manager. Any
ideas?have you checked who you are logged into report manager as. What user. do
they have permissions to create a schedule?
"mbianco21" wrote:
> While on the Report Delivery Options page if I click "Select Schedule" or
> "OK" nothing happens; no error message, no postback, nothing in the logs,
> nothing in a SQL Trace. I cannot create a File Share nor an e-mail
> subcription.
> I am able to programmaticaly (using ReportServer WebService and
> ASP.NET/VB.NET) create a subscription but not with the Report Manager. Any
> ideas?sql

Cannot Create new View!

Ok, Here is the problem. I need to implement view to enforce a rule I have. I have the following SQL statement:

CREATE VIEW v_new_cable

AS SELECT Make_ID, Model_ID, PurchaseDate, Equipment_ID, Description, Vendor_ID, Image_ID

FROM Inventory$
WHERE Equipment_ID = '3' -- The number 3 represents a cable.

Anyway I check the syntax and that checks out ok. Then I get an Alert Message saying that:

The Query Designer does not suppor the CREATE VIEW SQL Contruct.

What does that mean and how do I fix this?

Thanks!What are you using to write the query, i.e. what editor?|||I am creating a new view. (right click new view)

I am then typing in the following into the middle white box.

(I'm a new to SQL Server)|||Dont know the answer to that one..try posting a question on this forum....:

http://www.sqlservercentral.com/forum/forum.asp?FORUM_ID=9&CAT_ID=1&Forum_Title=General|||when you use enterprise manager to create a view:
- to enter the select statement in the middle box
- click the save button in the left top
- enter the new for the view and press ok

If you want to type your complete statement yourself, you can use the Query Analyzer.

Sunday, March 11, 2012

Cannot create an instance of OLE DB provider "VFPOLEDB"

I created a view refer to a visual foxpro with ole db for visual foxpro which was working fine before. But now, I received an error while select the view

Msg 7302, Level 16, State 1, Line 1
Cannot create an instance of OLE DB provider "VFPOLEDB" for linked server "ORST3".

Please advise. Thanks in advance

Hi Stephanie,

You posted this question to microsoft.public.data.oledb on April 3. Later in the thread you said you were successful getting it working, partly due to enabling "Allow inprocess" in the OLE DB setup.

Is this a new problem since you posted on April 3?

Saturday, February 25, 2012

Cannot connect using ADO with Excel Microsoft Jet Provider 4.0

Hi:

I have a vb 6 app that exports data from sql to excel. The user has the ability to select either local or server. When they select server, the connection string is modified to include the server name instead of the local msde instance to look like this:

"provider=sqloledb;data source=MyServer;initial catalog=MyDatabase;user id=UserX;password=PasswordX;database=MyDatabase"

I'm using Microsoft Jet Provider 4.0 and OpenDataSource.

SELECT * INTO TempXL FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=C:\test\xltest.xls;Extended Properties=Excel 8.0')...[Sheet1$]

This code works fine when user is accessing msde on local, but when using above DSN, I receive the following message:

"2147217900 - OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEdB.4.0' IDBInitialize:: Initialize returned 0x800040005: The provider did not give any information about the error.]

When I trace the connection, these error messages occur:

Failed to set proper user name ('NT AUTHORITY\SYSTEM') for the connection

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot alter table 'TblXMyTable' because this table does not exist in database 'master'. (State 42S02) (Code 4902)

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'TblxMytable'. (State 42S02) (Code 208)

[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. The provider did not give any information about the error. (State 42000) (Code 7399)

[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the error.]. (State 01000) (Code 7300)

I am especially puzzled by the second message because I am specifying the database name in my connection string as:

"provider=sqloledb;data source=MyServer;initial catalog=MyDatabase;user id=UserX;password=PasswordX;database=MyDatabase"

I can read from the server copy and copy to Excel, but I cannot write back to SQL. Can someone please tell me what I'm doing wrong?

Thanks in advance for any help.,

I had a problem similar to this when working with VB6, DAO, ADO and SQL Server 2005.

One user could do a query, another user could not.

In fact, the error message was similar to yours. The error message claimed that the table we were trying to query did NOT EXIST.

So, I believe your problem lies with Security.

Try making the user a database owner of the database in question. If this solves your problem, then you can look for a way to set the permission/security correctly for the specifc tables they need access to.

Cannot connect using ADO with Excel Microsoft Jet Provider 4.0

Hi:

I have a vb 6 app that exports data from sql to excel. The user has the ability to select either local or server. When they select server, the connection string is modified to include the server name instead of the local msde instance to look like this:

"provider=sqloledb;data source=MyServer;initial catalog=MyDatabase;user id=UserX;password=PasswordX;database=MyDatabase"

I'm using Microsoft Jet Provider 4.0 and OpenDataSource.

SELECT * INTO TempXL FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=C:\test\xltest.xls;Extended Properties=Excel 8.0')...[Sheet1$]

This code works fine when user is accessing msde on local, but when using above DSN, I receive the following message:

"2147217900 - OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEdB.4.0' IDBInitialize:: Initialize returned 0x800040005: The provider did not give any information about the error.]

When I trace the connection, these error messages occur:

Failed to set proper user name ('NT AUTHORITY\SYSTEM') for the connection

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot alter table 'TblXMyTable' because this table does not exist in database 'master'. (State 42S02) (Code 4902)

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'TblxMytable'. (State 42S02) (Code 208)

[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. The provider did not give any information about the error. (State 42000) (Code 7399)

[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the error.]. (State 01000) (Code 7300)

I am especially puzzled by the second message because I am specifying the database name in my connection string as:

"provider=sqloledb;data source=MyServer;initial catalog=MyDatabase;user id=UserX;password=PasswordX;database=MyDatabase"

I can read from the server copy and copy to Excel, but I cannot write back to SQL. Can someone please tell me what I'm doing wrong?

Thanks in advance for any help.,

I had a problem similar to this when working with VB6, DAO, ADO and SQL Server 2005.

One user could do a query, another user could not.

In fact, the error message was similar to yours. The error message claimed that the table we were trying to query did NOT EXIST.

So, I believe your problem lies with Security.

Try making the user a database owner of the database in question. If this solves your problem, then you can look for a way to set the permission/security correctly for the specifc tables they need access to.