Showing posts with label includes. Show all posts
Showing posts with label includes. Show all posts

Wednesday, March 7, 2012

Including Views in Replication

I have a three server peer-to-peer replication setup that includes articles for tables and views. As I understand the BOL, scheme changes -- which I take to mean changes, amont other things, changes in the design of a table or view -- should automatically replicate to the other servers in the topology. Here are my quesitons:

When including a view as part of the publication, what is it, exactly, that is getting replicated? If all the tables supporting a given view are being replicated, and the view exists on all three boxes, whatelse, besides the view schema (and changes thereto) is being replicated?

Secondly, if in fact schema changes are replicated, why can't I modify a view that is part of a publication? When I try to make a change to such a view, I get a server timeout message, every single time. When I remove the view from the publication, I can make the modification with no trouble. What does replicating schema changes mean if I can't make changes to the schema?

Thanks for any enlightenment on this.

Randy

In general, when views are replicated, the schema definition of the view object is actually what gets replicated. After initial sync, there are no data changes tied to a view.

In non-peer-to-peer transactional replication, view schema changes are propagated from the publisher to the subscribers automatically. i.e. A view schema change could be changing the list of columns included in the view select statement.

Since you have a peer-to-peer topology set up there are more restrictions to consider. Check out the General Considerations under Peer-to-Peer replication in SQL Server 2005 Books Online. One of the restrictions is that any schema changes require the peer-to-peer topology to be quiesced (stopping activity on published tables at all nodes and ensuring that each node has received all changes from all other nodes).

Hope this helps,

Tom

This posting is provided "AS IS" with no warranties, and confers no rights.

|||

the resultset and content of the view can only be replicated if it is "indexed" if the view is not index the only thing that gets replicated is the view definition.

|||

Hi Randy,

I am interested to know more about your second issue (timeout when modify a view). Could you give me more details on your issue? For example, what statement do you use to modify a view, what is the origional view definition and what is the error message?

Thanks,

Peng

Include, Import and ReDefine

I read somewhere here by one of the members of the engine team that
they supported nested schemas but not includes. My problem is I'm
about 7 different schemas which all have includes. Something like
this:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xsi:schemaLocation="aCompany http://aCompanyxsd/DW1/Schemas/ASubDivision/DWLetter.xsd"
xmlns="aCompany" in the root element of the XML instance.
Within the aComany namespace schema is an include as well as an import
and a redefine. I'm wondering how other people deal with this kind of
situtation. Is there a work around. Also, is there a plan to support
complex schemas in Katmai?
Any replies welcome
Hello dba,

> I read somewhere here by one of the members of the engine team that
> they supported nested schemas but not includes. My problem is I'm
> about 7 different schemas which all have includes. Something like
> this:
<xsd:include>, <xsd:key>, <xsd:keyref>, <xsd:redefine>, and <xsd:unique>
are not supported. Import works but only if the reference schema is cataloged
into the same XML schema collection.

> Within the aComany namespace schema is an include as well as an import
> and a redefine.
My typically solution to this depends on if you are simply validating or
depending on the XSD to provide uniquness to the SQL definition. If simply
validating the easy work-around is to create a function in SQLCLR that consumes
the XML and the schema from the database and use

> I'm wondering how other people deal with this kind of
> situtation. Is there a work around. Also, is there a plan to support
> complex schemas in Katmai?
I doubt this will change for Katmai.
Thanks!
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/
|||Books online provides code to resolve the includes into a single XML Schema.
And no, we are not planning to support xs:include or xs:redefine in the next
version either.
If you want us to consider this in a future release, please file a feedback
item at http://connect.microsoft.com/sqlserver/feedback with your sample
schemas and - preferably - some motivations why these schemas are using
xs:redefine and xs:include.
Thanks and best regards
Michael
"Kent Tegels" <ktegels@.develop.com> wrote in message
news:18f2bcb115c588c97ccb8626890c@.news.microsoft.c om...
> Hello dba,
>
> <xsd:include>, <xsd:key>, <xsd:keyref>, <xsd:redefine>, and <xsd:unique>
> are not supported. Import works but only if the reference schema is
> cataloged into the same XML schema collection.
>
> My typically solution to this depends on if you are simply validating or
> depending on the XSD to provide uniquness to the SQL definition. If simply
> validating the easy work-around is to create a function in SQLCLR that
> consumes the XML and the schema from the database and use
> I doubt this will change for Katmai.
> Thanks!
> Kent Tegels
> DevelopMentor
> http://staff.develop.com/ktegels/
>

Include, Import and ReDefine

I read somewhere here by one of the members of the engine team that
they supported nested schemas but not includes. My problem is I'm
about 7 different schemas which all have includes. Something like
this:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xsi:schemaLocation="aCompany http://aCompanyxsd/DW1/Schemas/ASub...ter.
xsd"
xmlns="aCompany" in the root element of the XML instance.
Within the aComany namespace schema is an include as well as an import
and a redefine. I'm wondering how other people deal with this kind of
situtation. Is there a work around. Also, is there a plan to support
complex schemas in Katmai?
Any replies welcomeHello dba,

> I read somewhere here by one of the members of the engine team that
> they supported nested schemas but not includes. My problem is I'm
> about 7 different schemas which all have includes. Something like
> this:
<xsd:include>, <xsd:key>, <xsd:keyref>, <xsd:redefine>, and <xsd:unique>
are not supported. Import works but only if the reference schema is cataloge
d
into the same XML schema collection.

> Within the aComany namespace schema is an include as well as an import
> and a redefine.
My typically solution to this depends on if you are simply validating or
depending on the XSD to provide uniquness to the SQL definition. If simply
validating the easy work-around is to create a function in SQLCLR that consu
mes
the XML and the schema from the database and use

> I'm wondering how other people deal with this kind of
> situtation. Is there a work around. Also, is there a plan to support
> complex schemas in Katmai?
I doubt this will change for Katmai.
Thanks!
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/|||Books online provides code to resolve the includes into a single XML Schema.
And no, we are not planning to support xs:include or xs:redefine in the next
version either.
If you want us to consider this in a future release, please file a feedback
item at http://connect.microsoft.com/sqlserver/feedback with your sample
schemas and - preferably - some motivations why these schemas are using
xs:redefine and xs:include.
Thanks and best regards
Michael
"Kent Tegels" <ktegels@.develop.com> wrote in message
news:18f2bcb115c588c97ccb8626890c@.news.microsoft.com...
> Hello dba,
>
> <xsd:include>, <xsd:key>, <xsd:keyref>, <xsd:redefine>, and <xsd:unique>
> are not supported. Import works but only if the reference schema is
> cataloged into the same XML schema collection.
>
> My typically solution to this depends on if you are simply validating or
> depending on the XSD to provide uniquness to the SQL definition. If simply
> validating the easy work-around is to create a function in SQLCLR that
> consumes the XML and the schema from the database and use
> I doubt this will change for Katmai.
> Thanks!
> Kent Tegels
> DevelopMentor
> http://staff.develop.com/ktegels/
>

Friday, February 24, 2012

Include data in e-mail

I have about 150 people I would like to send e-mail automatically. Each
person would get a unique form letter that includes username and
password I have stored in a SQL table. Is this possible? Help
appreciated. Thanks.
Frank

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!Yes. Check out xp_sendmail
in the SQL documentation.

"Frank Py" <fpy@.proactnet.com> wrote in message
news:3fdf82b9$0$196$75868355@.news.frii.net...
> I have about 150 people I would like to send e-mail automatically. Each
> person would get a unique form letter that includes username and
> password I have stored in a SQL table. Is this possible? Help
> appreciated. Thanks.
> Frank
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!