Showing posts with label via. Show all posts
Showing posts with label via. Show all posts

Tuesday, March 27, 2012

can not drop user from database

I'm getting the can't drop user error. Is there a way to change the schema owner via smo? I've tried the following code to change the schema owner back to a different user. I don't get an error or exception but the schema owner doesn't change.

Database database = new Server("my server").Databases["my Database"];

database.Schemas["db_owner"].Owner = "db_owner";

Never mind, the following worked.

Database database = new Server("my server").Databases["my Database"];

database.Schemas["db_owner"].Owner = "db_owner";

database.Schemas["db_owner"].Alter();

|||

John, giving that your question is SMO related, I split it from the thread you posted it in and I moved it to the SMO forum.

Thanks
Laurentiu

Tuesday, March 20, 2012

Can not change filter on model report - UPDATED 7th June

I have a very simple report based on a test model.

The report is filtered via a date field and runs ok.

If I try to change the filter I get the following error message:

Operation Failed

Short time pattern does not include hours and minutes

Does anyone know how I can correct this?

Regards

John

UPDATE

This only happens if I try to filter between two dates, a single date works correctly!

Can you please save report that fails to file and post it?|||

Alexandre

This is the rdl for the failing report.

<?xml version="1.0" encoding="utf-8"?>

<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

<Language>en-US</Language>

<BottomMargin>0.5in</BottomMargin>

<RightMargin>0.5in</RightMargin>

<DataSets>

<DataSet Name="dataSet">

<Query>

<DataSourceName>dataSource1</DataSourceName>

<CommandText>&lt;SemanticQuery xmlns="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rb="http://schemas.microsoft.com/sqlserver/2004/11/reportbuilder" xmlns:qd="http://schemas.microsoft.com/sqlserver/2004/11/semanticquerydesign"&gt;

&lt;Hierarchies&gt;

&lt;Hierarchy&gt;

&lt;BaseEntity&gt;

&lt;!--Epex Referral--&gt;

&lt;EntityID&gt;G066c76f8-9856-4acd-8b54-d734971da2c8&lt;/EntityID&gt;

&lt;/BaseEntity&gt;

&lt;Groupings&gt;

&lt;Grouping Name="Epex Referral"&gt;

&lt;Expression Name="Epex Referral"&gt;

&lt;EntityRef&gt;

&lt;!--Epex Referral--&gt;

&lt;EntityID&gt;G066c76f8-9856-4acd-8b54-d734971da2c8&lt;/EntityID&gt;

&lt;/EntityRef&gt;

&lt;/Expression&gt;

&lt;Details&gt;

&lt;Expression Name="Created"&gt;

&lt;AttributeRef&gt;

&lt;!--Created--&gt;

&lt;AttributeID&gt;G9a9689b0-64a7-49de-abae-58b8d30322e9&lt;/AttributeID&gt;

&lt;/AttributeRef&gt;

&lt;/Expression&gt;

&lt;Expression Name="Close Date"&gt;

&lt;AttributeRef&gt;

&lt;!--Close Date--&gt;

&lt;AttributeID&gt;G36ac2614-9e79-4c60-9c3e-fc45de7c67ec&lt;/AttributeID&gt;

&lt;/AttributeRef&gt;

&lt;/Expression&gt;

&lt;Expression Name="Patient"&gt;

&lt;Path&gt;

&lt;RolePathItem&gt;

&lt;!--Patient--&gt;

&lt;RoleID&gt;G036974d5-33a0-4096-bc96-166d82853818&lt;/RoleID&gt;

&lt;/RolePathItem&gt;

&lt;/Path&gt;

&lt;AttributeRef&gt;

&lt;!--Name--&gt;

&lt;AttributeID&gt;Gd6622d3c-8a4f-4273-a190-c8834bf90031&lt;/AttributeID&gt;

&lt;/AttributeRef&gt;

&lt;/Expression&gt;

&lt;Expression Name="expr1"&gt;

&lt;AttributeRef&gt;

&lt;!--Updated--&gt;

&lt;AttributeID&gt;Gfee3c95d-eb72-48c3-b372-0e2865ac44c8&lt;/AttributeID&gt;

&lt;/AttributeRef&gt;

&lt;/Expression&gt;

&lt;/Details&gt;

&lt;/Grouping&gt;

&lt;/Groupings&gt;

&lt;Filter&gt;

&lt;Expression Name="expr2"&gt;

&lt;Function&gt;

&lt;FunctionName&gt;And&lt;/FunctionName&gt;

&lt;Arguments&gt;

&lt;Expression&gt;

&lt;Function&gt;

&lt;FunctionName&gt;GreaterThanOrEquals&lt;/FunctionName&gt;

&lt;Arguments&gt;

&lt;Expression&gt;

&lt;AttributeRef&gt;

&lt;!--Created--&gt;

&lt;AttributeID&gt;G9a9689b0-64a7-49de-abae-58b8d30322e9&lt;/AttributeID&gt;

&lt;/AttributeRef&gt;

&lt;/Expression&gt;

&lt;Expression&gt;

&lt;Literal&gt;

&lt;DataType&gt;DateTime&lt;/DataType&gt;

&lt;Value&gt;2005-01-01T00:00:00&lt;/Value&gt;

&lt;/Literal&gt;

&lt;/Expression&gt;

&lt;/Arguments&gt;

&lt;/Function&gt;

&lt;/Expression&gt;

&lt;Expression&gt;

&lt;Function&gt;

&lt;FunctionName&gt;LessThanOrEquals&lt;/FunctionName&gt;

&lt;Arguments&gt;

&lt;Expression&gt;

&lt;AttributeRef&gt;

&lt;!--Created--&gt;

&lt;AttributeID&gt;G9a9689b0-64a7-49de-abae-58b8d30322e9&lt;/AttributeID&gt;

&lt;/AttributeRef&gt;

&lt;/Expression&gt;

&lt;Expression&gt;

&lt;Literal&gt;

&lt;DataType&gt;DateTime&lt;/DataType&gt;

&lt;Value&gt;2006-01-01T00:00:00&lt;/Value&gt;

&lt;/Literal&gt;

&lt;/Expression&gt;

&lt;/Arguments&gt;

&lt;/Function&gt;

&lt;/Expression&gt;

&lt;/Arguments&gt;

&lt;/Function&gt;

&lt;CustomProperties&gt;

&lt;CustomProperty Name="qd:FilterCondition" /&gt;

&lt;CustomProperty Name="qd:Filter" /&gt;

&lt;CustomProperty Name="qd:ContextEntityID"&gt;

&lt;Value xsi:type="xsd:string"&gt;G066c76f8-9856-4acd-8b54-d734971da2c8&lt;/Value&gt;

&lt;/CustomProperty&gt;

&lt;CustomProperty Name="qd:AutoChangeBaseEntity" /&gt;

&lt;CustomProperty Name="qd:Design"&gt;

&lt;Value xsi:type="xsd:string"&gt;expr3&lt;/Value&gt;

&lt;/CustomProperty&gt;

&lt;/CustomProperties&gt;

&lt;/Expression&gt;

&lt;/Filter&gt;

&lt;/Hierarchy&gt;

&lt;/Hierarchies&gt;

&lt;CalculatedAttributes&gt;

&lt;Expression Name="expr3"&gt;

&lt;Function&gt;

&lt;FunctionName&gt;And&lt;/FunctionName&gt;

&lt;Arguments&gt;

&lt;Expression&gt;

&lt;Function&gt;

&lt;FunctionName&gt;And&lt;/FunctionName&gt;

&lt;Arguments&gt;

&lt;Expression&gt;

&lt;Function&gt;

&lt;FunctionName&gt;GreaterThanOrEquals&lt;/FunctionName&gt;

&lt;Arguments&gt;

&lt;Expression&gt;

&lt;AttributeRef&gt;

&lt;!--Created--&gt;

&lt;AttributeID&gt;G9a9689b0-64a7-49de-abae-58b8d30322e9&lt;/AttributeID&gt;

&lt;/AttributeRef&gt;

&lt;/Expression&gt;

&lt;Expression&gt;

&lt;Literal&gt;

&lt;DataType&gt;DateTime&lt;/DataType&gt;

&lt;Value&gt;2005-01-01T00:00:00&lt;/Value&gt;

&lt;/Literal&gt;

&lt;/Expression&gt;

&lt;/Arguments&gt;

&lt;/Function&gt;

&lt;/Expression&gt;

&lt;Expression&gt;

&lt;Function&gt;

&lt;FunctionName&gt;LessThanOrEquals&lt;/FunctionName&gt;

&lt;Arguments&gt;

&lt;Expression&gt;

&lt;AttributeRef&gt;

&lt;!--Created--&gt;

&lt;AttributeID&gt;G9a9689b0-64a7-49de-abae-58b8d30322e9&lt;/AttributeID&gt;

&lt;/AttributeRef&gt;

&lt;/Expression&gt;

&lt;Expression&gt;

&lt;Literal&gt;

&lt;DataType&gt;DateTime&lt;/DataType&gt;

&lt;Value&gt;2006-01-01T00:00:00&lt;/Value&gt;

&lt;/Literal&gt;

&lt;/Expression&gt;

&lt;/Arguments&gt;

&lt;/Function&gt;

&lt;/Expression&gt;

&lt;/Arguments&gt;

&lt;/Function&gt;

&lt;CustomProperties&gt;

&lt;CustomProperty Name="qd:FilterCondition" /&gt;

&lt;/CustomProperties&gt;

&lt;/Expression&gt;

&lt;Expression&gt;

&lt;Null /&gt;

&lt;CustomPropertes&gt;

&lt;CustomProperty Name="qd:Unspecified" /&gt;

&lt;/CustomProperties&gt;

&lt;/Expression&gt;

&lt;/Arguments&gt;

&lt;/Function&gt;

&lt;CustomProperties&gt;

&lt;CustomProperty Name="qd:Filter" /&gt;

&lt;CustomProperty Name="qd:ContextEntityID"&gt;

&lt;Value xsi:type="xsd:string"&gt;G066c76f8-9856-4acd-8b54-d734971da2c8&lt;/Value&gt;

&lt;/CustomProperty&gt;

&lt;CustomProperty Name="qd:AutoChangeBaseEntity" /&gt;

&lt;/CustomProperties&gt;

&lt;/Expression&gt;

&lt;/CalculatedAttributes&gt;

&lt;/SemanticQuery&gt;</CommandText>

</Query>

<Fields>

<Field Name="EpexReferral">

<DataField>Epex Referral</DataField>

</Field>

<Field Name="Created">

<DataField>Created</DataField>

</Field>

<Field Name="CloseDate">

<DataField>Close Date</DataField>

</Field>

<Field Name="Patient">

<DataField>Patient</DataField>

</Field>

<Field Name="expr1">

<DataField>expr1</DataField>

</Field>

</Fields>

</DataSet>

</DataSets>

<DataSources>

<DataSource Name="dataSource1">

<DataSourceReference>/Models/Mars Cutdown</DataSourceReference>

<rd:DataSourceID>4d1edcd6-3c78-4e68-9566-ef952e495be4</rd:DataSourceID>

</DataSource>

</DataSources>

<PageHeight>11in</PageHeight>

<LeftMargin>0.5in</LeftMargin>

<TopMargin>0.5in</TopMargin>

<Width>7.5in</Width>

<Body>

<Height>0in</Height>

<ReportItems>

<Textbox Name="Title">

<Left>0.5in</Left>

<Top>0.5in</Top>

<CanGrow>true</CanGrow>

<Width>6.5in</Width>

<Value />

<Style>

<FontFamily>Tahoma</FontFamily>

<TextAlign>Left</TextAlign>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<FontWeight>Normal</FontWeight>

<FontSize>18pt</FontSize>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

<CustomProperties>

<CustomProperty>

<Name>rb:Watermark</Name>

<Value>Click to add title</Value>

</CustomProperty>

</CustomProperties>

<Height>0.375in</Height>

</Textbox>

<Table Name="table">

<Top>1.25in</Top>

<Details>

<TableRows>

<TableRow>

<TableCells>

<TableCell>

<ReportItems>

<Textbox Name="Created_Value">

<DataElementOutput>Output</DataElementOutput>

<CanGrow>true</CanGrow>

<Action>

<Drillthrough>

<ReportName>=DataSources!dataSource1.DataSourceReference</ReportName>

<Parameters>

<Parameter Name="rs:EntityID">

<Value>G066c76f8-9856-4acd-8b54-d734971da2c8</Value>

</Parameter>

<Parameter Name="rs:DrillType">

<Value>Detail</Value>

</Parameter>

<Parameter Name="rs:Command">

<Value>Drillthrough</Value>

</Parameter>

<Parameter Name="DrillthroughSourceQuery">

<Value>=DataSets!dataSet.RewrittenCommandText</Value>

</Parameter>

<Parameter Name="DrillthroughContext">

<Value>=CreateDrillthroughContext()</Value>

</Parameter>

</Parameters>

</Drillthrough>

</Action>

<Value>=Fields!Created.Value</Value>

<Styl>

<Language>en-US</Language>

<BorderColor>

<Default>LightGrey</Default>

</BorderColor>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<FontFamily>Tahoma</FontFamily>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<FontWeight>Normal</FontWeight>

<FontSize>8pt</FontSize>

<Format>d</Format>

<BackgroundColor>White</BackgroundColor>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

</Textbox>

</ReportItems>

</TableCell>

<TableCell>

<ReportItems>

<Textbox Name="CloseDate_Value">

<DataElementOutput>Output</DataElementOutput>

<CanGrow>true</CanGrow>

<Value>=Fields!CloseDate.Value</Value>

<Style>

<Language>en-US</Language>

<BorderColor>

<Default>LightGrey</Default>

</BorderColor>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<FontFamily>Tahoma</FontFamily>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<FontWeight>Normal</FontWeight>

<FontSize>8pt</FontSize>

<Format>d</Format>

<BackgroundColor>White</BackgroundColor>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

</Textbox>

</ReportItems>

</TableCell>

<TableCell>

<ReportItems>

<Textbox Name="Patient_Value">

<DataElementOutput>Output</DataElementOutput>

<CanGrow>true</CanGrow>

<Action>

<Drillthrough>

<ReportName>=DataSources!dataSource1.DataSourceReference</ReportName>

<Parameters>

<Parameter Name="rs:EntityID">

<Value>G2ceef5ce-4e09-4806-8e8c-9a4e4e8f35fa</Value>

</Parameter>

<Parameter Name="rs:DrillType">

<Value>Detail</Value>

</Parameter>

<Parameter Name="rs:Command">

<Value>Drillthrough</Value>

</Parameter>

<Parameter Name="DrillthroughSourceQuery">

<Value>=DataSets!dataSet.RewrittenCommandText</Value>

</Parameter>

<Parameter Name="DrillthroughContext">

<Value>=CreateDrillthroughContext()</Value>

</Parameter>

</Parameters>

</Drillthrough>

</Action>

<Value>=Fields!Patient.Value</Value>

<Style>

<Language>en-US</Language>

<BorderColor>

<Default>LightGrey</Default>

</BorderColor>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<FontFamily>Tahoma</FontFamily>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<FontWeight>Normal</FontWeight>

<FontSize>8pt</FontSize>

<BackgroundColor>White</BackgroundColor>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

</Textbox>

</ReportItems>

</TableCell>

</TableCells>

<Height>0.25in</Height>

</TableRow>

</TableRows>

<Grouping Name="table_EpexReferral">

<GroupExpressions>

<GroupExpression>=Fields!EpexReferral.Value</GroupExpression>

</GroupExpressions>

</Grouping>

<Sorting>

<SortBy>

<SortExpression>=IIf(True, Fields!expr1.Value, Nothing)</SortExpression>

<Direction>Descending</Direction>

</SortBy>

<SortBy>

<SortExpression>=IIf(True, Fields!Created.Value, Nothing)</SortExpression>

<Direction>Descending</Direction>

</SortBy>

</Sorting>

</Details>

<Style />

<Width>0in</Width>

<Height>0in</Height>

<DataSetName>dataSet</DataSetName>

<TableColumns>

<TableColumn>

<Width>0.90092in</Width>

<Visibility>

<Hidden>=Fields!Created.IsMissing</Hidden>

</Visibility>

</TableColumn>

<TableColumn>

<Width>1.06361in</Width>

<Visibility>

<Hidden>=Fields!CloseDate.IsMissing</Hidden>

</Visibility>

</TableColumn>

<TableColumn>

<Width>1.62189in</Width>

<Visibility>

<Hidden>=Fields!Patient.IsMissing</Hidden>

</Visibility>

</TableColumn>

</TableColumns>

<Header>

<TableRows>

<TableRow>

<TableCells>

<TableCell>

<ReportItems>

<Textbox Name="Created_Header">

<CanGrow>true</CanGrow>

<UserSort>

<SortExpression>=Fields!Created.Value</SortExpression>

<SortExpressionScope>table_EpexReferral</SortExpressionScope>

</UserSort>

<Value>Created</Value>

<Style>

<Language>en-US</Language>

<BorderColor>

<Default>LightGrey</Default>

</BorderColor>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<FontFamily>Tahoma</FontFamily>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<FontWeight>Bold</FontWeight>

<FontSize>8pt</FontSize>

<BackgroundColor>#518ae5</BackgroundColor>

<Color>White</Color>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

</Textbox>

</ReportItems>

</TableCell>

<TableCell>

<ReportItems>

<Textbox Name="CloseDate_Header">

<CanGrow>true</CanGrow>

<UserSort>

<SortExpression>=Fields!CloseDate.Value</SortExpression>

<SortExpressionScope>table_EpexReferral</SortExpressionScope>

</UserSort>

<Value>Close Date</Value>

<Style

<Language>en-US</Language>

<BorderColor>

<Default>LightGrey</Default>

</BorderColor>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<FontFamily>Tahoma</FontFamily>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<FontWeight>Bold</FontWeight>

<FontSize>8pt</FontSize>

<BackgroundColor>#518ae5</BackgroundColor>

<Color>White</Color>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

</Textbox>

</ReportItems>

</TableCell>

<TableCell>

<ReportItems>

<Textbox Name="Patient_Header">

<CanGrow>true</CanGrow>

<UserSort>

<SortExpression>=Fields!Patient.Value</SortExpression>

<SortExpressionScope>table_EpexReferral</SortExpressionScope>

</UserSort>

<Value>Patient</Value>

<Style>

<Language>en-US</Language>

<BorderColor>

<Default>LightGrey</Default>

</BorderColor>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<FontFamily>Tahoma</FontFamily>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<FontWeight>Bold</FontWeight>

<FontSize>8pt</FontSize>

<BackgroundColor>#518ae5</BackgroundColor>

<Color>White</Color>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

</Textbox>

</ReportItems>

</TableCell>

</TableCells>

<Height>0.25in</Height>

</TableRow>

</TableRows>

<RepeatOnNewPage>true</RepeatOnNewPage>

<FixedHeader>true</FixedHeader>

</Header>

<Left>0.5in</Left>

</Table>

<Textbox Name="TotalRows">

<Left>0.5in</Left>

<Top>3in</Top>

<CanGrow>true</CanGrow>

<Width>6.5in</Width>

<Value>=String.Format("Total Epex Referrals" &amp; Chr(58) &amp; " {0}", COUNTROWS("dataSet"))</Value>

<Style>

<PaddingLeft>3pt</PaddingLeft>

<PaddingBottom>3pt</PaddingBottom>

<FontWeight>Normal</FontWeight>

<FontSize>8pt</FontSize>

<PaddingRight>3pt</PaddingRight>

<PaddingTop>3pt</PaddingTop>

</Style>

<CustomProperties>

<CustomProperty>

<Name>rb:SpecialContent</Name>

<Value>TotalRows</Value>

</CustomProperty>

</CustomProperties>

<Height>0.25in</Height>

</Textbox>

<Textbox Name="FilterDescription">

<Left>0.5in</Left>

<Top>3.5in</Top>

<CanGrow>true</CanGrow>

<Width>6.5in</Width>

<Value>Filter: Epex Referrals with: Created from 01/01/2005 to 01/01/2006</Value>

<Style>

<PaddingLeft>3pt</PaddingLeft>

<PaddingBottom>3pt</PaddingBottom>

<FontWeight>Normal</FontWeight>

<FontSize>8pt</FontSize>

<PaddingRight>3pt</PaddingRight>

<PaddingTop>3pt</PaddingTop>

</Style>

<CustomProperties>

<CustomProperty>

<Name>rb:SpecialContent</Name>

Value>FilterDescription</Value>

</CustomProperty>

</CustomProperties>

<Height>0.25in</Height>

</Textbox>

</ReportItems>

<Style />

</Body>

<PageWidth>8.5in</PageWidth>

</Report>

|||

Is this error happening when you are editing report or when you are running this report? Can you save this report to report server and run it from Report Manager (http://rshost/reports)?

Thanks!

|||

The report executes with no problems, I only get the error if I try to change the filter.

What is strange, I can get around the error by apply to separate date filters, one using Greater Than Or Equal and the other Less Than or Equal.

This gets around the problem but I would like to offer my end users the option of From and To as this is what the use in other parts of SSRS.

Regards

John

|||

We have the same problem even after installing SP1 and the hotfixes. Has anybody a solution/answer?

Regards

Werner

|||This is a known issue that will be fixed in SP2. Unfortunately the only way to avoid this error for now is to change your Windows regional settings to use a 12-hour clock.|||

Bob,

thanks for the immediate answer, when can we approx. expect SP2?

Regards

Werner

|||No committed dates yet, but I believe it's on track for later this year.|||

Bob,

i tried to change the format in the regional settings like you said but no changes. We use a german W2003 server... When i select a date field in the report builder filter, select a date from the datetime picker (22.06.2006) and try to save it with the ok button i get a message box saying 'no valid date'...?!?

Can i change anything in the model to solve the problem? Is this filter problem caused by SP1 (in this case we could think about setting up the SQL Server again)?

Regards

Werner

Can not change filter on model report - UPDATED

I have a very simple report based on a test model.

The report is filtered via a date field and runs ok.

If I try to change the filter I get the following error message:

Operation Failed

Short time pattern does not include hours and minutes

Does anyone know how I can correct this?

Regards

John

UPDATE

This only happens if I try to filter between two dates, a single date works correctly!

Can you please save report that fails to file and post it?|||

Alexandre

This is the rdl for the failing report.

<?xml version="1.0" encoding="utf-8"?>

<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

<Language>en-US</Language>

<BottomMargin>0.5in</BottomMargin>

<RightMargin>0.5in</RightMargin>

<DataSets>

<DataSet Name="dataSet">

<Query>

<DataSourceName>dataSource1</DataSourceName>

<CommandText>&lt;SemanticQuery xmlns="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rb="http://schemas.microsoft.com/sqlserver/2004/11/reportbuilder" xmlns:qd="http://schemas.microsoft.com/sqlserver/2004/11/semanticquerydesign"&gt;

&lt;Hierarchies&gt;

&lt;Hierarchy&gt;

&lt;BaseEntity&gt;

&lt;!--Epex Referral--&gt;

&lt;EntityID&gt;G066c76f8-9856-4acd-8b54-d734971da2c8&lt;/EntityID&gt;

&lt;/BaseEntity&gt;

&lt;Groupings&gt;

&lt;Grouping Name="Epex Referral"&gt;

&lt;Expression Name="Epex Referral"&gt;

&lt;EntityRef&gt;

&lt;!--Epex Referral--&gt;

&lt;EntityID&gt;G066c76f8-9856-4acd-8b54-d734971da2c8&lt;/EntityID&gt;

&lt;/EntityRef&gt;

&lt;/Expression&gt;

&lt;Details&gt;

&lt;Expression Name="Created"&gt;

&lt;AttributeRef&gt;

&lt;!--Created--&gt;

&lt;AttributeID&gt;G9a9689b0-64a7-49de-abae-58b8d30322e9&lt;/AttributeID&gt;

&lt;/AttributeRef&gt;

&lt;/Expression&gt;

&lt;Expression Name="Close Date"&gt;

&lt;AttributeRef&gt;

&lt;!--Close Date--&gt;

&lt;AttributeID&gt;G36ac2614-9e79-4c60-9c3e-fc45de7c67ec&lt;/AttributeID&gt;

&lt;/AttributeRef&gt;

&lt;/Expression&gt;

&lt;Expression Name="Patient"&gt;

&lt;Path&gt;

&lt;RolePathItem&gt;

&lt;!--Patient--&gt;

&lt;RoleID&gt;G036974d5-33a0-4096-bc96-166d82853818&lt;/RoleID&gt;

&lt;/RolePathItem&gt;

&lt;/Path&gt;

&lt;AttributeRef&gt;

&lt;!--Name--&gt;

&lt;AttributeID&gt;Gd6622d3c-8a4f-4273-a190-c8834bf90031&lt;/AttributeID&gt;

&lt;/AttributeRef&gt;

&lt;/Expression&gt;

&lt;Expression Name="expr1"&gt;

&lt;AttributeRef&gt;

&lt;!--Updated--&gt;

&lt;AttributeID&gt;Gfee3c95d-eb72-48c3-b372-0e2865ac44c8&lt;/AttributeID&gt;

&lt;/AttributeRef&gt;

&lt;/Expression&gt;

&lt;/Details&gt;

&lt;/Grouping&gt;

&lt;/Groupings&gt;

&lt;Filter&gt;

&lt;Expression Name="expr2"&gt;

&lt;Function&gt;

&lt;FunctionName&gt;And&lt;/FunctionName&gt;

&lt;Arguments&gt;

&lt;Expression&gt;

&lt;Function&gt;

&lt;FunctionName&gt;GreaterThanOrEquals&lt;/FunctionName&gt;

&lt;Arguments&gt;

&lt;Expression&gt;

&lt;AttributeRef&gt;

&lt;!--Created--&gt;

&lt;AttributeID&gt;G9a9689b0-64a7-49de-abae-58b8d30322e9&lt;/AttributeID&gt;

&lt;/AttributeRef&gt;

&lt;/Expression&gt;

&lt;Expression&gt;

&lt;Literal&gt;

&lt;DataType&gt;DateTime&lt;/DataType&gt;

&lt;Value&gt;2005-01-01T00:00:00&lt;/Value&gt;

&lt;/Literal&gt;

&lt;/Expression&gt;

&lt;/Arguments&gt;

&lt;/Function&gt;

&lt;/Expression&gt;

&lt;Expression&gt;

&lt;Function&gt;

&lt;FunctionName&gt;LessThanOrEquals&lt;/FunctionName&gt;

&lt;Arguments&gt;

&lt;Expression&gt;

&lt;AttributeRef&gt;

&lt;!--Created--&gt;

&lt;AttributeID&gt;G9a9689b0-64a7-49de-abae-58b8d30322e9&lt;/AttributeID&gt;

&lt;/AttributeRef&gt;

&lt;/Expression&gt;

&lt;Expression&gt;

&lt;Literal&gt;

&lt;DataType&gt;DateTime&lt;/DataType&gt;

&lt;Value&gt;2006-01-01T00:00:00&lt;/Value&gt;

&lt;/Literal&gt;

&lt;/Expression&gt;

&lt;/Arguments&gt;

&lt;/Function&gt;

&lt;/Expression&gt;

&lt;/Arguments&gt;

&lt;/Function&gt;

&lt;CustomProperties&gt;

&lt;CustomProperty Name="qd:FilterCondition" /&gt;

&lt;CustomProperty Name="qd:Filter" /&gt;

&lt;CustomProperty Name="qd:ContextEntityID"&gt;

&lt;Value xsi:type="xsd:string"&gt;G066c76f8-9856-4acd-8b54-d734971da2c8&lt;/Value&gt;

&lt;/CustomProperty&gt;

&lt;CustomProperty Name="qd:AutoChangeBaseEntity" /&gt;

&lt;CustomProperty Name="qd:Design"&gt;

&lt;Value xsi:type="xsd:string"&gt;expr3&lt;/Value&gt;

&lt;/CustomProperty&gt;

&lt;/CustomProperties&gt;

&lt;/Expression&gt;

&lt;/Filter&gt;

&lt;/Hierarchy&gt;

&lt;/Hierarchies&gt;

&lt;CalculatedAttributes&gt;

&lt;Expression Name="expr3"&gt;

&lt;Function&gt;

&lt;FunctionName&gt;And&lt;/FunctionName&gt;

&lt;Arguments&gt;

&lt;Expression&gt;

&lt;Function&gt;

&lt;FunctionName&gt;And&lt;/FunctionName&gt;

&lt;Arguments&gt;

&lt;Expression&gt;

&lt;Function&gt;

&lt;FunctionName&gt;GreaterThanOrEquals&lt;/FunctionName&gt;

&lt;Arguments&gt;

&lt;Expression&gt;

&lt;AttributeRef&gt;

&lt;!--Created--&gt;

&lt;AttributeID&gt;G9a9689b0-64a7-49de-abae-58b8d30322e9&lt;/AttributeID&gt;

&lt;/AttributeRef&gt;

&lt;/Expression&gt;

&lt;Expression&gt;

&lt;Literal&gt;

&lt;DataType&gt;DateTime&lt;/DataType&gt;

&lt;Value&gt;2005-01-01T00:00:00&lt;/Value&gt;

&lt;/Literal&gt;

&lt;/Expression&gt;

&lt;/Arguments&gt;

&lt;/Function&gt;

&lt;/Expression&gt;

&lt;Expression&gt;

&lt;Function&gt;

&lt;FunctionName&gt;LessThanOrEquals&lt;/FunctionName&gt;

&lt;Arguments&gt;

&lt;Expression&gt;

&lt;AttributeRef&gt;

&lt;!--Created--&gt;

&lt;AttributeID&gt;G9a9689b0-64a7-49de-abae-58b8d30322e9&lt;/AttributeID&gt;

&lt;/AttributeRef&gt;

&lt;/Expression&gt;

&lt;Expression&gt;

&lt;Literal&gt;

&lt;DataType&gt;DateTime&lt;/DataType&gt;

&lt;Value&gt;2006-01-01T00:00:00&lt;/Value&gt;

&lt;/Literal&gt;

&lt;/Expression&gt;

&lt;/Arguments&gt;

&lt;/Function&gt;

&lt;/Expression&gt;

&lt;/Arguments&gt;

&lt;/Function&gt;

&lt;CustomProperties&gt;

&lt;CustomProperty Name="qd:FilterCondition" /&gt;

&lt;/CustomProperties&gt;

&lt;/Expression&gt;

&lt;Expression&gt;

&lt;Null /&gt;

&lt;CustomPropertes&gt;

&lt;CustomProperty Name="qd:Unspecified" /&gt;

&lt;/CustomProperties&gt;

&lt;/Expression&gt;

&lt;/Arguments&gt;

&lt;/Function&gt;

&lt;CustomProperties&gt;

&lt;CustomProperty Name="qd:Filter" /&gt;

&lt;CustomProperty Name="qd:ContextEntityID"&gt;

&lt;Value xsi:type="xsd:string"&gt;G066c76f8-9856-4acd-8b54-d734971da2c8&lt;/Value&gt;

&lt;/CustomProperty&gt;

&lt;CustomProperty Name="qd:AutoChangeBaseEntity" /&gt;

&lt;/CustomProperties&gt;

&lt;/Expression&gt;

&lt;/CalculatedAttributes&gt;

&lt;/SemanticQuery&gt;</CommandText>

</Query>

<Fields>

<Field Name="EpexReferral">

<DataField>Epex Referral</DataField>

</Field>

<Field Name="Created">

<DataField>Created</DataField>

</Field>

<Field Name="CloseDate">

<DataField>Close Date</DataField>

</Field>

<Field Name="Patient">

<DataField>Patient</DataField>

</Field>

<Field Name="expr1">

<DataField>expr1</DataField>

</Field>

</Fields>

</DataSet>

</DataSets>

<DataSources>

<DataSource Name="dataSource1">

<DataSourceReference>/Models/Mars Cutdown</DataSourceReference>

<rd:DataSourceID>4d1edcd6-3c78-4e68-9566-ef952e495be4</rd:DataSourceID>

</DataSource>

</DataSources>

<PageHeight>11in</PageHeight>

<LeftMargin>0.5in</LeftMargin>

<TopMargin>0.5in</TopMargin>

<Width>7.5in</Width>

<Body>

<Height>0in</Height>

<ReportItems>

<Textbox Name="Title">

<Left>0.5in</Left>

<Top>0.5in</Top>

<CanGrow>true</CanGrow>

<Width>6.5in</Width>

<Value />

<Style>

<FontFamily>Tahoma</FontFamily>

<TextAlign>Left</TextAlign>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<FontWeight>Normal</FontWeight>

<FontSize>18pt</FontSize>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

<CustomProperties>

<CustomProperty>

<Name>rb:Watermark</Name>

<Value>Click to add title</Value>

</CustomProperty>

</CustomProperties>

<Height>0.375in</Height>

</Textbox>

<Table Name="table">

<Top>1.25in</Top>

<Details>

<TableRows>

<TableRow>

<TableCells>

<TableCell>

<ReportItems>

<Textbox Name="Created_Value">

<DataElementOutput>Output</DataElementOutput>

<CanGrow>true</CanGrow>

<Action>

<Drillthrough>

<ReportName>=DataSources!dataSource1.DataSourceReference</ReportName>

<Parameters>

<Parameter Name="rs:EntityID">

<Value>G066c76f8-9856-4acd-8b54-d734971da2c8</Value>

</Parameter>

<Parameter Name="rs:DrillType">

<Value>Detail</Value>

</Parameter>

<Parameter Name="rs:Command">

<Value>Drillthrough</Value>

</Parameter>

<Parameter Name="DrillthroughSourceQuery">

<Value>=DataSets!dataSet.RewrittenCommandText</Value>

</Parameter>

<Parameter Name="DrillthroughContext">

<Value>=CreateDrillthroughContext()</Value>

</Parameter>

</Parameters>

</Drillthrough>

</Action>

<Value>=Fields!Created.Value</Value>

<Styl>

<Language>en-US</Language>

<BorderColor>

<Default>LightGrey</Default>

</BorderColor>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<FontFamily>Tahoma</FontFamily>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<FontWeight>Normal</FontWeight>

<FontSize>8pt</FontSize>

<Format>d</Format>

<BackgroundColor>White</BackgroundColor>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

</Textbox>

</ReportItems>

</TableCell>

<TableCell>

<ReportItems>

<Textbox Name="CloseDate_Value">

<DataElementOutput>Output</DataElementOutput>

<CanGrow>true</CanGrow>

<Value>=Fields!CloseDate.Value</Value>

<Style>

<Language>en-US</Language>

<BorderColor>

<Default>LightGrey</Default>

</BorderColor>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<FontFamily>Tahoma</FontFamily>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<FontWeight>Normal</FontWeight>

<FontSize>8pt</FontSize>

<Format>d</Format>

<BackgroundColor>White</BackgroundColor>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

</Textbox>

</ReportItems>

</TableCell>

<TableCell>

<ReportItems>

<Textbox Name="Patient_Value">

<DataElementOutput>Output</DataElementOutput>

<CanGrow>true</CanGrow>

<Action>

<Drillthrough>

<ReportName>=DataSources!dataSource1.DataSourceReference</ReportName>

<Parameters>

<Parameter Name="rs:EntityID">

<Value>G2ceef5ce-4e09-4806-8e8c-9a4e4e8f35fa</Value>

</Parameter>

<Parameter Name="rs:DrillType">

<Value>Detail</Value>

</Parameter>

<Parameter Name="rs:Command">

<Value>Drillthrough</Value>

</Parameter>

<Parameter Name="DrillthroughSourceQuery">

<Value>=DataSets!dataSet.RewrittenCommandText</Value>

</Parameter>

<Parameter Name="DrillthroughContext">

<Value>=CreateDrillthroughContext()</Value>

</Parameter>

</Parameters>

</Drillthrough>

</Action>

<Value>=Fields!Patient.Value</Value>

<Style>

<Language>en-US</Language>

<BorderColor>

<Default>LightGrey</Default>

</BorderColor>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<FontFamily>Tahoma</FontFamily>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<FontWeight>Normal</FontWeight>

<FontSize>8pt</FontSize>

<BackgroundColor>White</BackgroundColor>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

</Textbox>

</ReportItems>

</TableCell>

</TableCells>

<Height>0.25in</Height>

</TableRow>

</TableRows>

<Grouping Name="table_EpexReferral">

<GroupExpressions>

<GroupExpression>=Fields!EpexReferral.Value</GroupExpression>

</GroupExpressions>

</Grouping>

<Sorting>

<SortBy>

<SortExpression>=IIf(True, Fields!expr1.Value, Nothing)</SortExpression>

<Direction>Descending</Direction>

</SortBy>

<SortBy>

<SortExpression>=IIf(True, Fields!Created.Value, Nothing)</SortExpression>

<Direction>Descending</Direction>

</SortBy>

</Sorting>

</Details>

<Style />

<Width>0in</Width>

<Height>0in</Height>

<DataSetName>dataSet</DataSetName>

<TableColumns>

<TableColumn>

<Width>0.90092in</Width>

<Visibility>

<Hidden>=Fields!Created.IsMissing</Hidden>

</Visibility>

</TableColumn>

<TableColumn>

<Width>1.06361in</Width>

<Visibility>

<Hidden>=Fields!CloseDate.IsMissing</Hidden>

</Visibility>

</TableColumn>

<TableColumn>

<Width>1.62189in</Width>

<Visibility>

<Hidden>=Fields!Patient.IsMissing</Hidden>

</Visibility>

</TableColumn>

</TableColumns>

<Header>

<TableRows>

<TableRow>

<TableCells>

<TableCell>

<ReportItems>

<Textbox Name="Created_Header">

<CanGrow>true</CanGrow>

<UserSort>

<SortExpression>=Fields!Created.Value</SortExpression>

<SortExpressionScope>table_EpexReferral</SortExpressionScope>

</UserSort>

<Value>Created</Value>

<Style>

<Language>en-US</Language>

<BorderColor>

<Default>LightGrey</Default>

</BorderColor>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<FontFamily>Tahoma</FontFamily>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<FontWeight>Bold</FontWeight>

<FontSize>8pt</FontSize>

<BackgroundColor>#518ae5</BackgroundColor>

<Color>White</Color>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

</Textbox>

</ReportItems>

</TableCell>

<TableCell>

<ReportItems>

<Textbox Name="CloseDate_Header">

<CanGrow>true</CanGrow>

<UserSort>

<SortExpression>=Fields!CloseDate.Value</SortExpression>

<SortExpressionScope>table_EpexReferral</SortExpressionScope>

</UserSort>

<Value>Close Date</Value>

<Style

<Language>en-US</Language>

<BorderColor>

<Default>LightGrey</Default>

</BorderColor>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<FontFamily>Tahoma</FontFamily>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<FontWeight>Bold</FontWeight>

<FontSize>8pt</FontSize>

<BackgroundColor>#518ae5</BackgroundColor>

<Color>White</Color>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

</Textbox>

</ReportItems>

</TableCell>

<TableCell>

<ReportItems>

<Textbox Name="Patient_Header">

<CanGrow>true</CanGrow>

<UserSort>

<SortExpression>=Fields!Patient.Value</SortExpression>

<SortExpressionScope>table_EpexReferral</SortExpressionScope>

</UserSort>

<Value>Patient</Value>

<Style>

<Language>en-US</Language>

<BorderColor>

<Default>LightGrey</Default>

</BorderColor>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<FontFamily>Tahoma</FontFamily>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<FontWeight>Bold</FontWeight>

<FontSize>8pt</FontSize>

<BackgroundColor>#518ae5</BackgroundColor>

<Color>White</Color>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

</Textbox>

</ReportItems>

</TableCell>

</TableCells>

<Height>0.25in</Height>

</TableRow>

</TableRows>

<RepeatOnNewPage>true</RepeatOnNewPage>

<FixedHeader>true</FixedHeader>

</Header>

<Left>0.5in</Left>

</Table>

<Textbox Name="TotalRows">

<Left>0.5in</Left>

<Top>3in</Top>

<CanGrow>true</CanGrow>

<Width>6.5in</Width>

<Value>=String.Format("Total Epex Referrals" &amp; Chr(58) &amp; " {0}", COUNTROWS("dataSet"))</Value>

<Style>

<PaddingLeft>3pt</PaddingLeft>

<PaddingBottom>3pt</PaddingBottom>

<FontWeight>Normal</FontWeight>

<FontSize>8pt</FontSize>

<PaddingRight>3pt</PaddingRight>

<PaddingTop>3pt</PaddingTop>

</Style>

<CustomProperties>

<CustomProperty>

<Name>rb:SpecialContent</Name>

<Value>TotalRows</Value>

</CustomProperty>

</CustomProperties>

<Height>0.25in</Height>

</Textbox>

<Textbox Name="FilterDescription">

<Left>0.5in</Left>

<Top>3.5in</Top>

<CanGrow>true</CanGrow>

<Width>6.5in</Width>

<Value>Filter: Epex Referrals with: Created from 01/01/2005 to 01/01/2006</Value>

<Style>

<PaddingLeft>3pt</PaddingLeft>

<PaddingBottom>3pt</PaddingBottom>

<FontWeight>Normal</FontWeight>

<FontSize>8pt</FontSize>

<PaddingRight>3pt</PaddingRight>

<PaddingTop>3pt</PaddingTop>

</Style>

<CustomProperties>

<CustomProperty>

<Name>rb:SpecialContent</Name>

Value>FilterDescription</Value>

</CustomProperty>

</CustomProperties>

<Height>0.25in</Height>

</Textbox>

</ReportItems>

<Style />

</Body>

<PageWidth>8.5in</PageWidth>

</Report>

|||

Is this error happening when you are editing report or when you are running this report? Can you save this report to report server and run it from Report Manager (http://rshost/reports)?

Thanks!

|||

The report executes with no problems, I only get the error if I try to change the filter.

What is strange, I can get around the error by apply to separate date filters, one using Greater Than Or Equal and the other Less Than or Equal.

This gets around the problem but I would like to offer my end users the option of From and To as this is what the use in other parts of SSRS.

Regards

John

|||

We have the same problem even after installing SP1 and the hotfixes. Has anybody a solution/answer?

Regards

Werner

|||This is a known issue that will be fixed in SP2. Unfortunately the only way to avoid this error for now is to change your Windows regional settings to use a 12-hour clock.|||

Bob,

thanks for the immediate answer, when can we approx. expect SP2?

Regards

Werner

|||No committed dates yet, but I believe it's on track for later this year.|||

Bob,

i tried to change the format in the regional settings like you said but no changes. We use a german W2003 server... When i select a date field in the report builder filter, select a date from the datetime picker (22.06.2006) and try to save it with the ok button i get a message box saying 'no valid date'...?!?

Can i change anything in the model to solve the problem? Is this filter problem caused by SP1 (in this case we could think about setting up the SQL Server again)?

Regards

Werner

sql

Monday, March 19, 2012

Can no longer open my SSIS packages

I am in the process of migrating DTS 2000 packages via DTS Migration Wizard.

I ran all of the packages through the wizard. Then, I successfully completed changing the remaining issues in two of my packages to SSIS. Everything was fine. The second package I completed is called from a SQL Agent Job. I managed to get the job step converted to use SSIS package. It ran successfully.

Now, I am trying to open other packages to work on them and I get "Microsoft Visual Studio is unable to load this document: Value does not fall within the expected range." and a message window that says "Object reference not set to an instance of an object." This actually happens with the two that I migrated, also. I can no longer access them.

What happened?!?!?!? Does anyone have any experience with this?

Well, the solution I had the files in must have been corrupted. I can open individual files using BIDS. I just can't do anything with them from the project. Seems as though a collection might have gone willy.

Sunday, March 11, 2012

Can isolation level be set in connectionstring?

Hi,

I would like to be able to alter the default isolation level at connection time via the ADO connection string. Can this be done?

Why? I have various reporting applications (Crystal etc.) that queries against MS SQL server using ADO (SQLOLEDB). I would like to be able to alter the isolation level for these queries to readuncommitted. But many of the reporting applications does not have this option and they autogenerate the SQL making it impossible to use the use the WITH(table_hints) clause in the SELECT statement. So if I could set the isolation level in the connection string this could be a workaround.

Any help will be appreciated!

Bertrand

No, not in the connection string.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Can isolation level be set in connectionstring?

Hi,

I would like to be able to alter the default isolation level at connection time via the ADO connection string. Can this be done?

Why? I have various reporting applications (Crystal etc.) that queries against MS SQL server using ADO (SQLOLEDB). I would like to be able to alter the isolation level for these queries to readuncommitted. But many of the reporting applications does not have this option and they autogenerate the SQL making it impossible to use the use the WITH(table_hints) clause in the SELECT statement. So if I could set the isolation level in the connection string this could be a workaround.

Any help will be appreciated!

Bertrand

No, not in the connection string.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Thursday, March 8, 2012

Can I use stored procedures with PHP via ODBC bridge?

Hey Everyone,

I am a stored procedures newbie, so I wanted to ask if it is possible
to use them with PHP via an ODBC-ODBC bridge connected to a MS SQL
server. I am simply use the commands from the php odbc library to
connect and execute the SQL commands, I am trying to avoid building
dynamic queries, so stored proceddures seem to be the answer. I know
that there are only certain environments stored procedures can be used
within. Thank you for all of your help.Storedprocs can be started through queries which should not bring any
problems in using them with PHP, but test it.
I don't know how the query_resource (return value) is handled in a
Stored proc but I believe any return values wll be returned in fieldlike
structures.
Anyway thats how it works in Pascal...
Working in PHP&MySQL platforms haven't given me the opportunity to test
that functionality in PHP.

Regards,
Toke Herkild

gene.ellis@.gmail.com wrote:
> Hey Everyone,
> I am a stored procedures newbie, so I wanted to ask if it is possible
> to use them with PHP via an ODBC-ODBC bridge connected to a MS SQL
> server. I am simply use the commands from the php odbc library to
> connect and execute the SQL commands, I am trying to avoid building
> dynamic queries, so stored proceddures seem to be the answer. I know
> that there are only certain environments stored procedures can be used
> within. Thank you for all of your help.|||Yes, it it is possible, and works OK.

Check out the latest PHP manual ==> Function Reference ==> Microsoft
SQL Server Functions ==> mssql_execute().

HTH,
Rob

Wednesday, March 7, 2012

Can I use osql to known the database install on a server via guest ?

Can I use osql to known the database install on a server via 'guest'
account ?

I had over 300 servers with sql server all around France (different
version : 6.5, 7 and 8)
I need to check all database on each servers from my place.
Of course, also it would have been to easy, I don't have all 'sa'
password...

Is that possible to use the 'guest' account to execute a query like
this via osql :

Extract.sql
exec sp_helpdb

Extract.cmd
for /f "usebackq tokens=1 delims=\n" %%i IN (ListServer.txt) DO
osql
-S%%i -Uguest -P -dmaster -i"C:\Extraction\Extract.sql"
-o"C:\Extraction\%%i.rpt"

Could I query 'master' with the 'guest' account ?
Or any other ideas how to do this by an other way ?

ThanksFlorimond (florimond@.gmail.com) writes:
> Can I use osql to known the database install on a server via 'guest'
> account ?
> I had over 300 servers with sql server all around France (different
> version : 6.5, 7 and 8)
> I need to check all database on each servers from my place.
> Of course, also it would have been to easy, I don't have all 'sa'
> password...
> Is that possible to use the 'guest' account to execute a query like
> this via osql :

"guest" is not a login, it's only a database user. To connect to SQL
Server you must either have a valid username/password for SQL
authentication, or your Windows login must have been granted access
to the server.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Saturday, February 25, 2012

Can I use Merge Replication via Developer Edition to Cluster?

I am a DBA in one IT group and we do our development work on the developer
edition of SQL Server 2005 and migrate everything to our SQL Server 2005
cluster for production.
We want to use merge replication between the Developer Edition and the
Cluster but I am being told by the DBA on the cluster that:
1. The developer edition of SQL Server does not have the same features as
the enterprise edition; that the enterprise edition is required for
implementing the SQL Cluster as this is not featured in the developers
edition.
This statement seems to conflict with what Microsoft has posted online at ...
http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx
"SQL Server 2005 Developer Edition and Evaluation Edition are not listed in
the tables. These editions have the same feature set as the Enterprise
Edition; the only difference between these editions is the licensing
policies."
2. That reporting services in the developers edition has limitations which
requires you to upgrade to the standard or enterprise edition in order to
take advantage of all the bells and whistles for this product. Our DBA sats
the developer edition is just that, a developers editio,n and which is
normally used for testing before implementing to standard or enterprise
editions of SQL Server.
3. That replicating data from a developers edition to the enterprise edition
of SQL Server Cluster is not supported by Microsoft, thus if issues arise
Micorsoft will not support this setup.
So does anyone if there's any truth to our inability to do merge replication
from the Developer Edition to the Cluster?
Thanks!
You need a new dba.
1) The developer edition supports all of the features of the Enterprise
Edition. There may be a limitation on the number of subscribers you can have
to a publication, but if there is it is not documented.
2) I am not sure about this one, but I don't think it is correct. You would
need to post to the reporting services group for more information.
3) This might be a licensing issue. The developer edition is intended for
development only. You will be able to replicate to a cluster running SQL
Server 2005 EE. When it comes to licensing issues you may have to
demonstrate licensing for auditors, but CSS will help you with problems you
may encounter while running this.
Keep in mind the developer edition is for development, not production.
Should you be replicating to production it should be a one time or
occasional occurrence as part of your development process, and not part of a
production topology.
That been said I have set up replication to development environments from a
production environment many times. I did not configure the licensing but I
am confident it was legit.
HTH
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Robert Reist" <RobertReist@.discussions.microsoft.com> wrote in message
news:0D620D0B-4432-4377-A2CD-C92C62C29EDE@.microsoft.com...
>I am a DBA in one IT group and we do our development work on the developer
> edition of SQL Server 2005 and migrate everything to our SQL Server 2005
> cluster for production.
> We want to use merge replication between the Developer Edition and the
> Cluster but I am being told by the DBA on the cluster that:
> 1. The developer edition of SQL Server does not have the same features as
> the enterprise edition; that the enterprise edition is required for
> implementing the SQL Cluster as this is not featured in the developers
> edition.
> This statement seems to conflict with what Microsoft has posted online at
> ...
> http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx
> "SQL Server 2005 Developer Edition and Evaluation Edition are not listed
> in
> the tables. These editions have the same feature set as the Enterprise
> Edition; the only difference between these editions is the licensing
> policies."
> 2. That reporting services in the developers edition has limitations which
> requires you to upgrade to the standard or enterprise edition in order to
> take advantage of all the bells and whistles for this product. Our DBA
> sats
> the developer edition is just that, a developers editio,n and which is
> normally used for testing before implementing to standard or enterprise
> editions of SQL Server.
> 3. That replicating data from a developers edition to the enterprise
> edition
> of SQL Server Cluster is not supported by Microsoft, thus if issues arise
> Micorsoft will not support this setup.
> So does anyone if there's any truth to our inability to do merge
> replication
> from the Developer Edition to the Cluster?
> Thanks!
>

Friday, February 10, 2012

Can I loop through table and run reports from SSIS

I would like to loop through a SQL Server table that contains the paths to all the reports we need to run and then execute the reports via SSIS. What task should I be doing to do this? Will the For Loop work for something like this?Yes, you can use the ForEach loop to iterate through the resultset of a query.

So you would use an Execute SQL task to select your report URLs and place them in an object variable. You can iterate through those resultset rows in a ForEach ADO Enumerator loop and place values of the columns into variables. Then inside the loop you would use a script task to make a WebRequest to SSRS with a URL you constructed from the variables. You can then write the stream from the WebResponse to a file.

Hopefully you are planning to render these reports to a binary format such as Excel or PDF instead of HTML. HTML reports generally comprise multiple HTTP streams and cannot be easily executed without a browser.
|||

Actually I am running Cognos reports so I would need to build the cmd line command and execute an executable from a command prompt.

Any example of the above on the web?

|||You can run an executable through the Execute Process Task.|||

agentf1 wrote:

Actually I am running Cognos reports so I would need to build the cmd line command and execute an executable from a command prompt.

Any example of the above on the web?

Oh, I shouldn't have assumed SSRS. Running from the command prompt makes it easier. That changes the above so that you'd have another variable that is expression-based to construct your command line, then use an Execute Process instead of script. No code at all.

http://sqljunkies.com/WebLog/knight_reign/archive/2005/03/25/9588.aspx
http://blogs.conchango.com/jamiethomson/archive/2005/07/04/1748.aspx

http://blogs.conchango.com/jamiethomson/archive/2005/03/19/SSIS_3A00_-Evaluating-variables-as-expressions.aspx

|||

Hi JayH

My Name is Praveen . Could you please explain how it could be done in detail . It would be very helpful if send an answer to it .Especially the scripting part i didnt understand anything

|||I would like to loop through a SQL Server table that contains the paths to all the reports we need to run and then execute the reports(SSRS) via SSIS. What task should I be doing to do this? Could you explain in detail

Can I loop through table and run reports from SSIS

I would like to loop through a SQL Server table that contains the paths to all the reports we need to run and then execute the reports via SSIS. What task should I be doing to do this? Will the For Loop work for something like this?Yes, you can use the ForEach loop to iterate through the resultset of a query.

So you would use an Execute SQL task to select your report URLs and place them in an object variable. You can iterate through those resultset rows in a ForEach ADO Enumerator loop and place values of the columns into variables. Then inside the loop you would use a script task to make a WebRequest to SSRS with a URL you constructed from the variables. You can then write the stream from the WebResponse to a file.

Hopefully you are planning to render these reports to a binary format such as Excel or PDF instead of HTML. HTML reports generally comprise multiple HTTP streams and cannot be easily executed without a browser.
|||

Actually I am running Cognos reports so I would need to build the cmd line command and execute an executable from a command prompt.

Any example of the above on the web?

|||You can run an executable through the Execute Process Task.|||

agentf1 wrote:

Actually I am running Cognos reports so I would need to build the cmd line command and execute an executable from a command prompt.

Any example of the above on the web?

Oh, I shouldn't have assumed SSRS. Running from the command prompt makes it easier. That changes the above so that you'd have another variable that is expression-based to construct your command line, then use an Execute Process instead of script. No code at all.

http://sqljunkies.com/WebLog/knight_reign/archive/2005/03/25/9588.aspx
http://blogs.conchango.com/jamiethomson/archive/2005/07/04/1748.aspx

http://blogs.conchango.com/jamiethomson/archive/2005/03/19/SSIS_3A00_-Evaluating-variables-as-expressions.aspx

|||

Hi JayH

My Name is Praveen . Could you please explain how it could be done in detail . It would be very helpful if send an answer to it .Especially the scripting part i didnt understand anything

|||I would like to loop through a SQL Server table that contains the paths to all the reports we need to run and then execute the reports(SSRS) via SSIS. What task should I be doing to do this? Could you explain in detail