Question about Computers & Internet

1 Answer

SQL Server 2000

I am developing an accounting software in SQL Server 2000.
I want to create blank tables, stored procedures, user defined functions in new database which i am using in the last year's database.

I am using VB6.0 as front end tool and SQL Server 2000 as database.

My question is :
How programitically transfer Stored Procedures and UDF from last year's database to new year's database ?

Information : I created new year's database using SQL DMO, I created tables using script and executing it from stored procedure.

But I am not being able to tranfer the last year;s stored proc and udf to new year's database using vb code or vbscript code.

Please guide me through.

my email id is : aadityasankalp@yahoo.com

Posted by on

Ad

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    Corporal:

    An expert that has over 10 points.

    Problem Solver:

    An expert who has answered 5 questions.

  • Contributor
  • 17 Answers

An easy way to transfer objects (tables, user defined functions, stored procedures, etc.) is to use Enterprise Manager's "Generate SQL" feature. Use this process at your own risk. Doing it wrong could mess up your existing database.

1. In Enterprise Manager, right-click on the old database and choose "All Tasks" then "Generate SQL Script".
2. In the dialog that comes up, click "Show All" then select the checkboxes for "all stored procedures" and "all user defined functions". (You might also want to check some other boxes, depending on your exact situation.)
3. Click the "generate" button and save the script that it creates.
4. Run the script in the NEW database.

If you run the script in your OLD database, it may destroy your objects, and that would be very bad. Make sure you run the script in your NEW database. (While we're on this subject, it's a good time to mention that you should back up your database before you start this process, and you should make changes to a test system before migrating it to production.)

That should move your stored procedures and user defined functions over.

You can use a similar process to move tables, views, users, and other objects over as well.

Posted on Jan 17, 2008

Ad

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi there,
Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this issue over the phone in a minute or two.

Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.

Here's a link to this great service

Good luck!

Posted on Jan 02, 2017

Ad

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

3 Answers

How SQL Database Recovered MDF and NDF file formates?


SQL Server Recovery is an reliable one-stop solution to retrieve back corrupt or damaged SQL Server database.It can work in all cases of corruption in databases because of operating system malfunction, application crash, virus attacks and unexpected shutdown. It resolves the bit pattern to avoid corruption and scans the whole database for distorted entries.It supports Microsoft SQL Server 2008, 2012, 2014 and 2016.You can choose specific objects with its functionality and recover them from the list and save at any drive.

Dec 07, 2017 | The Computers & Internet

3 Answers

How to restore MySQL database Windows tool?


You can restore corrupt and delete SQL database file in few steps for MySQL Restore Toolbox. With this software you can also recover triggers, keys, indexes and table. Software support multiple MDF file recovery option. Software is supported by all Windows operating system. Get more ideas and download free trial version from -http://www.filerepairforum.com/forum/databases/databases-aa/mysql/1162-dump-mysql-database-file-is-error

May 29, 2015 | Sun MySQL

3 Answers

Repair database without being attached SQL 2005


Use SQL Server Repair Kit. A convenient, reliable and ultimately efficient MS SQL database repair tool for system administrators, developers and database experts. Best in class performance and outstanding usability for users with and without experience.

Read more: http://www.mssqlserver.repair/

May 13, 2015 | Microsoft SQL Server 2005 Enterprise...

4 Answers

Recover data from corrupt .mdf and .ldf files.


You can find more information here:
http://www.filerepairforum.com/forum/microsoft/microsoft-aa/sql-server/569-i-have-a-problem-how-do-i-fix-a-corrupted-database-file

Open your SQL Server Management Studio console. This application shortcut is available in the SQL Server directory in the Windows Start button.
· Enter the system administrator user name and password. SQL Server's administrator user name is "sa." This account is required for privileges to restore the database. If your restoring on a host provider server, use the administrator user name and password they supplied for your account.
·Right-click your database name and select "Attach." In the new window that opens, click the "Add" button to open a dialog box.
·Select your MDF file and press the "Ok" button. It may take several minutes to restore the database if it is a large file. Once the process is finished, browse your tables to verify the data. The database is now restored.
If nothing helped try to use:SQL Server Fix Toolbox
http://www.fixsqldatabase.com/

Nov 28, 2014 | Microsoft SQL Server 2000 Standard Edition...

5 Answers

Is it good idea to repair sql file?


Bulk Logged will not help you in this situation. Your transaction log is growing because you are performing large transactions. In simple mode, the log is truncated after a checkpoint.
Check these site: http://www.sql.recoverytoolbox.com/ & download demo Recovery Toolbox for SQL Server.
Depending on how you are loading your data, you may need to break it up into smaller chunks. Make sure you are not loading all the data in one large transaction.
Read more: http://www.filerepairforum.com/forum/microsoft/microsoft-aa/sql-server/380-is-it-good-idea-to-change-simple-recover-model-into-bulk-logged-on-etl-system

Nov 06, 2014 | Microsoft SQL Server 2005 Standard Edition

5 Answers

Some requirement for SQL server repair


Read this blog at the following link: http://recoverymaster.livejournal.com and know helpful details about MS SQL server database recovery wizard. You can download this software: http://www.sqlrecovery.org

Jun 10, 2014 | Microsoft Database Software A5K-02817 SQL...

16 Answers

How can I repair a corrupted MDF files and SQL server?


Similar question has been answered here: http://www.fixya.com/support/t24364927-sql_repair_recovery_process_very

Before asking any question in the forum, first you need to search your problem.

May 12, 2014 | Microsoft Database Software A5K-02817 SQL...

4 Answers

Restoring files from the database


I suggest you use the Enterprise manager (gui tool to manage SQL).
Restoring a single table is not an option.
You can however restore a file or filegroup.
Make sure to backup before you start and NOT to restore database to its original name or original file location, to avoid acidents.
Normally you will have databases with only 2 files: the data at its Primary file group, and log file.
You may wish to create a new file group and move tables to the new group by recreating them there and exporting data from old table to new table. Then recreate indexes. This may prove to be complex as all tables and indexes have unique names and can't coexist with exact duplicate of them.

oh yea..... did I say backup?
well just in case backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup
but dont overwrite that backup

Feb 11, 2008 | Microsoft SQL Server 2000 Standard Edition...

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

205 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18425 Answers

Alun Cox

Level 3 Expert

2678 Answers

David Payne
David Payne

Level 3 Expert

14162 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...