Having recently implemented Microsoft SQL 2005 replication for a client, we had a few issues with developers trying to alter schema on the database if the table is under replication. The issue is caused because the Microsoft Visual GUI tools for SQL 2005, tries to drop and recreate the table, which is obviously not acceptable […]
I recently setup replication for Microsoft SQL 2005 server for a client and needed to provide a list of tables to the client without primary keys, as these are not transferred in the replication. This script came in very handy so thought I would share.
SELECT c.name, b.name
FROM sys.tables b
INNER JOIN sys.schemas c ON b.schema_id = […]
This can be a handy piece of code to have in your toolbox if you have a ColdFuson host that will not allow you to create DSN’s. Using this method, you can wrap this in a nice CFC that allows you to query a Microsoft SQL database. The object code example is as follows …
<cfscript>
classLoad = […]
I have been looking for a way to back up my MS SQL database that is hosted remotely, so that in the event of switching hosts or needing to restore I have a complete backup of my database. Using SQL Express 2005 this was not possible as you need to backup to a UNC network […]
I thought I would post this to help anybody else who might be struggling with loading large XML files and datasets into Microsoft SQL using ColdFusion.
Using this technique, you can use a Microsoft COM object called “SQLXMLBulkLoad.SQLXMLBulkLoad”. This is a very fast object that allows you to provide an XML mapping file, the XML file […]
Currently working on restructuring some google sitemaps for my client. Instead of the usual query, loop, output process for a ColdFusion XML manipulation based task, I decided to get SQL server to do the work for me. Using FOR XML AUTO, ELEMENTS at the bottom of my query, I can get SQL to return the results of […]