[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to extract all my store procs from DB Artisan to a local directory?

Posted on 2008-10-02
14
Medium Priority
?
1,233 Views
Last Modified: 2012-05-05
Hi,

I want to know how to get or copy all the store procedures to a local directory.  
I am able to extract and copy one by one.  Right click on a store procedure name and then click on extract and say file-> save as to my local folder.  But I have more than 100 store procedures so I need to know if there is any easier way so that I can save all of the store procedures in a batch.  Please let me know if there is any nice way of doing it.

Thanks in advance.
0
Comment
Question by:rbhargaw
  • 6
  • 6
  • 2
14 Comments
 
LVL 19

Expert Comment

by:grant300
ID: 22628531
I don't know if DBArtisan has that capability or not.  Have you tried doing a multiple selection and then right mouse clicking?  Have you tried selecting the Procedure folder and right mouse clicking?

I use RapidSQL all the time and we routine export hundreds of stored procedures.  I would be surprised if there was not a way to do it in DBArtisan.

Have you looked to see if there is a way to export objects to a flat file instead of to the editor window?

Regards,
Bill
0
 

Author Comment

by:rbhargaw
ID: 22628996
1. Multiple selection with Right click and "extract" opens only one file.
2. No option on Right click of Folder (other than connect, disconnect)


Multiple selection with Right click and "opens" will give all the files but you need to do save as and then copy the name. Export objects are not present.


0
 
LVL 6

Expert Comment

by:IncisiveOne
ID: 22640017
Explorer-datasources-SERVER-databases-DATABASE-procedures.  On the right, you shold have a full list of sprocs (by owner, name, etc). Click at the top of the list.  Using the scroll bar on the far right, go to the bottom of the list. SHIFT-Click on the last entry.  you should have multiple selection.  Now hit the Extrac Button.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:rbhargaw
ID: 22671746
DBArtisan does not have option to export all the stored procedure at once. I am closing the ticket.
0
 
LVL 6

Accepted Solution

by:
IncisiveOne earned 500 total points
ID: 22676043
1  Author's comment is incorrect, looks like he has scrolling problems or does not understand right-click, shift-click, etc.  I have and use DBArtisan 8.5.5 & Sybase extensively.  File attached showing DBArtisan multiple selection as per my solution (following which the Extract button needs to be used).
2  There are alternate (without using DBArtisan) simple methods but these cannot be tabled unless there is a dialogue, which the author is not progressing with.

(The upload does not appear to finish ... Objecting as is after 15 mins)
0
 

Author Comment

by:rbhargaw
ID: 22678283
Hello IncisiveOne,

I did tried The same "Click at the top of the list.  Using the scroll bar on the far right, go to the bottom of the list. SHIFT-Click on the last entry and then right click extract", that opened only one stored procedure.

Can you tell me any method to do that?

Thanks
0
 

Author Comment

by:rbhargaw
ID: 22678291
Increasing the point since the discussion will go furthur
0
 
LVL 6

Expert Comment

by:IncisiveOne
ID: 22683453
I still believe your problems are in the area of keystrokes.  Therefore we are going to have to get very specific with instructions.  You did not do what I requested, pls try again.
0  Accept that what you want is possible.
1  Scroll to the top of the list, select the first proc entry.
2  Using the scroll bar, scroll to the bottom of the list.
3  Holding the shift key down, click on the last proc entry in the list.  At this stage your screen should look like mine (attached file; the entire selected set of entries should be blue).  If you have not succeeded in selecting all the entries, then do not go further, post again.
4 Do not use "right-click ... Extract"
5 Leave the multiple selection as is. Hit the Extract BUTTON (in my screen, it is fourth from the left.
DBArtisan-Multi-Selectn.jpg
0
 
LVL 6

Expert Comment

by:IncisiveOne
ID: 22683472
6 Now you should get a dialogue with a progress bar(second attached file)
7 Which will be placed in one SQL window, which can be saved to one file.

Cheers
Derek
DBArtisan-Multi-Extractn.jpg
0
 

Author Comment

by:rbhargaw
ID: 22683989
Derek,

I tried as indicated by you. If I choose 3 stored procedures, all 3 stored procedures will come up in ONE file.
Hope I am right till now. How do I save them individually??

I want these stored procedures as proc1.sql, proc2.sql, proc3.sql so to be able save in my local drive.



Thanks
Roop
0
 
LVL 6

Expert Comment

by:IncisiveOne
ID: 22684115
Hang on, your original question asks to extract & store all the stored procs together, in a "batch".  I understood that to be ONE file.  Now it seems you want each sproc in a separate file, but you want to do the extraction/store in one command (or set of keystrokes).  Now the mention of "folder" makes more sense to me.

You are trying to mix single-selection facilities (one sproc per file) with multiple-selection (a batch of sprocs which means a batch file) and get one sproc per file. Have you seen this with any PC program ... multiple select ... each to a separate file ... but specify just one folder ?  I have not.  DBArtisan does not do that.   I have not come across any PC program that does that.  I thought you were having difficulty doing something which can be reasonably expected of PC software.  My apologies, Suggestion and all comments retracted.

Now if you decide that 100 x (2 clicks + 2 keystrokes) is not too much effort (I manage 1500 sprocs via DBArtisan), you can do them one at a time; the filename defaults to the sproc name; you need to choose the folder once, on the first Save.  

Of course, this task is a once-off; once you have your sprocs synched with your files, just keep them synched.  The alternative is to avoid storing the sprocs in files, and rely (for restoration purposes) on the database backup alone; there is no need to keep two backup copies.  When you cut a release, or need version control, you can multiple select all sprocs and store in one batch file, with a release/version name, in the same way that you would have all defaults in one file, all datatypes, in one file, etc.
0
 

Author Comment

by:rbhargaw
ID: 22684213
My apology, I guess, coz of one line, the whole Q&A went in different path.

 I needed them for version control as we need to specify the file name and tag # associated with them in the CM meetings, if changes are made in Stored procedures going forward.

So I did extract one by one all the procs as it should be one-off task and  closed the ticket but then we land up here :)
0
 
LVL 19

Expert Comment

by:grant300
ID: 22687541
DbArtisian is the wrong tool.

Get a copy of RapdiSQL Pro.  It has interfaces to several popular Source Code Control tools and has the ability to do the kind of file-by-file project control you need to do.

Regards,
Bill
0
 
LVL 6

Expert Comment

by:IncisiveOne
ID: 22695981
Or ddlgen (Sybase s/w delivered with Sybase)
Or SQLProgrammer (Faust)
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

If anyone asked you to network diagram of the internet, it was drawn in the form of a fluffy cloud which further became known as cloud computing. Popularly cloud computing is defined as workloads that run over the internet in a commercial provider’s…
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

834 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