Friday, August 2, 2013

[SQL 2012] view with schema binding?

[SQL 2012] view with schema binding?


view with schema binding?

Posted: 01 Aug 2013 08:18 PM PDT

I have come across a meaning of schema binding in views which i am unable to understandthe following is the explanation:" Binds the view to the schema of the underlying table or tables."my question is1) what is this underlying table? "When SCHEMABINDING is specified, the base table or tables cannot be modified in a way that would affect the view definition."my question is2) Which base table the explanation is talking about that cannot be modified?" The view definition itself must first be modified or dropped to remove dependencies on the table that is to be modified." my question is3) can you explain the above statement?When you use SCHEMABINDING, the select_statement must include the two-part names (schema.object) of tables, views, or user-defined functions that are referenced. All referenced objects must be in the same database. "Views or tables that participate in a view created with the SCHEMABINDING clause cannot be dropped unless that view is dropped or changed so that it no longer has schema binding. Otherwise, the Database Engine raises an error."my question is4) is this right that we cannot drop table that has been used in views with schema binding? Also, executing ALTER TABLE statements on tables that participate in views that have schema binding fail when these statements affect the view definition."my question is 5) i have tried altering the view with schema binding it altered successfully but the explanation says otherwise?

SSIS 2012 Project Deployment version control for multiple environments

Posted: 01 Aug 2013 01:48 PM PDT

Question:How do we manage the different versions of the SSIS project codebase for the different environments in the IS Server Catalog?Question Example: SSIS project v1.4 is deployed to the IS Server Catalog and an Agent job executes that deployed package against Environment PROD. How can I deploy SSIS project v2.0 to the same IS Server so i can execute the project against TEST without overwriting v1.4?Context:The Project Deployment model in SSIS 2012 has been documented with many articles on the web. They often describe the use of Environments in the IS Server Catalog to configure the project and package parameters for executing a deployed SSIS package in different environments, typically DEV, TEST, PROD.This means the [i]same[/i] deployed project packages can execute against a selected Environment. This is great and I understand this practice. My question is [i]not[/i] related to how to configure the Environments, parameters, and executing the package against the selected Environment.Typically an application would have potentially different versions (codebases) of the same application in DEV, TEST, PROD depending on the position in the application delivery cycle. eg. Dev 3.0, Test 2.0, Prod 1.4

Can't find options to retain partitions in SSAS Tabular Deployment?

Posted: 04 Mar 2013 11:05 AM PST

So I have created a new Tabular cube on 2012, deployed it for a while. And created a few new partitions via SSMS in the server to cover all the data. Now I have made some changes in the project, planning to deploy it to the server, but can NOT find an option to ignore existing partitions (that are not defined in the project itself) I have tried it on a test db, and no matter what i do... the project seems to deploy its definition, and overwrite what's on the server. meaning all the partitions that i created after deploy are WIPED! I have billions of rows of data, so reprocessing all the missing partitions are really not preferable... and managing the partitions in project but not in ssms is also not preferable as we typicall use scripts to add / manage partitions after it goes livewe have found some blog posts about changing .deploymentoptions file... but we don't know what value we should change to (not in BOL).. we changed it to "RetainPartitions" as a test.. but that doesn't workanyone has been through this? thanks

Extract string from in between

Posted: 01 Aug 2013 09:04 AM PDT

Example:Column Data Type: varchar(max)Table Name: insColumnName: inscolData in "inscol"For Example:Row #1:<?xml version="1.0"?><!DOCTYPE ins PUBLIC "ins" "hsdbdj"><instructions><format-template>${ND} </format-template><node id="node-0" variable-name="item"><node-text>Ref To</node-text></node><node id="node-1" variable-name="ND"><node-text>ABC</node-text></node></instructions>Output needed: ABCRow #2:<?xml version="1.0"?><!DOCTYPE ins PUBLIC "ins" "hsdbdj"><instructions><format-template>${ND} </format-template><node id="node-1" variable-name="ND"><node-text>XYZ</node-text></node></instructions>Output needed:XYZNote: In row it contains char(13) and char(10).

No comments:

Post a Comment

Search This Blog