sql server - Renaming of Table -
I am using sp_rename to change the table name, my query is below
Exec sp_rename 'dop. Lok-daly ',' Temp 'App Spinem' Debo People_Future ',' People the Daily 'App Spinem' Temp ',' Dabo. People_future '. My question is, if I execute the same query in parallel with the different table name, since both queries have been using the word dictionary, there is a possibility that people will use the TEMP address ?, I What should be temporary to avoid? exec sp_rename 'dbo.Address_Daily', 'TEMP' exec sp_rename 'dbo.Addresse_Future', 'Address_Daily' exec sp_rename 'Timp', 'deb.adress_future' Thanks
using TEMP if your batches are parallel But you can use TEMP as a suffix on the current table name: exec sp_rename 'dbo.People_Daily', 'dbo.People_Daily_TEMP' Exec sp_rename 'dbo.People_Future', 'People Daily' app spinem 'dbo.PopleTaily_TEMP', 'dbo.People_Future' and
exec sp_rename ' Dbo.Address_Daily ',' Dabo. Address_Daily_TEMP 'exec sp_rename' dbo.Addressse_Future ',' Address_Daily 'exec sp_rename' dbo.Address_Daily_TEMP ',' dbo.Address_Future ' Then your batches will not collide.
Comments
Post a Comment