David Peterson
David Peterson

Reputation: 552

SQL Server data lost by changing stored procedure that puts data in it?

I have a stored procedure that stores data in a table. Yesterday, I changed one var type from decimal(15,0) to varchar(10) in my stored procedure.

Today I see that my table has new rows but previous data has gone.

Is my data lost? Is this data loss because of that change? If I don't have a backup how can I bring back the data?

Upvotes: 0

Views: 258

Answers (1)

dean
dean

Reputation: 10098

Changing parameter type in a procedure definitely didn't cause the data loss. SQL Server won't delete the data unless an explicit delete command was issued (or drop or truncate or similar).

If the database is in full recovery model you can still take a backup and restore to another server with stopat option.

Upvotes: 1

Related Questions