Results 1 to 4 of 4

Thread: Extracting stored procedures

  1. #1
    Join Date
    Dec 2010
    Posts
    136

    Extracting stored procedures

    I have a sql server 2008 dbf file and I made this in visual studio 2010 that I require to change to a sql server 2005 format. Now I acquainted with there is no downgrade path, but this is an unfilled database - so all I actually require is the tables and stored procedures. Knowing not anything much concerning sql server, I would akin to to extract, print, copy/paste, whatever, the stored procedures and then in some way put them in the innovative 2005 database. I have only ever used visual studio's server explorer to supervise the database files, and through the way, these are sql server express user instance databases.There is only regarding 50 or so stored procedures, so most horrible case I was able to copy the text to notepad and paste in the new db - is there a more automatic way to do this?

  2. #2
    Join Date
    Jan 2010
    Posts
    433

    Re: Extracting stored procedures

    Well regarding this I have on solution which I got after searching a lot on the Google. Well of course there is a way you are able to make use of the Script database to a file/query.
    Steps:
    1. Right tick on your database
    2. Go to Tasks>Generate Scripts
    3. Go after the wizard to choose the objects whose script you desire to produce. You are able to produce scripts for creation of database, table, stored procedures, values etc.
    4. save the file as sql.
    5. Run the saved file in your original database and well the whole thing will be there.

  3. #3
    Join Date
    Oct 2010
    Posts
    87

    Re: Extracting stored procedures

    In this I am also going through the issue but in this I want to know that how to take out a stored procedure code from the database as one file (.sql) per stored procedure?I require one file each for one stored method not all stored process code in one file. Is it probable to do it along with a number of tools or any specific procedures? So if you guys have any idea then help me as soon as it is possible for you.

  4. #4
    Join Date
    Jan 2009
    Posts
    721

    Re: Extracting stored procedures

    Hey do not have to worry regarding this because I have one solution and I am sure that this will help you. Because when I was facing the similar issue at that time I have tried that and it help me and after doing that till now I do not have any query in this. In this you can use defncopy for extracting stored procedure code as follows
    Code:
    defncopy -U<user_name> -S<server_name> out <output_file_name.txt> <db_name> <owner_name.procedure_name>
    so only this much you have to do that’s it.

Similar Threads

  1. Using stored procedures and stored functions in MySQL
    By Adiran in forum Software Development
    Replies: 6
    Last Post: 14-12-2010, 01:54 AM
  2. What is SQL Stored Procedures?
    By technika in forum Software Development
    Replies: 5
    Last Post: 20-02-2010, 05:00 PM
  3. Calling Oracle Stored Procedures with PHP
    By Landan in forum Software Development
    Replies: 5
    Last Post: 12-02-2010, 05:37 PM
  4. How to execute Stored procedures in Hibernate?
    By NegiRaj in forum Software Development
    Replies: 3
    Last Post: 10-08-2009, 11:54 PM
  5. Replies: 3
    Last Post: 03-08-2009, 09:13 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,030,686.28827 seconds with 17 queries