SMO Scripter generated script does not run on SQL 2000
-
miércoles, 30 de noviembre de 2005 14:54I seem to be running into a problem getting a script (of the entire db) generated by SMO to run on 2000. It looks like it puts all kinds of SQL 2005 specific TSQL in the script, which fails on 2000. Any ideas?
Angelo
Todas las respuestas
-
miércoles, 30 de noviembre de 2005 23:54
SMO allows you to set the target version. When the version is set to Version80, SMO will filter out or alter the DDL as appropiate. For example, if you are using the Transfer class, you can do the following:
Transfer trans = new Transfer(db);
trans.Options.TargetServerVersion = SqlServerVersion.Version80;
I am not sure of your exact scenario, but if this does not help you please be more specific on what you are trying to do.
Peter -
jueves, 01 de diciembre de 2005 4:35Thanks Peter,
I can't believe I missed that. Looks like it did the trick.
Angelo

