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

sp_MSForeachtable statement hangs #502

Closed
flyway opened this issue Jun 25, 2013 · 6 comments
Closed

sp_MSForeachtable statement hangs #502

flyway opened this issue Jun 25, 2013 · 6 comments

Comments

@flyway
Copy link
Collaborator

flyway commented Jun 25, 2013

Original author: kavithap...@gmail.com (June 03, 2013 06:53:56)

Hi,

I am trying to copy data from one DB to another. Before copying I wan't to turn off all the constraints in the DB. Hence I call the following statement:

exec sp_MSforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'

But I get a "query timed out" exception while executing the script with flyway. I have attached the complete script in this issue.

Please check and provide me a solution for this issue.

Original issue: http://code.google.com/p/flyway/issues/detail?id=508

@flyway
Copy link
Collaborator Author

flyway commented Jun 25, 2013

From kavithap...@gmail.com on June 05, 2013 05:35:03
Could you please provide any solution for this issue.

@ruchirsachdeva
Copy link

Is this bug fixed, or is there any plan to fix this ?
It has been 2 years, and this has not even been assigned to anyone.

@axelfontaine
Copy link
Contributor

Are you running in the same issue? I am not sure it can be fixed as Flyway holds a lock on its metadata table while migrating to make this safe for multiple concurrent nodes.

Any suggestions welcome.

@venkatamutyala
Copy link

I ran into a similar issue and my work around was to check to see if the the object name contained '%flyway%' if not, execute the changes to the object.

@axelfontaine axelfontaine added this to the Flyway 5.1.0 milestone Nov 26, 2017
@axelfontaine
Copy link
Contributor

This is now working.

@axelfontaine axelfontaine changed the title sp_MSForeachtable statement does not get executed with flyway sp_MSForeachtable statement hangs Dec 18, 2017
axelfontaine pushed a commit to flyway/flywaydb.org that referenced this issue Dec 18, 2017
@pranay1619
Copy link

I’m facing same issue. Can anyone help me please

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

No branches or pull requests

4 participants