Solved

Cant run Select Into

Posted on 2000-02-14
4
381 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
jkotek earned 20 total points
ID: 2518281
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
ID: 2520098
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
ID: 2521447

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
ID: 2522162
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Query Taking long time 7 487
SyBase SQL DataTime Format 6 298
Sybase IQ how to log personalized Users? 1 209
Query: Was the data in the Table inserted in ascending order? 11 104
Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime is disastrous for companies and can lead to major hits on a brand, reputation, an…
This article was originally published on Monitis Blog, you can check it  here .   Some years back, I worked as the CTO.  During my tenure, I had a head of IT support reporting to me.  He did his job quite well and had a commendable sense of duty…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

696 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