Showing posts with label version. Show all posts
Showing posts with label version. Show all posts

Friday, March 30, 2012

Having problems with Typed Xml

Here is my context ( SQL server version : 9.00.1116.00 ) ( CPT April )
1- I've created a "Business" Database
USE [Business]
GO
2- I've defined an Xml Schema Collection
create xml schema collection dbo.CustomerFile as
'<xs:schema xmlns="http://XmlSpaces.Tests"
targetNamespace="http://XmlSpaces.Tests"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="EntityType">
<xs:sequence />
<xs:attribute name="key" type="xs:string" />
<xs:attribute name="reference" type="xs:string" />
<xs:attribute name="creationDate" type="xs:dateTime" />
</xs:complexType>
<xs:simpleType name="CivilityCodification">
<xs:restriction base="xs:string">
<xs:enumeration value="Mr" />
<xs:enumeration value="Mm" />
<xs:enumeration value="Ml" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="CivilityType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="code" type="CivilityCodification" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="NameType">
<xs:sequence>
<xs:element name="Civility" type="CivilityType" />
<xs:element name="First" type="xs:string" />
<xs:element name="Last" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="AddressType">
<xs:sequence>
<xs:element name="Street" type="xs:string" />
<xs:element name="Zip" type="xs:string" />
<xs:element name="Town" type="xs:string" />
</xs:sequence>
<xs:attribute name="code" type="AddressCodification" />
</xs:complexType>
<xs:simpleType name="AddressCodification">
<xs:restriction base="xs:string">
<xs:enumeration value="Main" />
<xs:enumeration value="Office" />
<xs:enumeration value="Home" />
</xs:restriction>
</xs:simpleType>
<xs:element name="Address" type="AddressType" />
<xs:complexType name="CustomerType">
<xs:complexContent mixed="false">
<xs:extension base="EntityType">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="Name"
type="NameType" />
<xs:element minOccurs="0" maxOccurs="unbounded" ref="Address" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="Customer" type="CustomerType" />
</xs:schema>'
3- I've build a table that use this Schema definition
CREATE TABLE [dbo].[Customers]
(
[OID] [uniqueidentifier] ROWGUIDCOL NOT NULL DEFAULT (newid()),
[Reference] [nvarchar](50) COLLATE Latin1_General_CI_AI NOT NULL,
[XmlValue] [xml](DOCUMENT [dbo].[CustomerFile]) NOT NULL,
CONSTRAINT [Unique_CustomerByOID] PRIMARY KEY CLUSTERED
(
[OID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
GO
4- From what i understood the following statement should work but it doensn't
INSERT Customers ( Reference, XmlValue ) VALUES( 'CUSS-007',
'<Customer reference="CUSS-007" creationDate="2005-06-28T13:59:49.1548464"
xmlns="http://XmlSpaces.Tests">
<Name>
<Civility code="Mr">Mister</Civility>
<First>Brice</First>
<Last>Prunier</Last>
</Name>
<Address code="Main">
<Street>66 street A</Street>
<Zip>11111</Zip>
<Town>Seattle</Town>
</Address>
<Address code="Office">
<Street>33 Avenue B</Street>
<Zip>22222</Zip>
<Town>Los Angeles</Town>
</Address>
</Customer>' )
Trying the here above context raised the followings error
1- invalid format for Customer/@.creationDate
After switching xs:dateTime to xs:string i get :
Expected element : Name, http://XmlSpaces.Tests:Address where element
http://XmlSpaces.Tests:Name was specified
thanks for help
First issue:
In SQL Server 2005, we require a timezone on the value. So you either need
to change the type in the schema to xs:string (as you did) or add a timezone
to the value (e.g., append a Z). Also, in the April CTP (and June CTP) we do
not yet round to the millisecond precision but raise an error (we are
looking into changing that, although at this stage any functional change
needs lots of justification). So you should reduce the microseconds to
milliseconds.
Second issue:
You need to add
elementFormDefault="qualified"
to the xs:schema element.
Best regards
Michael
"Brice Prunier" <Brice Prunier@.discussions.microsoft.com> wrote in message
news:E28FD8F9-50CD-446D-8A0A-BB2775114B64@.microsoft.com...
> Here is my context ( SQL server version : 9.00.1116.00 ) ( CPT April )
> 1- I've created a "Business" Database
> USE [Business]
> GO
> 2- I've defined an Xml Schema Collection
> create xml schema collection dbo.CustomerFile as
> '<xs:schema xmlns="http://XmlSpaces.Tests"
> targetNamespace="http://XmlSpaces.Tests"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:complexType name="EntityType">
> <xs:sequence />
> <xs:attribute name="key" type="xs:string" />
> <xs:attribute name="reference" type="xs:string" />
> <xs:attribute name="creationDate" type="xs:dateTime" />
> </xs:complexType>
> <xs:simpleType name="CivilityCodification">
> <xs:restriction base="xs:string">
> <xs:enumeration value="Mr" />
> <xs:enumeration value="Mm" />
> <xs:enumeration value="Ml" />
> </xs:restriction>
> </xs:simpleType>
> <xs:complexType name="CivilityType">
> <xs:simpleContent>
> <xs:extension base="xs:string">
> <xs:attribute name="code" type="CivilityCodification" />
> </xs:extension>
> </xs:simpleContent>
> </xs:complexType>
> <xs:complexType name="NameType">
> <xs:sequence>
> <xs:element name="Civility" type="CivilityType" />
> <xs:element name="First" type="xs:string" />
> <xs:element name="Last" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> <xs:complexType name="AddressType">
> <xs:sequence>
> <xs:element name="Street" type="xs:string" />
> <xs:element name="Zip" type="xs:string" />
> <xs:element name="Town" type="xs:string" />
> </xs:sequence>
> <xs:attribute name="code" type="AddressCodification" />
> </xs:complexType>
> <xs:simpleType name="AddressCodification">
> <xs:restriction base="xs:string">
> <xs:enumeration value="Main" />
> <xs:enumeration value="Office" />
> <xs:enumeration value="Home" />
> </xs:restriction>
> </xs:simpleType>
> <xs:element name="Address" type="AddressType" />
> <xs:complexType name="CustomerType">
> <xs:complexContent mixed="false">
> <xs:extension base="EntityType">
> <xs:sequence>
> <xs:element minOccurs="0" maxOccurs="1" name="Name"
> type="NameType" />
> <xs:element minOccurs="0" maxOccurs="unbounded" ref="Address" />
> </xs:sequence>
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>
> <xs:element name="Customer" type="CustomerType" />
> </xs:schema>'
> 3- I've build a table that use this Schema definition
> CREATE TABLE [dbo].[Customers]
> (
> [OID] [uniqueidentifier] ROWGUIDCOL NOT NULL DEFAULT (newid()),
> [Reference] [nvarchar](50) COLLATE Latin1_General_CI_AI NOT NULL,
> [XmlValue] [xml](DOCUMENT [dbo].[CustomerFile]) NOT NULL,
> CONSTRAINT [Unique_CustomerByOID] PRIMARY KEY CLUSTERED
> (
> [OID] ASC
> ) ON [PRIMARY]
> ) ON [PRIMARY]
> GO
> 4- From what i understood the following statement should work but it
> doensn't
> INSERT Customers ( Reference, XmlValue ) VALUES( 'CUSS-007',
> '<Customer reference="CUSS-007" creationDate="2005-06-28T13:59:49.1548464"
> xmlns="http://XmlSpaces.Tests">
> <Name>
> <Civility code="Mr">Mister</Civility>
> <First>Brice</First>
> <Last>Prunier</Last>
> </Name>
> <Address code="Main">
> <Street>66 street A</Street>
> <Zip>11111</Zip>
> <Town>Seattle</Town>
> </Address>
> <Address code="Office">
> <Street>33 Avenue B</Street>
> <Zip>22222</Zip>
> <Town>Los Angeles</Town>
> </Address>
> </Customer>' )
> Trying the here above context raised the followings error
> 1- invalid format for Customer/@.creationDate
> After switching xs:dateTime to xs:string i get :
> Expected element : Name, http://XmlSpaces.Tests:Address where element
> http://XmlSpaces.Tests:Name was specified
> thanks for help
>

Wednesday, March 28, 2012

Having Problems exporting to Excel

Hi all,
I am facing problems while exporting a report to Excel format
I am using Excel 2000 bundled with MS Office 2000 and RS Evaluation version
Do I need to do any configurations,
Is any one facing the same issue or a problem with my installation
Can anyone help regarding this...
Regards,
GirishYou need RS SP1 to export to Excel 2000
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Girish Kumar" <GirishKumar@.discussions.microsoft.com> wrote in message
news:1F82A63A-32C4-45D0-9F5C-DC949A95B14C@.microsoft.com...
> Hi all,
> I am facing problems while exporting a report to Excel format
> I am using Excel 2000 bundled with MS Office 2000 and RS Evaluation
version
> Do I need to do any configurations,
> Is any one facing the same issue or a problem with my installation
> Can anyone help regarding this...
> Regards,
> Girish

Friday, March 23, 2012

Have anyone come across this issue?

Faulting application mmc.exe, version 5.2.3790.0, faulting module stardds.dll, version 2000.80.760.0, fault address 0x00013767.
Have anyone come across this issue??
LystraDid this happen on your server or a client?|||On the Server!

Lystra

Friday, March 9, 2012

hardware change

I am looking at having to do a hardware change in the
coming months.
The OS will be the same.
The version of SQL server will be the same.
My question is this:
Can I unattach all of the databases (including the system
databases) on the old server and then re-attach them on
the new server?
Would this gain me anything (like not having to re-create
jobs, etc)?
Just curious.
Thanks,
Adria
Hi,
Have a look into the below link for moving all the databases to new server.
Moving SQL Server Databases
http://www.support.microsoft.com/?id=224071
Moving Databases between Servers
http://www.support.microsoft.com/?id=314546
Thanks
Hari
MCDBA
"Adria" <a-carbo@.tamu.edu> wrote in message
news:e31d01c43c2e$d345b6a0$a301280a@.phx.gbl...
> I am looking at having to do a hardware change in the
> coming months.
> The OS will be the same.
> The version of SQL server will be the same.
> My question is this:
> Can I unattach all of the databases (including the system
> databases) on the old server and then re-attach them on
> the new server?
> Would this gain me anything (like not having to re-create
> jobs, etc)?
> Just curious.
> Thanks,
> Adria
|||Thank you very much. These two articles do a very good
job of explaining exactly how to do these things.
One question though ... is there an advantage to doing
things this way?
Best,
Adria

>--Original Message--
>Hi,
>Have a look into the below link for moving all the
databases to new server.
>Moving SQL Server Databases
>http://www.support.microsoft.com/?id=224071
>Moving Databases between Servers
>http://www.support.microsoft.com/?id=314546
>Thanks
>Hari
>MCDBA
|||Adria,
Using detach/attach? It's just a lot easier and usually results in less
problems/issues.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
<anonymous@.discussions.microsoft.com> wrote in message
news:e2d801c43c32$6618cff0$a501280a@.phx.gbl...
> Thank you very much. These two articles do a very good
> job of explaining exactly how to do these things.
> One question though ... is there an advantage to doing
> things this way?
> Best,
> Adria
> databases to new server.
>
|||Mark
I think the attach/detach may cause some problems rather BACKUP/RESTORE
commands.
Do you think so ,don't you?
"Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
news:#3N830EPEHA.1512@.TK2MSFTNGP10.phx.gbl...
> Adria,
> Using detach/attach? It's just a lot easier and usually results in less
> problems/issues.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> <anonymous@.discussions.microsoft.com> wrote in message
> news:e2d801c43c32$6618cff0$a501280a@.phx.gbl...
>

hardware change

I am looking at having to do a hardware change in the
coming months.
The OS will be the same.
The version of SQL server will be the same.
My question is this:
Can I unattach all of the databases (including the system
databases) on the old server and then re-attach them on
the new server?
Would this gain me anything (like not having to re-create
jobs, etc)?
Just curious.
Thanks,
AdriaHi,
Have a look into the below link for moving all the databases to new server.
Moving SQL Server Databases
http://www.support.microsoft.com/?id=224071
Moving Databases between Servers
http://www.support.microsoft.com/?id=314546
Thanks
Hari
MCDBA
"Adria" <a-carbo@.tamu.edu> wrote in message
news:e31d01c43c2e$d345b6a0$a301280a@.phx.gbl...
> I am looking at having to do a hardware change in the
> coming months.
> The OS will be the same.
> The version of SQL server will be the same.
> My question is this:
> Can I unattach all of the databases (including the system
> databases) on the old server and then re-attach them on
> the new server?
> Would this gain me anything (like not having to re-create
> jobs, etc)?
> Just curious.
> Thanks,
> Adria|||Thank you very much. These two articles do a very good
job of explaining exactly how to do these things.
One question though ... is there an advantage to doing
things this way?
Best,
Adria
>--Original Message--
>Hi,
>Have a look into the below link for moving all the
databases to new server.
>Moving SQL Server Databases
>http://www.support.microsoft.com/?id=224071
>Moving Databases between Servers
>http://www.support.microsoft.com/?id=314546
>Thanks
>Hari
>MCDBA|||Adria,
Using detach/attach? It's just a lot easier and usually results in less
problems/issues.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
<anonymous@.discussions.microsoft.com> wrote in message
news:e2d801c43c32$6618cff0$a501280a@.phx.gbl...
> Thank you very much. These two articles do a very good
> job of explaining exactly how to do these things.
> One question though ... is there an advantage to doing
> things this way?
> Best,
> Adria
> >--Original Message--
> >Hi,
> >
> >Have a look into the below link for moving all the
> databases to new server.
> >
> >Moving SQL Server Databases
> >http://www.support.microsoft.com/?id=224071
> >
> >Moving Databases between Servers
> >http://www.support.microsoft.com/?id=314546
> >
> >Thanks
> >Hari
> >MCDBA
>|||Mark
I think the attach/detach may cause some problems rather BACKUP/RESTORE
commands.
Do you think so ,don't you?
"Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
news:#3N830EPEHA.1512@.TK2MSFTNGP10.phx.gbl...
> Adria,
> Using detach/attach? It's just a lot easier and usually results in less
> problems/issues.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> <anonymous@.discussions.microsoft.com> wrote in message
> news:e2d801c43c32$6618cff0$a501280a@.phx.gbl...
> > Thank you very much. These two articles do a very good
> > job of explaining exactly how to do these things.
> >
> > One question though ... is there an advantage to doing
> > things this way?
> >
> > Best,
> > Adria
> >
> > >--Original Message--
> > >Hi,
> > >
> > >Have a look into the below link for moving all the
> > databases to new server.
> > >
> > >Moving SQL Server Databases
> > >http://www.support.microsoft.com/?id=224071
> > >
> > >Moving Databases between Servers
> > >http://www.support.microsoft.com/?id=314546
> > >
> > >Thanks
> > >Hari
> > >MCDBA
> >
>

hardware change

I am looking at having to do a hardware change in the
coming months.
The OS will be the same.
The version of SQL server will be the same.
My question is this:
Can I unattach all of the databases (including the system
databases) on the old server and then re-attach them on
the new server?
Would this gain me anything (like not having to re-create
jobs, etc)?
Just curious.
Thanks,
AdriaHi,
Have a look into the below link for moving all the databases to new server.
Moving SQL Server Databases
http://www.support.microsoft.com/?id=224071
Moving Databases between Servers
http://www.support.microsoft.com/?id=314546
Thanks
Hari
MCDBA
"Adria" <a-carbo@.tamu.edu> wrote in message
news:e31d01c43c2e$d345b6a0$a301280a@.phx.gbl...
> I am looking at having to do a hardware change in the
> coming months.
> The OS will be the same.
> The version of SQL server will be the same.
> My question is this:
> Can I unattach all of the databases (including the system
> databases) on the old server and then re-attach them on
> the new server?
> Would this gain me anything (like not having to re-create
> jobs, etc)?
> Just curious.
> Thanks,
> Adria|||Thank you very much. These two articles do a very good
job of explaining exactly how to do these things.
One question though ... is there an advantage to doing
things this way?
Best,
Adria

>--Original Message--
>Hi,
>Have a look into the below link for moving all the
databases to new server.
>Moving SQL Server Databases
>http://www.support.microsoft.com/?id=224071
>Moving Databases between Servers
>http://www.support.microsoft.com/?id=314546
>Thanks
>Hari
>MCDBA|||Adria,
Using detach/attach? It's just a lot easier and usually results in less
problems/issues.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
<anonymous@.discussions.microsoft.com> wrote in message
news:e2d801c43c32$6618cff0$a501280a@.phx.gbl...
> Thank you very much. These two articles do a very good
> job of explaining exactly how to do these things.
> One question though ... is there an advantage to doing
> things this way?
> Best,
> Adria
>
> databases to new server.
>|||Mark
I think the attach/detach may cause some problems rather BACKUP/RESTORE
commands.
Do you think so ,don't you?
"Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
news:#3N830EPEHA.1512@.TK2MSFTNGP10.phx.gbl...
> Adria,
> Using detach/attach? It's just a lot easier and usually results in less
> problems/issues.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> <anonymous@.discussions.microsoft.com> wrote in message
> news:e2d801c43c32$6618cff0$a501280a@.phx.gbl...
>