Showing posts with label backup. Show all posts
Showing posts with label backup. Show all posts

Tuesday, March 27, 2012

Creating VirtualDeviceSet for Remote SQL Server 2005 failed.

Hi, all!

I am writing the VDI application to allow backup/restore MS SQL Server 2005. I would want to backup/restore remote servers as well as local. I have local instance of MS SQL 2005 and remote. Local instance has MSSQL2005_ZORG instance name, remote uses default (so it supposed to be MSSQLSERVER).

While connection to those server via SQL Server Management studio i see local server as "ZORG\MSSQL2005_ZORG" and remote as "VM2000SRVZ2".

When i try to create VIrtualDeviceSet via CreateEx i pass "MSSQL2005_ZORG" as lpInstanceName parameter and all works fine. But I could't create same device set for remote 'MSSQLSERVER' instance. I passed any combination for that, such as "VM2000SRVZ2\MSSQLSERVER", "MSSQLSERVER", "VM2000SRVZ2", "\\VM2000SRVZ2\MSSQLSERVER" and so on. No luck always get VD_E_INSTANCE_NAME (0x80770007).

Any idea?

--Thanks

Hi,
As per the Microsoft Virtual Backup specifications, VDI can be used only on local machines.You can download the specifications from

http://www.microsoft.com/downloads/details.aspx?familyid=416f8a51-65a3-4e8e-a4c8-adfe15e850fc&displaylang=en

If u have used VDI for some time, i need ur help.Relpy if you can

Creating VirtualDeviceSet for Remote SQL Server 2005 failed.

Hi, all!

I am writing the VDI application to allow backup/restore MS SQL Server 2005. I would want to backup/restore remote servers as well as local. I have local instance of MS SQL 2005 and remote. Local instance has MSSQL2005_ZORG instance name, remote uses default (so it supposed to be MSSQLSERVER).

While connection to those server via SQL Server Management studio i see local server as "ZORG\MSSQL2005_ZORG" and remote as "VM2000SRVZ2".

When i try to create VIrtualDeviceSet via CreateEx i pass "MSSQL2005_ZORG" as lpInstanceName parameter and all works fine. But I could't create same device set for remote 'MSSQLSERVER' instance. I passed any combination for that, such as "VM2000SRVZ2\MSSQLSERVER", "MSSQLSERVER", "VM2000SRVZ2", "\\VM2000SRVZ2\MSSQLSERVER" and so on. No luck always get VD_E_INSTANCE_NAME (0x80770007).

Any idea?

--Thanks

Hi,
As per the Microsoft Virtual Backup specifications, VDI can be used only on local machines.You can download the specifications from

http://www.microsoft.com/downloads/details.aspx?familyid=416f8a51-65a3-4e8e-a4c8-adfe15e850fc&displaylang=en

If u have used VDI for some time, i need ur help.Relpy if you can

Saturday, February 25, 2012

Creating new backup device

I need to create a new backup device. I have installed a
USB drive, and would like to backup a database to it.
However, SQL Server can only see one of the drives
available on the machine when I try to create the new
device. How can I make a new backup device to a different
drive letter?
Can you try creating a dump device using sp_addumpdevice from Query Analyzer
and see if that solves the problem? See SQL Server Books Online for more
information.--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"onemoreshot" <anonymous@.discussions.microsoft.com> wrote in message
news:7fa201c484ae$4c09e7b0$a401280a@.phx.gbl...
I need to create a new backup device. I have installed a
USB drive, and would like to backup a database to it.
However, SQL Server can only see one of the drives
available on the machine when I try to create the new
device. How can I make a new backup device to a different
drive letter?
|||In other words, it can't be done through Enterprise
Manager? Thanks .

>--Original Message--
>Can you try creating a dump device using sp_addumpdevice
from Query Analyzer
>and see if that solves the problem? See SQL Server Books
Online for more
>information.--
>HTH,
>Vyas, MVP (SQL Server)
>http://vyaskn.tripod.com/
>
>"onemoreshot" <anonymous@.discussions.microsoft.com> wrote
in message
>news:7fa201c484ae$4c09e7b0$a401280a@.phx.gbl...
>I need to create a new backup device. I have installed a
>USB drive, and would like to backup a database to it.
>However, SQL Server can only see one of the drives
>available on the machine when I try to create the new
>device. How can I make a new backup device to a different
>drive letter?
>
>.
>
|||If it is a proper drive, then you should be able to do it in EM also. I am
just trying to narrow down the problem, by trying this in Query Analyzer.
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
<anonymous@.discussions.microsoft.com> wrote in message
news:8be201c48592$81ec8f60$a401280a@.phx.gbl...
In other words, it can't be done through Enterprise
Manager? Thanks .

>--Original Message--
>Can you try creating a dump device using sp_addumpdevice
from Query Analyzer
>and see if that solves the problem? See SQL Server Books
Online for more
>information.--
>HTH,
>Vyas, MVP (SQL Server)
>http://vyaskn.tripod.com/
>
>"onemoreshot" <anonymous@.discussions.microsoft.com> wrote
in message
>news:7fa201c484ae$4c09e7b0$a401280a@.phx.gbl...
>I need to create a new backup device. I have installed a
>USB drive, and would like to backup a database to it.
>However, SQL Server can only see one of the drives
>available on the machine when I try to create the new
>device. How can I make a new backup device to a different
>drive letter?
>
>.
>

Friday, February 24, 2012

creating jobs in EM via terminal services

I created a maintenance plan on a server to backup the database and logs. I
created the plan through EM on my PC. The plan works ok. The problem is that
when I log on to the server via terminal services and start EM on the server
the jobs are not there. I've created jobs this way many times before and I'v
e
always been able to see them when logged on to the server.
Any idea why I can't see these jobs? Does it have anything to do with a
maintenance plan?
Thanks,
--
Dan D.Hi Dan,
Do you use trusted connection to login to sql server in both solutions?
Yours truly,
Tomasz B.
"Dan D." wrote:

> I created a maintenance plan on a server to backup the database and logs.
I
> created the plan through EM on my PC. The plan works ok. The problem is th
at
> when I log on to the server via terminal services and start EM on the serv
er
> the jobs are not there. I've created jobs this way many times before and I
've
> always been able to see them when logged on to the server.
> Any idea why I can't see these jobs? Does it have anything to do with a
> maintenance plan?
> Thanks,
> --
> Dan D.|||I figured it out. I have the users set up differently on that box. When I
logged on with my user logon, I could see the jobs. Thanks.
"Tomasz Borawski" wrote:
[vbcol=seagreen]
> Hi Dan,
> Do you use trusted connection to login to sql server in both solutions?
> Yours truly,
> Tomasz B.
> "Dan D." wrote:
>

creating jobs in EM via terminal services

I created a maintenance plan on a server to backup the database and logs. I
created the plan through EM on my PC. The plan works ok. The problem is that
when I log on to the server via terminal services and start EM on the server
the jobs are not there. I've created jobs this way many times before and I've
always been able to see them when logged on to the server.
Any idea why I can't see these jobs? Does it have anything to do with a
maintenance plan?
Thanks,
Dan D.
Hi Dan,
Do you use trusted connection to login to sql server in both solutions?
Yours truly,
Tomasz B.
"Dan D." wrote:

> I created a maintenance plan on a server to backup the database and logs. I
> created the plan through EM on my PC. The plan works ok. The problem is that
> when I log on to the server via terminal services and start EM on the server
> the jobs are not there. I've created jobs this way many times before and I've
> always been able to see them when logged on to the server.
> Any idea why I can't see these jobs? Does it have anything to do with a
> maintenance plan?
> Thanks,
> --
> Dan D.
|||I figured it out. I have the users set up differently on that box. When I
logged on with my user logon, I could see the jobs. Thanks.
"Tomasz Borawski" wrote:
[vbcol=seagreen]
> Hi Dan,
> Do you use trusted connection to login to sql server in both solutions?
> Yours truly,
> Tomasz B.
> "Dan D." wrote:

creating jobs in EM via terminal services

I created a maintenance plan on a server to backup the database and logs. I
created the plan through EM on my PC. The plan works ok. The problem is that
when I log on to the server via terminal services and start EM on the server
the jobs are not there. I've created jobs this way many times before and I've
always been able to see them when logged on to the server.
Any idea why I can't see these jobs? Does it have anything to do with a
maintenance plan?
Thanks,
--
Dan D.Hi Dan,
Do you use trusted connection to login to sql server in both solutions?
Yours truly,
Tomasz B.
"Dan D." wrote:
> I created a maintenance plan on a server to backup the database and logs. I
> created the plan through EM on my PC. The plan works ok. The problem is that
> when I log on to the server via terminal services and start EM on the server
> the jobs are not there. I've created jobs this way many times before and I've
> always been able to see them when logged on to the server.
> Any idea why I can't see these jobs? Does it have anything to do with a
> maintenance plan?
> Thanks,
> --
> Dan D.|||I figured it out. I have the users set up differently on that box. When I
logged on with my user logon, I could see the jobs. Thanks.
"Tomasz Borawski" wrote:
> Hi Dan,
> Do you use trusted connection to login to sql server in both solutions?
> Yours truly,
> Tomasz B.
> "Dan D." wrote:
> > I created a maintenance plan on a server to backup the database and logs. I
> > created the plan through EM on my PC. The plan works ok. The problem is that
> > when I log on to the server via terminal services and start EM on the server
> > the jobs are not there. I've created jobs this way many times before and I've
> > always been able to see them when logged on to the server.
> >
> > Any idea why I can't see these jobs? Does it have anything to do with a
> > maintenance plan?
> >
> > Thanks,
> > --
> > Dan D.

Creating Job to do Daily Backup

I have a client that is using the free MSDE database engine. There is no graphical interface that I know of to manage the day-to-day tasks. I need to do a daily backup to a disk file. I want to start the backup at 7:40pm. My client then will copy that disk file to tape duing his system-wide backup at midnight. I setup a batch file and executed it in osql but the job is not working. No disk file has been created in the last 3 weeks. I don't have a clue what I am missing. Can someone please look at this and tell me how to fix it?

Thanks in Advance!

Debbie Erickson

USE master
EXEC msdb..sp_delete_jobserver
@.job_name='PetDB Backup',
@.server_name='Server06'
GO

USE master
EXEC msdb..sp_delete_jobschedule
@.job_name='PetDB Backup',
@.name = 'ScheduledBackup'
GO

USE master
EXEC msdb..sp_delete_jobstep
@.job_name='PetDB Backup',
@.step_id=0
GO

USE master
EXEC msdb..sp_delete_job
@.job_name='PetDB Backup'
GO

USE master
EXEC msdb..sp_add_job
@.job_name='PetDB Backup',
@.enabled=1,
@.description='Backup Petdb'
GO

USE master
EXEC msdb..sp_add_jobstep
@.job_name='PetDB Backup',
@.step_name='Nightly petdb maint',
@.subsystem='TSQL',
@.command='BACKUP DATABASE Petdb TO DISK = ''E:Petlic\Data Backup\Petdb.bak''',
@.database_name='petdb'
GO

USE master
EXEC msdb..sp_add_jobschedule
@.job_name='PetDB Backup',
@.name = 'ScheduledBackup',
@.freq_type=4,
@.freq_interval=1,
@.active_start_time='194000'
GO

USE master
EXEC msdb..sp_add_jobserver
@.job_name='PetDB Backup',
@.server_name='Server06'
GO

Does BACKUP DATABASE Petdb TO DISK = ''E:Petlic\Data Backup\Petdb.bak'' (copied exactly from your job) work OK when run via osql?|||

Hello again. I decided to go a slightly different path. The backup statement works fine in osql. So I put that command in a text file by itself. Then I created a dos batch file that runs osql with sql batch file. Then I used a windows scheduler to run my dos batch file. Not exactly how I wanted to solve this, but it works.

Debbie

Tuesday, February 14, 2012

Creating database from backup?

Hi genius minds,
Suppose I have database backup file.
Can I create a new database(different than the database whose backup it is) and restore the backup into newly created database.
I'm having a backup file of some database, I want to create database from it. Suggest any way to do it?
ThxThat's the way to do it. Just be sure when you restore it, you give it a new database name and make sure the option to 'Force restore over existing database' is not turned on. You don't have to create the database first; it'll create it for you with the name you provide.

If you are restoring to a different server, you'll probably have to run sp_change_users_login to adjust the logins. If restoring to the same server, you won't have to.|||I have to restore it to a different server. I have all the login/passwords of both servers.
Can u gimme details of this sp_change_users_login?
Thx for ur reply|||Books on Line has all the details.|||Got it!
Thx for your help mate!