Showing posts with label back. Show all posts
Showing posts with label back. Show all posts

Friday, March 30, 2012

How to FTP DB backup File from one server to the other

I would like to set up sort of schedule by using FTP to move database back up file from Production server to Staging server every night. Is someone telling me how to do this and any other good way to handle it? I appreciate help!
JQIf both servers are on your network, make a DTS package that does the backup and "On success" run a DOS batch command to copy the .BAK file from server to server. Then Schedule the package.|||tdudley,

thanks for your help! Can you give me more details for how to do that. I am kind of new to DTS package.

JQ|||Choose add new package:

Select the connection icon for SQL Server and point to the database of your choice.

Select the Task "Execute SQL Task" Input something like this into the "SQL Statement:" box: BACKUP DATABASE [YourDatabaseNameHere] TO DISK = N'e:\MSSQL\BACKUP\YourDatabaseNameHere.bak' WITH INIT , NOUNLOAD , NAME = N'Backup YourDatabaseNameHere', NOSKIP , STATS = 10, NOFORMAT

Then add another task "Execute process task" place your dos bat command call like this "E:\Files\Ftp\YourDatabaseNameHere.bat" in the "Win32 process:" box.

Then click the Execute SQL Task hold control and click the execute process task click workflow and choose "On Success"

Save this locally to SQL Server as say "OFF_SITE_BACKUP" and then schedule the job. Hope this was helpful.

Monday, March 26, 2012

How to fix this situation on Replication?[Urgent.]

Hi, all..
I by mistake Overwrites distribution DB.
Server1 and Server2 replicates each other.
Applications are using Server1, and Server2 is back up purpose.
When server1 fails application redirected SErver2, using same data since there is replication.
Server2 had distribution DB.

Now there is no distribution DB.. it's messed up...
I want to restore replication between Server1 and Server2.
I tried to make replication from Server1, I got errors..

How can I do this?What kind of errors? :confused:

Friday, February 24, 2012

How to find database table and their field name run time.

I am using sql server as back end. Through connection stringI am getting database name. But in A dropdown I want to show list of table inthat database. And in another B drop down I want to show fields of tableselected in A dropdown. can any one help in getting the field .

The sp_Tables query will return the tables in a database andsp_Columns returns the column names

http://www.vb-tips.com/dbpages.aspx?ID=9e2d9af4-3909-421d-b422-87c1d376674d

|||

And if you want to dig deeper into the structure of the database or server, you can use SQL-DMO in SQL Server 2000 or SMO (SQL Management Objects) in SQL Server 2005.

Don