--Change Database Collation using T-SQL  
USE master;  
GO  
Alter DATABASE  Ent_RUSCA SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE Ent_RUSCA  
COLLATE Latin1_General_100_CI_AS_SC_UTF8;  
GO
Alter DATABASE Ent_RUSCA SET MULTI_USER

use Ent_RUSCA

SELECT * FROM sys.indexes order by name 

SELECT * FROM sys.indexes where name like '%xISeriNo%'
SELECT * FROM sys.indexes where object_id=594101157


select * from sys.objects where object_id=174623665

--1- 
drop index xISeriNo on Ihar
--2-
SELECT t.name    FROM sys.tables t     INNER JOIN sys.check_constraints c ON t.object_id = c.parent_object_id     WHERE     c.name = 'CK_OGecikmeSuresi' 
SELECT t.name    FROM sys.tables t     INNER JOIN sys.check_constraints c ON t.object_id = c.parent_object_id     WHERE     c.name = 'CK_CariDonemFiyatlari_FiyatNo' 
SELECT t.name    FROM sys.tables t     INNER JOIN sys.check_constraints c ON t.object_id = c.parent_object_id     WHERE     c.name = 'CK_CariDonemFiyatlari_Donem' 
SELECT t.name    FROM sys.tables t     INNER JOIN sys.check_constraints c ON t.object_id = c.parent_object_id     WHERE     c.name = 'CK_CariDonemFiyatlari_BosSatir'


ALTER TABLE OGecikmeSuresi DROP CONSTRAINT   CK_OGecikmeSuresi 
go
ALTER TABLE CariDonemFiyatlari  DROP CONSTRAINT   CK_CariDonemFiyatlari_FiyatNo  
go
ALTER TABLE CariDonemFiyatlari DROP CONSTRAINT   CK_CariDonemFiyatlari_Donem  
go
ALTER TABLE CariDonemFiyatlari DROP CONSTRAINT   CK_CariDonemFiyatlari_BosSatir  

go

drop function Ayrac
go
drop function splitstring