?
Solved

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

Posted on 2008-10-02
14
Medium Priority
?
1,203 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
[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
  • 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
Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The well known Cerber ransomware continues to spread this summer through spear phishing email campaigns targeting enterprises. Learn how it easily bypasses traditional defenses - and what you can do to protect your data.
We are witnesses that everyone is saying that our children shouldn't "play" with a technology because it is dangerous. This article is going to prove that they are wrong.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

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