Showing posts with label path. Show all posts
Showing posts with label path. Show all posts

Thursday, March 8, 2012

Database Restore failure in SQL 2005

We are using following commands and options in SQL 2000 for backup and
restore a database:
Backup Database DatabaseName to Disk='file path' with INIT
Backup Log DatabaseName to Disk='file path' with INIT
Alter Database DatabaseName set offline with ROLLBACK IMMEDIATE
Restore Database From Disk='file path' with NORECOVERY
Restore Log From Disk='file path'
It fails in SQL 2005 bate 2. It complains the Log has not been backed up.
Does anybody have any ideal about it?
Just test once using workbench ..Do you get same error there as well..
"Siemens" wrote:

> We are using following commands and options in SQL 2000 for backup and
> restore a database:
> Backup Database DatabaseName to Disk='file path' with INIT
> Backup Log DatabaseName to Disk='file path' with INIT
> Alter Database DatabaseName set offline with ROLLBACK IMMEDIATE
> Restore Database From Disk='file path' with NORECOVERY
> Restore Log From Disk='file path'
> It fails in SQL 2005 bate 2. It complains the Log has not been backed up.
> Does anybody have any ideal about it?
|||Can you post the detailed error message?
Can you download the SQL 2005 June CTP and try it there?
--
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://blogs.msdn.com/weix
"Veeru" <Veeru@.discussions.microsoft.com> wrote in message
news:1E28D028-80FF-422A-AC55-8CB5D3ADC41C@.microsoft.com...[vbcol=seagreen]
> Just test once using workbench ..Do you get same error there as well..
> "Siemens" wrote:
up.[vbcol=seagreen]
|||That is a new feature in 2005. If you want to restore over a database, SQL Server want you to backup
the tail of the log first. If you don't want to do that, you can use REPLACE with the restore
command.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Siemens" <Siemens@.discussions.microsoft.com> wrote in message
news:CE1B6A41-57DC-4944-AC82-389E735FACD8@.microsoft.com...
> We are using following commands and options in SQL 2000 for backup and
> restore a database:
> Backup Database DatabaseName to Disk='file path' with INIT
> Backup Log DatabaseName to Disk='file path' with INIT
> Alter Database DatabaseName set offline with ROLLBACK IMMEDIATE
> Restore Database From Disk='file path' with NORECOVERY
> Restore Log From Disk='file path'
> It fails in SQL 2005 bate 2. It complains the Log has not been backed up.
> Does anybody have any ideal about it?

Database Restore failure in SQL 2005

We are using following commands and options in SQL 2000 for backup and
restore a database:
Backup Database DatabaseName to Disk='file path' with INIT
Backup Log DatabaseName to Disk='file path' with INIT
Alter Database DatabaseName set offline with ROLLBACK IMMEDIATE
Restore Database From Disk='file path' with NORECOVERY
Restore Log From Disk='file path'
It fails in SQL 2005 bate 2. It complains the Log has not been backed up.
Does anybody have any ideal about it?Just test once using workbench ..Do you get same error there as well..
"Siemens" wrote:

> We are using following commands and options in SQL 2000 for backup and
> restore a database:
> Backup Database DatabaseName to Disk='file path' with INIT
> Backup Log DatabaseName to Disk='file path' with INIT
> Alter Database DatabaseName set offline with ROLLBACK IMMEDIATE
> Restore Database From Disk='file path' with NORECOVERY
> Restore Log From Disk='file path'
> It fails in SQL 2005 bate 2. It complains the Log has not been backed up.
> Does anybody have any ideal about it?|||Can you post the detailed error message?
Can you download the SQL 2005 June CTP and try it there?
--
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://blogs.msdn.com/weix
"Veeru" <Veeru@.discussions.microsoft.com> wrote in message
news:1E28D028-80FF-422A-AC55-8CB5D3ADC41C@.microsoft.com...[vbcol=seagreen]
> Just test once using workbench ..Do you get same error there as well..
> "Siemens" wrote:
>
up.[vbcol=seagreen]|||That is a new feature in 2005. If you want to restore over a database, SQL S
erver want you to backup
the tail of the log first. If you don't want to do that, you can use REPLACE
with the restore
command.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Siemens" <Siemens@.discussions.microsoft.com> wrote in message
news:CE1B6A41-57DC-4944-AC82-389E735FACD8@.microsoft.com...
> We are using following commands and options in SQL 2000 for backup and
> restore a database:
> Backup Database DatabaseName to Disk='file path' with INIT
> Backup Log DatabaseName to Disk='file path' with INIT
> Alter Database DatabaseName set offline with ROLLBACK IMMEDIATE
> Restore Database From Disk='file path' with NORECOVERY
> Restore Log From Disk='file path'
> It fails in SQL 2005 bate 2. It complains the Log has not been backed up.
> Does anybody have any ideal about it?

Database Restore failure in SQL 2005

We are using following commands and options in SQL 2000 for backup and
restore a database:
Backup Database DatabaseName to Disk='file path' with INIT
Backup Log DatabaseName to Disk='file path' with INIT
Alter Database DatabaseName set offline with ROLLBACK IMMEDIATE
Restore Database From Disk='file path' with NORECOVERY
Restore Log From Disk='file path'
It fails in SQL 2005 bate 2. It complains the Log has not been backed up.
Does anybody have any ideal about it?Just test once using workbench ..Do you get same error there as well..
"Siemens" wrote:
> We are using following commands and options in SQL 2000 for backup and
> restore a database:
> Backup Database DatabaseName to Disk='file path' with INIT
> Backup Log DatabaseName to Disk='file path' with INIT
> Alter Database DatabaseName set offline with ROLLBACK IMMEDIATE
> Restore Database From Disk='file path' with NORECOVERY
> Restore Log From Disk='file path'
> It fails in SQL 2005 bate 2. It complains the Log has not been backed up.
> Does anybody have any ideal about it?|||Can you post the detailed error message?
Can you download the SQL 2005 June CTP and try it there?
--
--
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://blogs.msdn.com/weix
"Veeru" <Veeru@.discussions.microsoft.com> wrote in message
news:1E28D028-80FF-422A-AC55-8CB5D3ADC41C@.microsoft.com...
> Just test once using workbench ..Do you get same error there as well..
> "Siemens" wrote:
> > We are using following commands and options in SQL 2000 for backup and
> > restore a database:
> > Backup Database DatabaseName to Disk='file path' with INIT
> > Backup Log DatabaseName to Disk='file path' with INIT
> > Alter Database DatabaseName set offline with ROLLBACK IMMEDIATE
> > Restore Database From Disk='file path' with NORECOVERY
> > Restore Log From Disk='file path'
> > It fails in SQL 2005 bate 2. It complains the Log has not been backed
up.
> > Does anybody have any ideal about it?|||That is a new feature in 2005. If you want to restore over a database, SQL Server want you to backup
the tail of the log first. If you don't want to do that, you can use REPLACE with the restore
command.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Siemens" <Siemens@.discussions.microsoft.com> wrote in message
news:CE1B6A41-57DC-4944-AC82-389E735FACD8@.microsoft.com...
> We are using following commands and options in SQL 2000 for backup and
> restore a database:
> Backup Database DatabaseName to Disk='file path' with INIT
> Backup Log DatabaseName to Disk='file path' with INIT
> Alter Database DatabaseName set offline with ROLLBACK IMMEDIATE
> Restore Database From Disk='file path' with NORECOVERY
> Restore Log From Disk='file path'
> It fails in SQL 2005 bate 2. It complains the Log has not been backed up.
> Does anybody have any ideal about it?

Friday, February 17, 2012

Database path contains an Extra Backslash.

I am very new to Sequel Server but we have a SQL 2000 server. One of the
paths inthe database has an extra slash i.e (C:\Progame files\\websense)
Vertias Backup can not back it up if it has an extra slhash. How can I
removed the the extra slas. I am still able to access the data base.
THanks,
MomWhere in the database? Are you refering to database properties where it
tells you the path of your .MDF, .NDF & .LDF files?
Somehow I doubt this has any effect on backup, but I've been wrong before.
"Jon Osborn" <josborn@.pcsii.com> wrote in message
news:uMiOKWjJIHA.5980@.TK2MSFTNGP04.phx.gbl...
>I am very new to Sequel Server but we have a SQL 2000 server. One of the
>paths inthe database has an extra slash i.e (C:\Progame files\\websense)
>Vertias Backup can not back it up if it has an extra slhash. How can I
>removed the the extra slas. I am still able to access the data base.
> THanks,
> Mom
>|||In enterprise manager I right click on the WS631 Database and select
properties.
On the Dara Files tab it has
Filename as ws631 with a location of D:\Program
FIles\Websense\\wslogdb63_1.mdf
Transation log is the same with .ldf at the end
Vertias says the \\ after websense is the problem.
Thanks,
Jon
"Jay" <nospam@.nospam.org> wrote in message
news:%23R8EGWlJIHA.3516@.TK2MSFTNGP02.phx.gbl...
> Where in the database? Are you refering to database properties where it
> tells you the path of your .MDF, .NDF & .LDF files?
> Somehow I doubt this has any effect on backup, but I've been wrong before.
> "Jon Osborn" <josborn@.pcsii.com> wrote in message
> news:uMiOKWjJIHA.5980@.TK2MSFTNGP04.phx.gbl...
>|||Is the data file in "D:\Program FIles\Websense\wslogdb63_1.mdf"?
If so, detach the db, or take the engine offline and change the path.
"Jon Osborn" <josborn@.pcsii.com> wrote in message
news:uTK2KE6JIHA.3672@.TK2MSFTNGP02.phx.gbl...
> In enterprise manager I right click on the WS631 Database and select
> properties.
> On the Dara Files tab it has
> Filename as ws631 with a location of D:\Program
> FIles\Websense\\wslogdb63_1.mdf
> Transation log is the same with .ldf at the end
> Vertias says the \\ after websense is the problem.
> Thanks,
> Jon
>
> "Jay" <nospam@.nospam.org> wrote in message
> news:%23R8EGWlJIHA.3516@.TK2MSFTNGP02.phx.gbl...
>

Database path contains an Extra Backslash.

I am very new to Sequel Server but we have a SQL 2000 server. One of the
paths inthe database has an extra slash i.e (C:\Progame files\\websense)
Vertias Backup can not back it up if it has an extra slhash. How can I
removed the the extra slas. I am still able to access the data base.
THanks,
Mom
Where in the database? Are you refering to database properties where it
tells you the path of your .MDF, .NDF & .LDF files?
Somehow I doubt this has any effect on backup, but I've been wrong before.
"Jon Osborn" <josborn@.pcsii.com> wrote in message
news:uMiOKWjJIHA.5980@.TK2MSFTNGP04.phx.gbl...
>I am very new to Sequel Server but we have a SQL 2000 server. One of the
>paths inthe database has an extra slash i.e (C:\Progame files\\websense)
>Vertias Backup can not back it up if it has an extra slhash. How can I
>removed the the extra slas. I am still able to access the data base.
> THanks,
> Mom
>
|||In enterprise manager I right click on the WS631 Database and select
properties.
On the Dara Files tab it has
Filename as ws631 with a location of D:\Program
FIles\Websense\\wslogdb63_1.mdf
Transation log is the same with .ldf at the end
Vertias says the \\ after websense is the problem.
Thanks,
Jon
"Jay" <nospam@.nospam.org> wrote in message
news:%23R8EGWlJIHA.3516@.TK2MSFTNGP02.phx.gbl...
> Where in the database? Are you refering to database properties where it
> tells you the path of your .MDF, .NDF & .LDF files?
> Somehow I doubt this has any effect on backup, but I've been wrong before.
> "Jon Osborn" <josborn@.pcsii.com> wrote in message
> news:uMiOKWjJIHA.5980@.TK2MSFTNGP04.phx.gbl...
>
|||Is the data file in "D:\Program FIles\Websense\wslogdb63_1.mdf"?
If so, detach the db, or take the engine offline and change the path.
"Jon Osborn" <josborn@.pcsii.com> wrote in message
news:uTK2KE6JIHA.3672@.TK2MSFTNGP02.phx.gbl...
> In enterprise manager I right click on the WS631 Database and select
> properties.
> On the Dara Files tab it has
> Filename as ws631 with a location of D:\Program
> FIles\Websense\\wslogdb63_1.mdf
> Transation log is the same with .ldf at the end
> Vertias says the \\ after websense is the problem.
> Thanks,
> Jon
>
> "Jay" <nospam@.nospam.org> wrote in message
> news:%23R8EGWlJIHA.3516@.TK2MSFTNGP02.phx.gbl...
>

Database path contains an Extra Backslash.

I am very new to Sequel Server but we have a SQL 2000 server. One of the
paths inthe database has an extra slash i.e (C:\Progame files\\websense)
Vertias Backup can not back it up if it has an extra slhash. How can I
removed the the extra slas. I am still able to access the data base.
THanks,
MomWhere in the database? Are you refering to database properties where it
tells you the path of your .MDF, .NDF & .LDF files?
Somehow I doubt this has any effect on backup, but I've been wrong before.
"Jon Osborn" <josborn@.pcsii.com> wrote in message
news:uMiOKWjJIHA.5980@.TK2MSFTNGP04.phx.gbl...
>I am very new to Sequel Server but we have a SQL 2000 server. One of the
>paths inthe database has an extra slash i.e (C:\Progame files\\websense)
>Vertias Backup can not back it up if it has an extra slhash. How can I
>removed the the extra slas. I am still able to access the data base.
> THanks,
> Mom
>|||In enterprise manager I right click on the WS631 Database and select
properties.
On the Dara Files tab it has
Filename as ws631 with a location of D:\Program
FIles\Websense\\wslogdb63_1.mdf
Transation log is the same with .ldf at the end
Vertias says the \\ after websense is the problem.
Thanks,
Jon
"Jay" <nospam@.nospam.org> wrote in message
news:%23R8EGWlJIHA.3516@.TK2MSFTNGP02.phx.gbl...
> Where in the database? Are you refering to database properties where it
> tells you the path of your .MDF, .NDF & .LDF files?
> Somehow I doubt this has any effect on backup, but I've been wrong before.
> "Jon Osborn" <josborn@.pcsii.com> wrote in message
> news:uMiOKWjJIHA.5980@.TK2MSFTNGP04.phx.gbl...
>>I am very new to Sequel Server but we have a SQL 2000 server. One of the
>>paths inthe database has an extra slash i.e (C:\Progame files\\websense)
>>Vertias Backup can not back it up if it has an extra slhash. How can I
>>removed the the extra slas. I am still able to access the data base.
>> THanks,
>> Mom
>|||Is the data file in "D:\Program FIles\Websense\wslogdb63_1.mdf"?
If so, detach the db, or take the engine offline and change the path.
"Jon Osborn" <josborn@.pcsii.com> wrote in message
news:uTK2KE6JIHA.3672@.TK2MSFTNGP02.phx.gbl...
> In enterprise manager I right click on the WS631 Database and select
> properties.
> On the Dara Files tab it has
> Filename as ws631 with a location of D:\Program
> FIles\Websense\\wslogdb63_1.mdf
> Transation log is the same with .ldf at the end
> Vertias says the \\ after websense is the problem.
> Thanks,
> Jon
>
> "Jay" <nospam@.nospam.org> wrote in message
> news:%23R8EGWlJIHA.3516@.TK2MSFTNGP02.phx.gbl...
>> Where in the database? Are you refering to database properties where it
>> tells you the path of your .MDF, .NDF & .LDF files?
>> Somehow I doubt this has any effect on backup, but I've been wrong
>> before.
>> "Jon Osborn" <josborn@.pcsii.com> wrote in message
>> news:uMiOKWjJIHA.5980@.TK2MSFTNGP04.phx.gbl...
>>I am very new to Sequel Server but we have a SQL 2000 server. One of the
>>paths inthe database has an extra slash i.e (C:\Progame files\\websense)
>>Vertias Backup can not back it up if it has an extra slhash. How can I
>>removed the the extra slas. I am still able to access the data base.
>> THanks,
>> Mom
>>
>

DataBase path

How can I create a DataBase with smo in another path?

thanks,

Hi,

you can do that by specifying the new file path witin the datafile object:

DataFile df = new DataFile(new FileGroup("DBName","FileGroupName"),"Logicaldbname",@."C:\Somepathtostore\somefilename.mdf");

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

Hi Jens,

I want set the local path when create a DataBase. Thats possible?

My code for creating:

Dim wServer As New Server(sSqlServer)

Dim wBDados As New Database(wServer, "DataBase")

wBDados.DatabaseOptions.AutoShrink = True

wBDados.Create()

wBDados.Alter()

Thanks again,

Marsenne

|||

What do yu mean by "local" path ? The pah is always relative to the server you are creating the database on.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

local path is the path of database files.

I want create a DataBase and set the files path in another directory.

Sample:

Default path of Sql Server -> C:\SqlServer\DataBases

Path my new DataBase -> C:\SqlServer\DataBases\MyNewDataBase

|||Thats like I wrote you:

DataFile df = new DataFile(new FileGroup("DBName","FileGroupName"),"Logicaldbname",@."C:\SqlServer\DataBases\MyNewDataBase\somefilename.mdf");

If yu want to use a specific directory you have to specify the single filesnames frhe database

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||

I use Visual Basic 2005. The code is not work.

Please, send me complete code for creating database and define the files path.

thanks,

Marsenne

|||

I want modify the path Files of 'Primary' FilesGroup when DataBase is create.

The smo create a default 'primary' FilesGroup when DataBase.Create().

After database is create the path 'primary' FilesGroup' was not change.

Thats possible?

Dim srv as new Server ("SQL instance")

Dim db as new DataBase (srv,"DataBaseTest")

--> how code for modify the FilesGroup 'primary' and the files path?

db.create()

Thanks,

Marsenne

|||

This code below sucessfuly. Create a DataBase in another path (files)

- create a path first (D:\SqlBancos\Teste) with 'primaryroot' databases base.

Dim srv As New Server(Me.cmbSqlServer.Text)

Dim db As New Database(srv, "Teste")

db.DatabaseOptions.AutoShrink = True

db.FileGroups.Add(New FileGroup(db, "PRIMARY"))

db.FileGroups(0).Files.Add(New DataFile(db.FileGroups(0), "TestName", "D:\SqlBancos\Teste\Teste1.mdf"))

db.Create()

db.Alter()

Marsenne Negreiros