Solved

Cant run Select Into

Posted on 2000-02-14
4
376 Views
Last Modified: 2012-05-04
Hello ppl,

I am trying to do a Select Into but i encounter with an error saying :

You cant run SELECT INTO in this database. Please check with the Database Owner.

I have already use the db creator loggin, but still the same problem. I suspect its to do with some settings in the db but cant figure out what is it..

this is what i get when i do a sp_helpdb :



name                     db_size       owner                    dbid
         created
         status

 ------------------------ ------------- ------------------------ ------
        --------------
        ------------------------------------------------------------------------
------------------------------
 ist                            18.5 MB oasis                         7
         Aug 17, 1999
         no options set


(1 row affected)
 device_fragments               size          usage                free kbytes
 ------------------------------ ------------- -------------------- -----------
 master                         18.5 MB       data and log                7872
 device
         segment

 ------------------------------
        ------------------------------------------------------------------------
------------------
 master
         default

 master
         logsegment

 master
         system


please help.. its kinda urgent.
Thanks in advance

Sytan
0
Comment
Question by:sytan
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
jkotek earned 20 total points
Comment Utility
Hi Sytan,
I see, that you haven't turned the "select into" database option to true. Its false by default.
You can do that from Sybase central (r-click on database/properties) or by executing this command sp_dboption ist,"select into", true (sp_dboption <dbname>,<option>,<true/false>)
0
 
LVL 9

Expert Comment

by:david_levine
Comment Utility
Warning! Doing this invalidates the transaction logs!! You need to be cautious when doing this.

I would only suggest setting that option in a database that does not need the transaction logs and also has the Dump Tran on Checkpoint option set. Otherwise, your logs could fill up prior to the dump of the database.

For Select Into, you could actually just change your code to create the table in the sql you are running and do an insert into instead.

David

0
 

Author Comment

by:sytan
Comment Utility

Thanks for the answer, actually.. my tech guys manage to solve the problem hours after i post this  question, but no doubt jkotek deserve the points.. thanks anyway..

And to David, thanks for the advice, altought i would like to know more on this transaction log thinggy, as how would i know if this db requires it. Btw, i have set the select into to false already.


And again i thank you both!

sytan
0
 
LVL 9

Expert Comment

by:david_levine
Comment Utility
The transaction log is needed for recovery. Lets say you take a database dump at midnight. You also take transaction log dumps every 30 mins. If you lose your database for some reason, you would restore the full dump from midnight and then apply the transaction logs to get you back to within 30 mins at the most of what your system was before it went down.

Without transaction logs, or should I say with the Trunc Log On Checkpoint option set, the transaction logs are cleared pretty much at the time any user transaction commits. They are still used for doing rollbacks of transactions if that is needed during the life of a user transaction. But if you have a catastrophic failure, you can only recover back to the previous nights full database dump and everything since then is lost.

Make sense?

David
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
Find out what Office 365 Transport Rules are, how they work and their limitations managing Office 365 signatures.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now