Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1261
  • Last Modified:

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

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
rbhargaw
Asked:
rbhargaw
  • 6
  • 6
  • 2
1 Solution
 
grant300Commented:
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
 
rbhargawFounderAuthor Commented:
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
 
IncisiveOneCommented:
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
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
rbhargawFounderAuthor Commented:
DBArtisan does not have option to export all the stored procedure at once. I am closing the ticket.
0
 
IncisiveOneCommented:
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
 
rbhargawFounderAuthor Commented:
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
 
rbhargawFounderAuthor Commented:
Increasing the point since the discussion will go furthur
0
 
IncisiveOneCommented:
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
 
IncisiveOneCommented:
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
 
rbhargawFounderAuthor Commented:
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
 
IncisiveOneCommented:
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
 
rbhargawFounderAuthor Commented:
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
 
grant300Commented:
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
 
IncisiveOneCommented:
Or ddlgen (Sybase s/w delivered with Sybase)
Or SQLProgrammer (Faust)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 6
  • 6
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now