Showing posts with label empty. Show all posts
Showing posts with label empty. Show all posts

Thursday, March 29, 2012

EnumObjectPermissions on a ApplicationRole and DatabaseRole objects returns o entries

HI,

Call to EnumObjectPermissions method on a SMO ApplicationRole or DatabseRole object returns an empty collection, however, a call to EnumDatabaseRoleMember on a DatabaseRole object using DMO returns the correct list of membership. Please clarify.

Regards,

Joginder

Hmm I had the same problem with SMO, but I did not try DMO.

I found a workaround. Use the similar method at the Database level, and supply the role name as a string.

using Microsoft.SqlServer.Management.Smo;

using Microsoft.SqlServer.Management.Common;

Database dbHold = smoServer.Databases["YourDB"];

String holdString;

foreach( DatabaseRole dr in dbHold.Roles)

{

ObjectPermissionInfo[] ra = dr.EnumObjectPermissions(); // mysteriously returns null!!

foreach (ObjectPermissionInfo opi in dbHold.EnumObjectPermissions(dr.Name))

{

holdString = String.Format("-OPIRole:{0} has {1}{2}{3}", dr.Name, opi.Grantor, opi.Grantee, opi.ObjectName);

}

}

}

Regards,

Chip

EnumObjectPermissions on a ApplicationRole and DatabaseRole objects returns o entries

HI,

Call to EnumObjectPermissions method on a SMO ApplicationRole or DatabseRole object returns an empty collection, however, a call to EnumDatabaseRoleMember on a DatabaseRole object using DMO returns the correct list of membership. Please clarify.

Regards,

Joginder

Hmm I had the same problem with SMO, but I did not try DMO.

I found a workaround. Use the similar method at the Database level, and supply the role name as a string.

using Microsoft.SqlServer.Management.Smo;

using Microsoft.SqlServer.Management.Common;

Database dbHold = smoServer.Databases["YourDB"];

String holdString;

foreach( DatabaseRole dr in dbHold.Roles)

{

ObjectPermissionInfo[] ra = dr.EnumObjectPermissions(); // mysteriously returns null!!

foreach (ObjectPermissionInfo opi in dbHold.EnumObjectPermissions(dr.Name))

{

holdString = String.Format("-OPIRole:{0} has {1}{2}{3}", dr.Name, opi.Grantor, opi.Grantee, opi.ObjectName);

}

}

}

Regards,

Chip

Thursday, March 22, 2012

Enterprise Mgr SQL 2000 doesn't list databases

I have something strange with my Enterprise Manager (SQL 2000). When in my
local server i cannot see my databases. The list is empty. If I go to Query
Analyzer on the same box, I can see all of them. Also in EM, under the
Management folder there is nothing to view. Any ideas what has happened?
Thanks in advance.
Does the registration in Enterprise manager use the same login as the one you
use in Query Analyzer? Does the user you login with to create your
registration have access to all of the tables and the management folder?
Russel Loski, MCSD.Net
"doug" wrote:

> I have something strange with my Enterprise Manager (SQL 2000). When in my
> local server i cannot see my databases. The list is empty. If I go to Query
> Analyzer on the same box, I can see all of them. Also in EM, under the
> Management folder there is nothing to view. Any ideas what has happened?
> Thanks in advance.
|||Yes.
When I try to create a new database through EM I get an arithmetic overflow
error. Do I have something corrupt in the master database? If I try a
'select * from sysdatabases' in the master database I get a row count and an
arithmetic overflow errror. See below.
"(21 row(s) affected)
Server: Msg 220, Level 16, State 1, Line 1
Arithmetic overflow error for data type smallint, value = 32789."
This is on a test SQL box, and I am not sure when the problem started. If I
cannot restore the master db from backup is there any way to repair it?
Thanks.
"RLoski" wrote:
[vbcol=seagreen]
> Does the registration in Enterprise manager use the same login as the one you
> use in Query Analyzer? Does the user you login with to create your
> registration have access to all of the tables and the management folder?
> --
> Russel Loski, MCSD.Net
>
> "doug" wrote:
|||doug wrote:
> I have something strange with my Enterprise Manager (SQL 2000). When in my
> local server i cannot see my databases. The list is empty. If I go to Query
> Analyzer on the same box, I can see all of them. Also in EM, under the
> Management folder there is nothing to view. Any ideas what has happened?
> Thanks in advance.
Do you have any databases currently "offline"? Do you also get the
error if you run:
SELECT * FROM master.dbo.sysdatabases
but not if you do:
SELECT dbid, name FROM master.dbo.sysdatabases
?
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||Yes, I do have 2 databases 'offline'.
I do not get the arithmetic overflow error if I just select the dbid and the
name.
"Tracy McKibben" wrote:

> doug wrote:
> Do you have any databases currently "offline"? Do you also get the
> error if you run:
> SELECT * FROM master.dbo.sysdatabases
> but not if you do:
> SELECT dbid, name FROM master.dbo.sysdatabases
> ?
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>
|||doug wrote:
> Yes, I do have 2 databases 'offline'.
> I do not get the arithmetic overflow error if I just select the dbid and the
> name.
>
Bring those databases online, then see if your problem goes away. Take
them offline again, and see if it continues to work after that. I
recall some obscure issue where the "version" column in the master
database gets corrupted when a database is taken offline. I don't
recall if this was fixed in a service pack or not.
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||Bringing the 2 'online' and then taking 'offline' has solved my problem.
Thank you for your help.
"Tracy McKibben" wrote:

> doug wrote:
> Bring those databases online, then see if your problem goes away. Take
> them offline again, and see if it continues to work after that. I
> recall some obscure issue where the "version" column in the master
> database gets corrupted when a database is taken offline. I don't
> recall if this was fixed in a service pack or not.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>

Enterprise Mgr SQL 2000 doesn't list databases

I have something strange with my Enterprise Manager (SQL 2000). When in my
local server i cannot see my databases. The list is empty. If I go to Query
Analyzer on the same box, I can see all of them. Also in EM, under the
Management folder there is nothing to view. Any ideas what has happened?
Thanks in advance.Does the registration in Enterprise manager use the same login as the one you
use in Query Analyzer? Does the user you login with to create your
registration have access to all of the tables and the management folder?
--
Russel Loski, MCSD.Net
"doug" wrote:
> I have something strange with my Enterprise Manager (SQL 2000). When in my
> local server i cannot see my databases. The list is empty. If I go to Query
> Analyzer on the same box, I can see all of them. Also in EM, under the
> Management folder there is nothing to view. Any ideas what has happened?
> Thanks in advance.|||Yes.
When I try to create a new database through EM I get an arithmetic overflow
error. Do I have something corrupt in the master database? If I try a
'select * from sysdatabases' in the master database I get a row count and an
arithmetic overflow errror. See below.
"(21 row(s) affected)
Server: Msg 220, Level 16, State 1, Line 1
Arithmetic overflow error for data type smallint, value = 32789."
This is on a test SQL box, and I am not sure when the problem started. If I
cannot restore the master db from backup is there any way to repair it?
Thanks.
"RLoski" wrote:
> Does the registration in Enterprise manager use the same login as the one you
> use in Query Analyzer? Does the user you login with to create your
> registration have access to all of the tables and the management folder?
> --
> Russel Loski, MCSD.Net
>
> "doug" wrote:
> > I have something strange with my Enterprise Manager (SQL 2000). When in my
> > local server i cannot see my databases. The list is empty. If I go to Query
> > Analyzer on the same box, I can see all of them. Also in EM, under the
> > Management folder there is nothing to view. Any ideas what has happened?
> >
> > Thanks in advance.|||doug wrote:
> I have something strange with my Enterprise Manager (SQL 2000). When in my
> local server i cannot see my databases. The list is empty. If I go to Query
> Analyzer on the same box, I can see all of them. Also in EM, under the
> Management folder there is nothing to view. Any ideas what has happened?
> Thanks in advance.
Do you have any databases currently "offline"? Do you also get the
error if you run:
SELECT * FROM master.dbo.sysdatabases
but not if you do:
SELECT dbid, name FROM master.dbo.sysdatabases
?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Yes, I do have 2 databases 'offline'.
I do not get the arithmetic overflow error if I just select the dbid and the
name.
"Tracy McKibben" wrote:
> doug wrote:
> > I have something strange with my Enterprise Manager (SQL 2000). When in my
> > local server i cannot see my databases. The list is empty. If I go to Query
> > Analyzer on the same box, I can see all of them. Also in EM, under the
> > Management folder there is nothing to view. Any ideas what has happened?
> >
> > Thanks in advance.
> Do you have any databases currently "offline"? Do you also get the
> error if you run:
> SELECT * FROM master.dbo.sysdatabases
> but not if you do:
> SELECT dbid, name FROM master.dbo.sysdatabases
> ?
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||doug wrote:
> Yes, I do have 2 databases 'offline'.
> I do not get the arithmetic overflow error if I just select the dbid and the
> name.
>
Bring those databases online, then see if your problem goes away. Take
them offline again, and see if it continues to work after that. I
recall some obscure issue where the "version" column in the master
database gets corrupted when a database is taken offline. I don't
recall if this was fixed in a service pack or not.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Bringing the 2 'online' and then taking 'offline' has solved my problem.
Thank you for your help.
"Tracy McKibben" wrote:
> doug wrote:
> > Yes, I do have 2 databases 'offline'.
> >
> > I do not get the arithmetic overflow error if I just select the dbid and the
> > name.
> >
> Bring those databases online, then see if your problem goes away. Take
> them offline again, and see if it continues to work after that. I
> recall some obscure issue where the "version" column in the master
> database gets corrupted when a database is taken offline. I don't
> recall if this was fixed in a service pack or not.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>

Enterprise Mgr SQL 2000 doesn't list databases

I have something strange with my Enterprise Manager (SQL 2000). When in my
local server i cannot see my databases. The list is empty. If I go to Quer
y
Analyzer on the same box, I can see all of them. Also in EM, under the
Management folder there is nothing to view. Any ideas what has happened?
Thanks in advance.Does the registration in Enterprise manager use the same login as the one yo
u
use in Query Analyzer? Does the user you login with to create your
registration have access to all of the tables and the management folder?
--
Russel Loski, MCSD.Net
"doug" wrote:

> I have something strange with my Enterprise Manager (SQL 2000). When in m
y
> local server i cannot see my databases. The list is empty. If I go to Qu
ery
> Analyzer on the same box, I can see all of them. Also in EM, under the
> Management folder there is nothing to view. Any ideas what has happened?
> Thanks in advance.|||Yes.
When I try to create a new database through EM I get an arithmetic overflow
error. Do I have something corrupt in the master database? If I try a
'select * from sysdatabases' in the master database I get a row count and an
arithmetic overflow errror. See below.
"(21 row(s) affected)
Server: Msg 220, Level 16, State 1, Line 1
Arithmetic overflow error for data type smallint, value = 32789."
This is on a test SQL box, and I am not sure when the problem started. If I
cannot restore the master db from backup is there any way to repair it?
Thanks.
"RLoski" wrote:
[vbcol=seagreen]
> Does the registration in Enterprise manager use the same login as the one
you
> use in Query Analyzer? Does the user you login with to create your
> registration have access to all of the tables and the management folder?
> --
> Russel Loski, MCSD.Net
>
> "doug" wrote:
>|||doug wrote:
> I have something strange with my Enterprise Manager (SQL 2000). When in m
y
> local server i cannot see my databases. The list is empty. If I go to Qu
ery
> Analyzer on the same box, I can see all of them. Also in EM, under the
> Management folder there is nothing to view. Any ideas what has happened?
> Thanks in advance.
Do you have any databases currently "offline"? Do you also get the
error if you run:
SELECT * FROM master.dbo.sysdatabases
but not if you do:
SELECT dbid, name FROM master.dbo.sysdatabases
?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Yes, I do have 2 databases 'offline'.
I do not get the arithmetic overflow error if I just select the dbid and the
name.
"Tracy McKibben" wrote:

> doug wrote:
> Do you have any databases currently "offline"? Do you also get the
> error if you run:
> SELECT * FROM master.dbo.sysdatabases
> but not if you do:
> SELECT dbid, name FROM master.dbo.sysdatabases
> ?
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||doug wrote:
> Yes, I do have 2 databases 'offline'.
> I do not get the arithmetic overflow error if I just select the dbid and t
he
> name.
>
Bring those databases online, then see if your problem goes away. Take
them offline again, and see if it continues to work after that. I
recall some obscure issue where the "version" column in the master
database gets corrupted when a database is taken offline. I don't
recall if this was fixed in a service pack or not.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Bringing the 2 'online' and then taking 'offline' has solved my problem.
Thank you for your help.
"Tracy McKibben" wrote:

> doug wrote:
> Bring those databases online, then see if your problem goes away. Take
> them offline again, and see if it continues to work after that. I
> recall some obscure issue where the "version" column in the master
> database gets corrupted when a database is taken offline. I don't
> recall if this was fixed in a service pack or not.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>

Sunday, March 11, 2012

Enterprise Manager problem

Using SQL2000 with Enterprise Manager - sometimes, when we try to expand any
tab, such as databases or management, it comes back as empty!! Only
rebooting the server will make it come back but then at some point it stops
working again!
Any ideas much appreciated...
Best regards
Mark
Hello Mark,
Have you tried to reinstall the Enterprise Manager?
Have you applied the latest services pack of the SQL Server?
Did this issue only occur on the local server or remote server?
Please try to reinstall the Enterprise Manager and let me know the result.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
|||Hi Wei Lu,
The problem happens on every client on which Enterprise Manager is
installed. It also happens if I make a remote connection. If we reboot the
server then the problem goes away on all clients but then just comes back
after a few days.
Interestingly, while the server is in this "broken" state, using SQL 2005
Management Studio seems to work with no problems.
Best regards
Mark
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:NdFWZcMSHHA.2268@.TK2MSFTNGHUB02.phx.gbl...
> Hello Mark,
> Have you tried to reinstall the Enterprise Manager?
> Have you applied the latest services pack of the SQL Server?
> Did this issue only occur on the local server or remote server?
> Please try to reinstall the Enterprise Manager and let me know the result.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
|||On Feb 6, 6:54 am, "Mark Baldwin" <sWoz...@.community.nospam> wrote:
> Hi Wei Lu,
> The problem happens on every client on which Enterprise Manager is
> installed. It also happens if I make a remote connection. If we reboot the
> server then the problem goes away on all clients but then just comes back
> after a few days.
> Interestingly, while the server is in this "broken" state, using SQL 2005
> Management Studio seems to work with no problems.
>
Wei Lu asked about service packs, you didn't answer. Are the CLIENTS
at the same service pack level as the SERVER? If not, you can see
strange things like this occur.
|||Hello Mark,
Have you applied the same service pack on all the clients?
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Enterprise Manager problem

Using SQL2000 with Enterprise Manager - sometimes, when we try to expand any
tab, such as databases or management, it comes back as empty!! Only
rebooting the server will make it come back but then at some point it stops
working again!
Any ideas much appreciated...
Best regards
MarkHello Mark,
Have you tried to reinstall the Enterprise Manager?
Have you applied the latest services pack of the SQL Server?
Did this issue only occur on the local server or remote server?
Please try to reinstall the Enterprise Manager and let me know the result.
Sincerely,
Wei Lu
Microsoft Online Community Support
========================================
==========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...t/default.aspx.
========================================
==========
(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Hi Wei Lu,
The problem happens on every client on which Enterprise Manager is
installed. It also happens if I make a remote connection. If we reboot the
server then the problem goes away on all clients but then just comes back
after a few days.
Interestingly, while the server is in this "broken" state, using SQL 2005
Management Studio seems to work with no problems.
Best regards
Mark
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:NdFWZcMSHHA.2268@.TK2MSFTNGHUB02.phx.gbl...
> Hello Mark,
> Have you tried to reinstall the Enterprise Manager?
> Have you applied the latest services pack of the SQL Server?
> Did this issue only occur on the local server or remote server?
> Please try to reinstall the Enterprise Manager and let me know the result.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ========================================
==========
> Get notification to my posts through email? Please refer to
> l]
> ications.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> [url]http://msdn.microsoft.com/subscriptions/support/default.aspx." target="_blank">http://msdn.microsoft.com/subscript...t/default.aspx.
> ========================================
==========
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>|||On Feb 6, 6:54 am, "Mark Baldwin" <sWoz...@.community.nospam> wrote:
> Hi Wei Lu,
> The problem happens on every client on which Enterprise Manager is
> installed. It also happens if I make a remote connection. If we reboot the
> server then the problem goes away on all clients but then just comes back
> after a few days.
> Interestingly, while the server is in this "broken" state, using SQL 2005
> Management Studio seems to work with no problems.
>
Wei Lu asked about service packs, you didn't answer. Are the CLIENTS
at the same service pack level as the SERVER? If not, you can see
strange things like this occur.|||Hello Mark,
Have you applied the same service pack on all the clients?
Sincerely,
Wei Lu
Microsoft Online Community Support
========================================
==========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...t/default.aspx.
========================================
==========
(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.

Enterprise Manager problem

Using SQL2000 with Enterprise Manager - sometimes, when we try to expand any
tab, such as databases or management, it comes back as empty!! Only
rebooting the server will make it come back but then at some point it stops
working again!
Any ideas much appreciated...
--
Best regards
MarkHello Mark,
Have you tried to reinstall the Enterprise Manager?
Have you applied the latest services pack of the SQL Server?
Did this issue only occur on the local server or remote server?
Please try to reinstall the Enterprise Manager and let me know the result.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Hi Wei Lu,
The problem happens on every client on which Enterprise Manager is
installed. It also happens if I make a remote connection. If we reboot the
server then the problem goes away on all clients but then just comes back
after a few days.
Interestingly, while the server is in this "broken" state, using SQL 2005
Management Studio seems to work with no problems.
--
Best regards
Mark
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:NdFWZcMSHHA.2268@.TK2MSFTNGHUB02.phx.gbl...
> Hello Mark,
> Have you tried to reinstall the Enterprise Manager?
> Have you applied the latest services pack of the SQL Server?
> Did this issue only occur on the local server or remote server?
> Please try to reinstall the Enterprise Manager and let me know the result.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>|||On Feb 6, 6:54 am, "Mark Baldwin" <sWoz...@.community.nospam> wrote:
> Hi Wei Lu,
> The problem happens on every client on which Enterprise Manager is
> installed. It also happens if I make a remote connection. If we reboot the
> server then the problem goes away on all clients but then just comes back
> after a few days.
> Interestingly, while the server is in this "broken" state, using SQL 2005
> Management Studio seems to work with no problems.
>
Wei Lu asked about service packs, you didn't answer. Are the CLIENTS
at the same service pack level as the SERVER? If not, you can see
strange things like this occur.|||Hello Mark,
Have you applied the same service pack on all the clients?
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.

Wednesday, February 15, 2012

Entering Empty Node Using An Updategram

Hi there,
I was wondering if anyone has found how to add an empty (not NULL) node
to an update. I found if you create a node you can get it to enter an
empty space by setting the default value to ('') on the database so
that when you query the data you have an empty node returned. The
problem I'm having is when I want to "blank" a node so I have something
like:
<before>
<node>Some text</node>
</before>
<after>
<node/>
</after>
which will result in a NULL value. Is there something I can put in the
after node that will result in it producing the same as ('') or
something to that effect?
Thanks,
GaryGary,
I'm assuming you are using the XML datatype and want to perform this DML via
the .modify() method.
In that case, you can use the replace value of DML statement. The new value
you want is "empty" or (). Here is an example:
declare @.x xml
set @.x = '<foo>bar</foo>'
set @.x.modify('replace value of /foo[1]/text()[1] with ()')
select @.x
You will most likely need to modify this DML if you are using a typed xml
column.
Regards,
Galex Yen
"Gary" wrote:

> Hi there,
> I was wondering if anyone has found how to add an empty (not NULL) node
> to an update. I found if you create a node you can get it to enter an
> empty space by setting the default value to ('') on the database so
> that when you query the data you have an empty node returned. The
> problem I'm having is when I want to "blank" a node so I have something
> like:
> <before>
> <node>Some text</node>
> </before>
> <after>
> <node/>
> </after>
> which will result in a NULL value. Is there something I can put in the
> after node that will result in it producing the same as ('') or
> something to that effect?
> Thanks,
> Gary
>|||you need to use xsi:nil. Here is the documentation and an example:
http://msdn2.microsoft.com/en-us/library/ms171764.aspx
<ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql"
xmlns:updg="urn:schemas-microsoft-com:xml-updategram"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<updg:sync mapping-schema='StudentSchema.xml'>
<updg:before/>
<updg:after>
<Student SID="S00004" lname="Elmaci" minitial="" years="2">
<fname xsi:nil="true">
</fname>
</Student>
</updg:after>
</updg:sync>
</ROOT>
"Gary" wrote:

> Hi there,
> I was wondering if anyone has found how to add an empty (not NULL) node
> to an update. I found if you create a node you can get it to enter an
> empty space by setting the default value to ('') on the database so
> that when you query the data you have an empty node returned. The
> problem I'm having is when I want to "blank" a node so I have something
> like:
> <before>
> <node>Some text</node>
> </before>
> <after>
> <node/>
> </after>
> which will result in a NULL value. Is there something I can put in the
> after node that will result in it producing the same as ('') or
> something to that effect?
> Thanks,
> Gary
>

Entering Empty Node Using An Updategram

Hi there,
I was wondering if anyone has found how to add an empty (not NULL) node
to an update. I found if you create a node you can get it to enter an
empty space by setting the default value to ('') on the database so
that when you query the data you have an empty node returned. The
problem I'm having is when I want to "blank" a node so I have something
like:
<before>
<node>Some text</node>
</before>
<after>
<node/>
</after>
which will result in a NULL value. Is there something I can put in the
after node that will result in it producing the same as ('') or
something to that effect?
Thanks,
Gary
Gary,
I'm assuming you are using the XML datatype and want to perform this DML via
the .modify() method.
In that case, you can use the replace value of DML statement. The new value
you want is "empty" or (). Here is an example:
declare @.x xml
set @.x = '<foo>bar</foo>'
set @.x.modify('replace value of /foo[1]/text()[1] with ()')
select @.x
You will most likely need to modify this DML if you are using a typed xml
column.
Regards,
Galex Yen
"Gary" wrote:

> Hi there,
> I was wondering if anyone has found how to add an empty (not NULL) node
> to an update. I found if you create a node you can get it to enter an
> empty space by setting the default value to ('') on the database so
> that when you query the data you have an empty node returned. The
> problem I'm having is when I want to "blank" a node so I have something
> like:
> <before>
> <node>Some text</node>
> </before>
> <after>
> <node/>
> </after>
> which will result in a NULL value. Is there something I can put in the
> after node that will result in it producing the same as ('') or
> something to that effect?
> Thanks,
> Gary
>
|||you need to use xsi:nil. Here is the documentation and an example:
http://msdn2.microsoft.com/en-us/library/ms171764.aspx
<ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql"
xmlns:updg="urn:schemas-microsoft-com:xml-updategram"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<updg:sync mapping-schema='StudentSchema.xml'>
<updg:before/>
<updg:after>
<Student SID="S00004" lname="Elmaci" minitial="" years="2">
<fname xsi:nil="true">
</fname>
</Student>
</updg:after>
</updg:sync>
</ROOT>
"Gary" wrote:

> Hi there,
> I was wondering if anyone has found how to add an empty (not NULL) node
> to an update. I found if you create a node you can get it to enter an
> empty space by setting the default value to ('') on the database so
> that when you query the data you have an empty node returned. The
> problem I'm having is when I want to "blank" a node so I have something
> like:
> <before>
> <node>Some text</node>
> </before>
> <after>
> <node/>
> </after>
> which will result in a NULL value. Is there something I can put in the
> after node that will result in it producing the same as ('') or
> something to that effect?
> Thanks,
> Gary
>