I am trying to attach a database to one server from another with this code...
declare @prm_allocserver varchar(20)
set @prm_allocserver = '<servername>'
declare @prm_drive char(1)
set @prm_drive = 'D'
declare @sql varchar(1000)
select 'Attaching <Databasename> to Allocated Server'
set @sql = char(013) + @prm_allocserver + '.master..sp_attach_db ' + char(039) + '<Databasename>' + char(039) + ', ' + char(013)
+ '@filename1 = N' + char(039) + @prm_drive + ':\<Databasename>\<Databasename>_Data.mdf' + char(039) + ',' + char(013)
+ '@filename2 = N' + char(039) + @prm_drive + ':\<Databasename>\<Databasename>_Log.ldf' + char(039)
Both servers run SQL Server 7
When I run the code I get the following error message...
Server: Msg 7411, Level 16, State 1, Line 1
Server '<servername>' is not configured for RPC.
To combat the problem, I ran the following code on the 'allocated server'
execute sp_serveroption 'servername','rpc','true'
go
execute sp_serveroption 'servername','rpc out','true'
go
When I run the original sql, I still get the same error message
Can anyone help me ?
declare @prm_allocserver varchar(20)
set @prm_allocserver = '<servername>'
declare @prm_drive char(1)
set @prm_drive = 'D'
declare @sql varchar(1000)
select 'Attaching <Databasename> to Allocated Server'
set @sql = char(013) + @prm_allocserver + '.master..sp_attach_db ' + char(039) + '<Databasename>' + char(039) + ', ' + char(013)
+ '@filename1 = N' + char(039) + @prm_drive + ':\<Databasename>\<Databasename>_Data.mdf' + char(039) + ',' + char(013)
+ '@filename2 = N' + char(039) + @prm_drive + ':\<Databasename>\<Databasename>_Log.ldf' + char(039)
Both servers run SQL Server 7
When I run the code I get the following error message...
Server: Msg 7411, Level 16, State 1, Line 1
Server '<servername>' is not configured for RPC.
To combat the problem, I ran the following code on the 'allocated server'
execute sp_serveroption 'servername','rpc','true'
go
execute sp_serveroption 'servername','rpc out','true'
go
When I run the original sql, I still get the same error message
Can anyone help me ?