Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code fails in case-sensitive environment #2

Open
ylavi opened this issue May 21, 2017 · 1 comment
Open

Code fails in case-sensitive environment #2

ylavi opened this issue May 21, 2017 · 1 comment

Comments

@ylavi
Copy link

ylavi commented May 21, 2017

RestoreCommand.sql doesn't run as is in case-sensitive environments.

The following needs to be changed (in two places)

 FETCH NEXT FROM restorecursor
 INTO @databasename, @command

to

 FETCH NEXT FROM RestoreCursor
 INTO @DatabaseName, @Command

and all other references to restorecursor need to be changed to RestoreCursor

@ylavi ylavi changed the title Stored Procedure code fails in case-sensitive environment Code fails in case-sensitive environment May 21, 2017
@ylavi
Copy link
Author

ylavi commented May 21, 2017

Also the job step creation script needs similar adjustments.

For consistency with the other variables I suggest changing all cases of @jobid and @jobID to @JobId

The following changes are also required:
Msdb.dbo.SysJobs -> msdb.dbo.sysjobs
Msdb.dbo.SysJobSteps -> msdb.dbo.sysjobsteps
Job_Id -> job_id
jobidcursor -> jobidCursor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant