RE: Sql Server 6.5 copy database? Save Sql output?

RE: Sql Server 6.5 copy database? Save Sql output?

 

  

Mary

schedule a bat file to run a command such as

ISQL -E -d master -Q "sp_help_revdatabase" -o "Databases.DDL" -w 140 -n

Richard


-----Original Message-----
From: Long, Charles (euler:eti) [mailto:Charles.[Email Address Removed] Monday, June 17, 2002 8:01 PM
To: 'Mary Bahrami'; Charles Caroline; [Email Address Removed] RE: Sql Server 6.5 copy database? Save Sql output?


Hi Mary,

I think there are probably several ways to do this. Starting with a .bat
file I would - on 6.5 - schedule a task via SQL Executive to run xp_cmdshell
to run my batch file. Within the batch file I would amend the isql calls
(assumed) to redirect their output to a file (look under output command in
NT Help if you need more information on this; an alternative is to use the
/o parameter.).

Hope this helps

Charles

> -----Original Message-----
> From: Mary Bahrami [SMTP:[Email Address Removed] Sent: Friday, June 14, 2002 7:28 PM
> To: Charles Caroline; [Email Address Removed] Subject: RE: Sql Server 6.5 copy database? Save Sql output?
>
> Thanks, it worked successfully.
>
> New question:
> I want to schedule a TSQL task to execute sp_help_device and
> sp_help_revdatabase and output the results to a file, but don't see the
> option to save output to a file....Is this possible from within SQL
> Server 6.5? (I have a working .bat file to do the same, but want to
> schedule a task if possible).
>
> TIA,
> mary
>
> -----Original Message-----
> From: Charles Caroline [mailto:[Email Address Removed] Sent: Monday, June 10, 2002 3:18 AM
> To: Mary Bahrami; '[Email Address Removed] Subject: RE: Sql Server 6.5 copy database?
>
>
> Mary
> It would be worth you looking up sp_help_revdatabase.
> You need to recreate the database with exactly the same structure
> (fragments) as before. sp_help_revdatabase run against the original db
> creates a script by analysing the existing database. You can then use
> this
> script to recreate the new database structure.
>
> Another potential problem occurs if you intend to copy the logins as
> well.
> The syslogins table is in the master database therefore the SUIDs
> generated
> when you create a new login will be different on your new server. The
> SUID
> is a foreign key in the sysusers table for each database the login has
> access to so the suids must match properly.
> Hope this helps.
> Caroline Charles
>
>
> > ----------
> > From: Mary Bahrami[SMTP:[Email Address Removed] > Sent: 07 June 2002 19:06
> > To: SQLDBA (E-mail)
> > Subject: Sql Server 6.5 copy database?
> >
> > All,
> >
> > We have a 6.5 database that we can't upgrade right now. It has never
> > been restored. I want to test restoring it to another server. I have
> > only done this in SQL Server 2000.
> >
> > So far, I have just installed nt4.0 and SS6.5 SP5 on the test server.
> I
> > have a backup the the database that was created via a Sql Server
> backup
> > job. (a .dat file)
> >
> > I think my steps are:
> >
> > 1.create the database on the test server (I have to recreate the
> > devices, since it is not automatic in 6.5, but the drives will be
> > different, is that okay? so I am going to do sp_helpdevice to get the
> > layout from the production database?)
> > 2. do a restore from the menu? hopefully I can point at the file I
> ftp'd
> > over?
> >
> >
> > Can you confirm that this will work, or what am I missing?
> >
> > Thanks,
> > Mary
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: mssqldba-[Email Address Removed] > For additional commands, e-mail: mssqldba-[Email Address Removed] >
>
>
> ____________________________________________________________________
> "This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. This communication may contain material protected by
> attorney-client privilege. If you are not the intended recipient or
> the person responsible for delivering the email to the intended
> recipient, be advised that you have received this email in error and
> that any use, dissemination, forwarding, printing, or copying of this
> email is strictly prohibited. If you have received this email in error
> please notify the IT Call Centre by telephone on 44 (0) 1953 608000."
>
> [Email Address Removed] http://www.lotuscars.co.uk
> http://www.lotuseng.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: mssqldba-[Email Address Removed] For additional commands, e-mail: mssqldba-[Email Address Removed]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: mssqldba-[Email Address Removed] For additional commands, e-mail: mssqldba-[Email Address Removed] unsubscribe, e-mail: mssqldba-[Email Address Removed] additional commands, e-mail: mssqldba-[Email Address Removed]MS Sql Server LazyDBA home page