Could someone help on this

02/13/2011 18:49 abrasive#16
How did you fix the previous problem?

It looks like it's time to use a SQL profiler as Zargon suggested.

The idea behind this is to use the profiler to log the queries that are being run during the time of the problematic event. Then you can go back and manually try to run the queries you see in the log to see which ones are erroring out.

You can download a free SQL profiler from here: [Only registered and activated users can see links. Click Here To Register...]
02/13/2011 21:43 Igneil#17
Thanks for your and zargon05's help,i really appreciate that you both took some of your time to help me out.I managed to fix the problem.And here is what was.I used this query :
Code:
IF NOT EXISTS (SELECT [name] FROM master.dbo.syslogins WHERE name = 'Shaiya')
BEGIN
	EXEC sp_addlogin 'your-db-username', 'your-db-userpassword', 'PS_GameDefs';
END	
EXEC sp_addsrvrolemember 'your-db-username', 'sysadmin';

	
if exists(select * 
from master..sysservers 
where isremote=1 and srvname='game') 
begin
exec sp_dropserver 'game','droplogins'
end
exec sp_addlinkedserver 'game','','SQLOLEDB','127.0.0.1'
exec sp_addlinkedsrvlogin 'game','false',null,'your-db-username','your-db-userpassword'

if exists(select * 
from master..sysservers 
where isremote=1 and srvname='PS_NCASH') 
begin
exec sp_dropserver 'PS_NCASH','droplogins'
end
exec sp_addlinkedserver 'PS_NCASH','','SQLOLEDB','127.0.0.1'
exec sp_addlinkedsrvlogin 'PS_NCASH','false',null,'your-db-username','your-db-userpassword'

if exists(select * 
from master..sysservers 
where isremote=1 and srvname='PS_USERDB') 
begin
exec sp_dropserver 'PS_USERDB','droplogins'
end
exec sp_addlinkedserver 'PS_USERDB','','SQLOLEDB','127.0.0.1'
exec sp_addlinkedsrvlogin 'PS_USERDB','false',null,'your-db-username','your-db-userpassword'

if exists(select * 
from master..sysservers 
where isremote=1 and srvname='PS_USERDB01') 
begin
exec sp_dropserver 'PS_USERDB01','droplogins'
end
exec sp_addlinkedserver 'PS_USERDB01','','SQLOLEDB','127.0.0.1'
exec sp_addlinkedsrvlogin 'PS_USERDB01','false',null,'your-db-username','your-db-userpassword'

if exists(select * 
from master..sysservers 
where isremote=1 and srvname='PS_DEFINEDB') 
begin
exec sp_dropserver 'PS_DEFINEDB','droplogins'
end
exec sp_addlinkedserver 'PS_DEFINEDB','','SQLOLEDB','127.0.0.1'
exec sp_addlinkedsrvlogin 'PS_DEFINEDB','false',null,'your-db-username','your-db-userpassword'

if exists(select * 
from master..sysservers 
where isremote=1 and srvname='PS_GAMEDB01') 
begin
exec sp_dropserver 'PS_GAMEDB01','droplogins'
end
exec sp_addlinkedserver 'PS_GAMEDB01','','SQLOLEDB','127.0.0.1'
exec sp_addlinkedsrvlogin 'PS_GAMEDB01','false',null,'your-db-username','your-db-userpassword'
However for some reason i changed this :
Code:
if exists(select * 
from master..sysservers 
where isremote=1 and srvname='game')
with my test server name,and left the rest as it is >.<.It took me some time to remember.Once again thanks for your time and effort to help me solve this problem
02/13/2011 22:20 abrasive#18
Glad you got it working!

It seems odd to me that you needed to used linked servers for this, however. From my understanding that is something you use when you want to connect two different data sources, such as MySQL and MSSQL together.