Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-11-25 : 17:16:18
|
| Fareed writes "I tried to copy a data by using both SQL quries but getting an erron in both.1) create table account_bkup as select *from account_tble""I am getting a syntex error near the "as"Then I use this query2) select account_tble.* into account_bkup from account_tbleNow I am getting a message that "Cannot run SELECT INTO in this database. The database owner must run sp_dboption to enable this option."Please help me to solve this problemfurther more I have to truncate the table , but before that I have to make a backup copy .Help me thanks" |
|
|
PiecesOfEight
Posting Yak Master
200 Posts |
Posted - 2001-11-25 : 18:31:15
|
| The first approach may work in other databases, but it is not allowed in SQL Server. You receive the error on the second approach b/c select into is a non-logged operation and requires that you not be in Full Recovery Model (in 2000). 7.0 doesn't have recovery models per se, but I believe you still have the option to allow or disallow select into. In either case, you can set this via the proc sp_dboption 'yourdbname','select into/bulkcopy','true'. In 2000 you can also do it through ALTER DATBASE (the preferred method) and the UI (look for recovery model on the database property sheet). |
 |
|
|
|
|
|