SQL to generate delete foreign Key Constraints:
-- ALTER TABLE <TABLE_NAME> DROP CONSTRAINT <FOREIGN_KEY_NAME>
SELECT 'ALTER TABLE ' + sch.name + '.' + tab1.name + ' DROP CONSTRAINT [' + obj.name + ']' as DropSQL,
obj.name AS FK_NAME,
sch.name AS [schema_name],
tab1.name AS [table],
col1.name AS [column],
tab2.name AS [referenced_table],
col2.name AS [referenced_column]
FROM sys.foreign_key_columns fkc
INNER JOIN sys.objects obj
ON obj.object_id = fkc.constraint_object_id
INNER JOIN sys.tables tab1
ON tab1.object_id = fkc.parent_object_id
INNER JOIN sys.schemas sch
ON tab1.schema_id = sch.schema_id
INNER JOIN sys.columns col1
ON col1.column_id = parent_column_id AND col1.object_id = tab1.object_id
INNER JOIN sys.tables tab2
ON tab2.object_id = fkc.referenced_object_id
INNER JOIN sys.columns col2
ON col2.column_id = referenced_column_id AND col2.object_id = tab2.object_id
Based on an answer by Gustavo Rubio here : http://stackoverflow.com/questions/483193/how-can-i-list-all-foreign-keys-referencing-a-given-table-in-sql-server
Sql to generate delete tables in the database:
SELECT 'Drop Table ' + TABLE_SCHEMA + '.[' + TABLE_NAME + ']'
FROM information_schema.tables
WHERE TABLE_TYPE='BASE TABLE'
Monday, October 24, 2016
Sunday, March 22, 2015
MSDN KB : Crm 2011 Privilege List
Security Role and Privilege Reference : https://msdn.microsoft.com/en-us/library/gg334308(v=crm.5).aspx
Thursday, February 12, 2015
AS400 and Columns Headers using SQL , References
Label On Command : http://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/db2/rbafzmstlabelon.htm
Describe Table http://publib.boulder.ibm.com/html/as400/v4r4/ic2924/info/db2/rbafzmst96.htm
DB2 Universal Database for iSeries SQL Reference : https://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/db2/rbafzmst103.htm
Appendix G. DB2 UDB for iSeries Catalog Views : https://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/db2/rbafzmst103.htm
Describe Table http://publib.boulder.ibm.com/html/as400/v4r4/ic2924/info/db2/rbafzmst96.htm
DB2 Universal Database for iSeries SQL Reference : https://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/db2/rbafzmst103.htm
Appendix G. DB2 UDB for iSeries Catalog Views : https://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/db2/rbafzmst103.htm
AS400 Query Tool
DB2 UDB for AS/400 Query Management Programming
Table of Contents
About DB2 UDB for AS/400 Query Management ProgrammingChapter 1. Introduction
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
Tuesday, February 10, 2015
Problem When Upgrading CRM 4 to CRM 2011 - Could not load file or assembly 'Microsoft.Crm.Reporting.DataExtension.Common.Fetch
I got the error dialog saying:
---------------------------
Microsoft Dynamics CRM Setup
---------------------------
Action Microsoft.Crm.Tools.Admin.ProvisionOrganizationLanguagesAction failed.
Could not load file or assembly 'Microsoft.Crm.Reporting.DataExtension.Common.Fetch, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
---------------------------
Microsoft Dynamics CRM Setup
---------------------------
Action Microsoft.Crm.Tools.Admin.ProvisionOrganizationLanguagesAction failed.
Could not load file or assembly 'Microsoft.Crm.Reporting.DataExtension.Common.Fetch, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
C# Code Parsers, mainly for SQL Parsing
.NET SQL Parser and Formatter Tool and SSMS Plugin : https://github.com/benlaan/sqlformat
Looks complicated but stable. uses Laan? algorithm.
SQL Parser on CodeProject : http://www.codeproject.com/Articles/32524/SQL-Parser
Looks interesting, has good explanation of the method used.
Gold Parser : http://goldparser.org/about/why-use-gold.htm
uses LALR algorithm, looks great and fast, simple to define languages.
Developed for .NET in Visual Basic.
Introduction in CodeProject : http://www.codeproject.com/Articles/10492/Introduction-to-GOLD-Parser
BSN-GoldParser https://code.google.com/p/bsn-goldparser/ : a project that uses GOLD parser . It builds a Sample Calculator here
There is a TSQL Parser based on the BSN project here
the above is based on a project for T-SQL Parsing by Arsène von Wyss. C.f., found here
ANTLR : http://www.antlr.org/
Uses LL Algorith. Looks like it is the most used library. NHibernate used it for HSQL Parsing, I guess it was similar to HSQL in Java Hibernate.
This is developed by Terence Parr at the university of San Diego.
Grammatica : http://grammatica.percederberg.net/index.html
Uses LL Algorith, has Java and C# implemetation.
Looks complicated but stable. uses Laan? algorithm.
SQL Parser on CodeProject : http://www.codeproject.com/Articles/32524/SQL-Parser
Looks interesting, has good explanation of the method used.
Gold Parser : http://goldparser.org/about/why-use-gold.htm
uses LALR algorithm, looks great and fast, simple to define languages.
Developed for .NET in Visual Basic.
Introduction in CodeProject : http://www.codeproject.com/Articles/10492/Introduction-to-GOLD-Parser
BSN-GoldParser https://code.google.com/p/bsn-goldparser/ : a project that uses GOLD parser . It builds a Sample Calculator here
There is a TSQL Parser based on the BSN project here
the above is based on a project for T-SQL Parsing by Arsène von Wyss. C.f., found here
ANTLR : http://www.antlr.org/
Uses LL Algorith. Looks like it is the most used library. NHibernate used it for HSQL Parsing, I guess it was similar to HSQL in Java Hibernate.
This is developed by Terence Parr at the university of San Diego.
Grammatica : http://grammatica.percederberg.net/index.html
Uses LL Algorith, has Java and C# implemetation.
Wednesday, January 28, 2015
Convert HTML to DocX / OpenXML
http://html2openxml.codeplex.com/wikipage?title=Serves%20a%20generated%20docx%20from%20the%20server&referringTitle=Documentation
OpenXML SDK 2.5 from Microsoft : http://www.microsoft.com/en-us/download/details.aspx?id=30425
Html to OpenXML http://html2openxml.codeplex.com/
DOCX Discussion on the Topic : https://docx.codeplex.com/discussions/254637
Render HTML in Reportings Services 2008 : http://sqlblog.com/blogs/greg_low/archive/2008/12/19/rendering-html-in-reporting-services-text-boxes-in-sql-server-2008.aspx
Adding Alternative Text using OpenXML SDK : http://stackoverflow.com/questions/18089921/add-html-string-to-openxml-docx-document
OpenXML SDK 2.5 from Microsoft : http://www.microsoft.com/en-us/download/details.aspx?id=30425
Html to OpenXML http://html2openxml.codeplex.com/
DOCX Discussion on the Topic : https://docx.codeplex.com/discussions/254637
Render HTML in Reportings Services 2008 : http://sqlblog.com/blogs/greg_low/archive/2008/12/19/rendering-html-in-reporting-services-text-boxes-in-sql-server-2008.aspx
Adding Alternative Text using OpenXML SDK : http://stackoverflow.com/questions/18089921/add-html-string-to-openxml-docx-document
Subscribe to:
Posts (Atom)