 |
|
 |
I tried to convert source code to vs 2008, but not work, please help me!
LINE:
private SQLDMO.ApplicationClass m_app = new ApplicationClass();
Error description :
Retrieving the COM class factory for component with CLSID {10020100-E260-11CF-AE68-00AA004A34D5} failed due to the following error: 80040154.
Thanks
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
I noticed that when scripting table functions containing cross Apply the Cross apply portion of te join is not scripted it is parsed out completely.
Colin Robinson
|
|
|
|
 |
|
 |
I noticed my objects were prefixed with user names and not schema names where the default schema of dbo was not used causing invalid drop object statements and a failed script.
the drop function script and i presume other scripts in the project were doing a join between sysuser and sysobjects to come up with incorrect schema qualified objects (they were were creating user qualified which isnt always the same thing):
I modifid the Code as follows to correct the schema qualification and lost the join
Cheers
Colin Robinson
select 'DROP FUNCTION ['+ OBJECT_SCHEMA_NAME(o.[id]) + '].['+o.name+']'
from sysobjects o
where objectproperty(id,'IsMSShipped')=0
and objectproperty(id,'IsTableFunction')=1
|
|
|
|
 |
|
|
 |
|
 |
Did you condider updating collationid in syscolumns directly instead of issuing multiple ALTER TABLE ... COLLATE ... statements?
(you would still need to recreate the indexes though)
|
|
|
|
 |
|
 |
Hi, looks good at a first glance, but don't you think your utility should be updating statistics on affected columns/indexes, at least optionally?
|
|
|
|
 |
|
 |
works awesome man thanks alot
|
|
|
|
 |
|
 |
Extremely useful.
On my first go and at first glance, it seems to have fixed everything the way I wanted it to.
You're hired!
|
|
|
|
 |
|
 |
This program looked like just what I needed but then I noticed a load of DROP INDEX commands at the end..
These are dropped and never recreated, so running this on your database will slow it down. Is there any reason for this or is this a bug?
|
|
|
|
 |
|
 |
Thanks for making this available. You must saved me about 3 days work.
Never again will I hunt down those mysterious collation conflicts. Just blast the whole database with this and I'm done.
Now... do I tell my colleagues or just pretend that I'm a collation wizard?
Joe
|
|
|
|
 |
|
 |
Hi, I am having the following error when it's generating the script, any idea what error is this?
137 - Must declare the scalar variable "@C".
Thank you.
|
|
|
|
 |
|
|
 |
|
 |
Hi,
Could you tell me which version of SQL server you are using AND what collation your database currently is?
Many thank
Alex Baker
|
|
|
|
 |
|
 |
Hey Alex,
Thanks for your reply. I'm running sql 2005 and converting a db from Latin1_General_BIN to SQL_Latin1_General_CP1_CS_AS. Its running as we speak I just skipped through the error, as far as I can tell its just for ANSI_NULL's right?. Excellent tool by the way.
Thanks
|
|
|
|
 |
|
 |
I have identified the issue - I have made a mistake in some of the script files which only effects databases with case sensitive collation orders. This can be fixed as follows:
- Open the project in visual studio
- Open the file "202 Create Table Functions.sql" and replace each instance of "@C" with "@c"
- Repeat for the file "204 Create Indexes + Relations.2000.sql"
- Complile the code
Let me know how you get on.
Alex Baker
|
|
|
|
 |
|
 |
Thanks Alex that seems to have sorted it.
|
|
|
|
 |
|
 |
Hi Alex,
There seems to be an issue with dropping table function on SQL 2005.
You SQL queries the list of functions from sysobjects table and get its owner from sysusers.
insert into #sql (sql)
select 'DROP FUNCTION ['+ u.name + '].['+o.name+']'
from sysobjects o
join sysusers u
on o.uid = u.uid
where objectproperty(id,'IsMSShipped')=0
and objectproperty(id,'IsTableFunction')=1
Since in 2005 the notion of owner has been replaced by Schema, . can't be resolved.
You may need to create a 2005 script that uses sys.xxxx tables instead.
Good work however!
Guillaume
|
|
|
|
 |
|
 |
Hi,
I havent tried this tool yet, but i was wondering how it handles encrypted objects(functions, stored proc's)?
P.s. it looks great though.
|
|
|
|
 |
|
 |
If i have to remove the Collation then i have to leave the drop down as empty or i have to write NULL over there?
|
|
|
|
 |
|
 |
210 Enable Triggers.sql file have a little mistake :
insert into #sql (sql)
select 'alter table ['+u2.name+'].[' + o2.name + '] enable trigger [' +o1.name+']'
from sysobjects o1
join sysobjects o2
on o1.parent_obj = o2.id
join sysusers u2
on o2.uid = u2.uid
where o1.type = 'TR'
and OBJECTPROPERTY(o1.id,'ExecIsTriggerDisabled')=0
and OBJECTPROPERTY(o2.id, 'IsTable')=1
Should be :
insert into #sql (sql)
select 'alter table ['+u2.name+'].[' + o2.name + '] enable trigger [' +o1.name+']'
from sysobjects o1
join sysobjects o2
on o1.parent_obj = o2.id
join sysusers u2
on o2.uid = u2.uid
where o1.type = 'TR'
and OBJECTPROPERTY(o1.id,'ExecIsTriggerDisabled')=1
and OBJECTPROPERTY(o2.id, 'IsTable')=1
because you are looking for disabled triggers
BTW very usefull and good coded tool
Thanks
|
|
|
|
 |
|
 |
The code included in the project is correct.
The scripts are building the code to be executed later on, based off the state of the database as it is now, not what it will be like when that section of script actually runs.
If you make the change as detailed above, when you run it, you will only activate those triggers that are disabled in the database right now.
|
|
|
|
 |
|
 |
This has saved me a few hours work at a client site where I am migrating a SQL 7 database to SQL 2005 that has a different collation.
I owe you a few pints !
|
|
|
|
 |
|
 |
Great job, saved me a lot of time and effort
|
|
|
|
 |