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

[Question] - Variables #37

Open
dazinator opened this issue Aug 1, 2018 · 0 comments
Open

[Question] - Variables #37

dazinator opened this issue Aug 1, 2018 · 0 comments

Comments

@dazinator
Copy link

dazinator commented Aug 1, 2018

SqlCmd allows you to pass variable values that can be used in scripts:

& sqlcmd -i CreateDb.sql -v dbName="foo"

CreateDb.sql:

CREATE DATABASE $(dbName)
ON (
  NAME = $(dbName)
)
LOG ON (
  NAME = $(dbName)_log,  
)

These are different from SQL parameters.

Does Invoke-SqlCmd2 cater for this functionality somehow?
Thanks

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