January 8, 2010 at 2:41 am
There is one SP (SP_GenerateScript) available at the below URL:
Explanation for the switches in the SP can be found at the below URL:
When i execute the SP script files are created successfully. Separate script files each for Table, SP, Views, etc are created. But my requirement is to create a single file for all objects.
There is an occurence in the SP like
set @query = '"'+@applicationpath +'"'+ ' /s '+@@servername+ ' /d '+@dbname+ +' /F '+@destinationpath+ @switches
As per the explanation in the Switches, /F means separate file for different category of objects.
Hence is replaced /F with /f, which means all script in a single file. Now i get an error like the one below:
Scripting failed.
ERROR: Executing ScriptTransfer
Error Code: 5
Error Category: 0
Source: Microsoft SQL-DMO
Description: [SQL-DMO]CreateFile error on 'd:\pubs20100108'. Access is denied.
NULL
NULL
Can anyone help me out on how to resolve this?
January 10, 2010 at 11:49 am
Looks like a permissions issue to me. Is the directory/user/etc you used when the script executed successfully the same as the ones you used when it failed?
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply