PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > Restore across network problem
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Restore across network problem

Réponse
 
LinkBack Outils de la discussion
Vieux 16/06/2008, 17h18   #1
SQLGuptaSybase
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Restore across network problem

I am trying to automate a scheduled restore of databases from several SQL
Servers to my local development SQL Server (all SQL 2000 STD & Dev.). I can
successfully create the RESTORE scripts and run them directly in QA. However,
I want the scripts stored in a table on the local SQL Server and then run
them using:

USE SQLMaintenance
GO
DECLARE @Script VARCHAR(750)
SELECT @Script = restorescript FROM dbo.DatabaseRestoreScripts WHERE
restorecompleted = 0 AND databasename = 'somedatabasename'
EXEC @Script


QA returns:

"Could not execute procedure on remote server 'RESTORE DATABASE
somedatabasename FROM DISK =
'\\SQLSERVER\d$\MSSQL\BACKUP\somedatabasename_db_2 00806142105' because SQL
Server is not configured for remote access."


Why does the script stored in the table runs fine in QA but not when run
using EXEC? I did not think I would have to setup Remote servers. I have been
searching for several hours now but gotten nowhere. Any would be greatly
appreciated.

Thank you.
  Réponse avec citation
Vieux 16/06/2008, 18h37   #2
Tibor Karaszi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Restore across network problem

EXEC(@Script)

You forgot the parenthesis.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"SQLGuptaSybase" <SQLGuptaSybase@discussions.microsoft.com> wrote in message
news:B289DA06-E554-418F-8D23-CABB8B89EC18@microsoft.com...
>I am trying to automate a scheduled restore of databases from several SQL
> Servers to my local development SQL Server (all SQL 2000 STD & Dev.). I can
> successfully create the RESTORE scripts and run them directly in QA. However,
> I want the scripts stored in a table on the local SQL Server and then run
> them using:
>
> USE SQLMaintenance
> GO
> DECLARE @Script VARCHAR(750)
> SELECT @Script = restorescript FROM dbo.DatabaseRestoreScripts WHERE
> restorecompleted = 0 AND databasename = 'somedatabasename'
> EXEC @Script
>
>
> QA returns:
>
> "Could not execute procedure on remote server 'RESTORE DATABASE
> somedatabasename FROM DISK =
> '\\SQLSERVER\d$\MSSQL\BACKUP\somedatabasename_db_2 00806142105' because SQL
> Server is not configured for remote access."
>
>
> Why does the script stored in the table runs fine in QA but not when run
> using EXEC? I did not think I would have to setup Remote servers. I have been
> searching for several hours now but gotten nowhere. Any would be greatly
> appreciated.
>
> Thank you.


  Réponse avec citation
Vieux 16/06/2008, 19h46   #3
SQLGuptaSybase
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Restore across network problem

Tibor,

Thank you for your but also I apologize for such an obvious error.

"Tibor Karaszi" wrote:

> EXEC(@Script)
>
> You forgot the parenthesis.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
>
> "SQLGuptaSybase" <SQLGuptaSybase@discussions.microsoft.com> wrote in message
> news:B289DA06-E554-418F-8D23-CABB8B89EC18@microsoft.com...
> >I am trying to automate a scheduled restore of databases from several SQL
> > Servers to my local development SQL Server (all SQL 2000 STD & Dev.). I can
> > successfully create the RESTORE scripts and run them directly in QA. However,
> > I want the scripts stored in a table on the local SQL Server and then run
> > them using:
> >
> > USE SQLMaintenance
> > GO
> > DECLARE @Script VARCHAR(750)
> > SELECT @Script = restorescript FROM dbo.DatabaseRestoreScripts WHERE
> > restorecompleted = 0 AND databasename = 'somedatabasename'
> > EXEC @Script
> >
> >
> > QA returns:
> >
> > "Could not execute procedure on remote server 'RESTORE DATABASE
> > somedatabasename FROM DISK =
> > '\\SQLSERVER\d$\MSSQL\BACKUP\somedatabasename_db_2 00806142105' because SQL
> > Server is not configured for remote access."
> >
> >
> > Why does the script stored in the table runs fine in QA but not when run
> > using EXEC? I did not think I would have to setup Remote servers. I have been
> > searching for several hours now but gotten nowhere. Any would be greatly
> > appreciated.
> >
> > Thank you.

>

  Réponse avec citation
Vieux 17/06/2008, 08h21   #4
Tibor Karaszi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Restore across network problem

No need to apologize. We all do these things, and having more set of eyes to look at our code (like
in these groups) is a great way to spot these things. :-)

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"SQLGuptaSybase" <SQLGuptaSybase@discussions.microsoft.com> wrote in message
news:70647B92-43A7-45D5-B66E-56CEADEA8A46@microsoft.com...
> Tibor,
>
> Thank you for your but also I apologize for such an obvious error.
>
> "Tibor Karaszi" wrote:
>
>> EXEC(@Script)
>>
>> You forgot the parenthesis.
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>>
>> "SQLGuptaSybase" <SQLGuptaSybase@discussions.microsoft.com> wrote in message
>> news:B289DA06-E554-418F-8D23-CABB8B89EC18@microsoft.com...
>> >I am trying to automate a scheduled restore of databases from several SQL
>> > Servers to my local development SQL Server (all SQL 2000 STD & Dev.). I can
>> > successfully create the RESTORE scripts and run them directly in QA. However,
>> > I want the scripts stored in a table on the local SQL Server and then run
>> > them using:
>> >
>> > USE SQLMaintenance
>> > GO
>> > DECLARE @Script VARCHAR(750)
>> > SELECT @Script = restorescript FROM dbo.DatabaseRestoreScripts WHERE
>> > restorecompleted = 0 AND databasename = 'somedatabasename'
>> > EXEC @Script
>> >
>> >
>> > QA returns:
>> >
>> > "Could not execute procedure on remote server 'RESTORE DATABASE
>> > somedatabasename FROM DISK =
>> > '\\SQLSERVER\d$\MSSQL\BACKUP\somedatabasename_db_2 00806142105' because SQL
>> > Server is not configured for remote access."
>> >
>> >
>> > Why does the script stored in the table runs fine in QA but not when run
>> > using EXEC? I did not think I would have to setup Remote servers. I have been
>> > searching for several hours now but gotten nowhere. Any would be greatly
>> > appreciated.
>> >
>> > Thank you.

>>



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 05h45.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11348 seconds with 12 queries