Showing posts with label commands. Show all posts
Showing posts with label commands. Show all posts

Wednesday, March 21, 2012

Database setup script

I have MSDE installed on my machine as was wondering what the NETSDK is in the following commands.

@.rem Uncomment the following line for MSDE
@.rem set DBNAME=(local)\NETSDK
set DBNAME=(local)\NETSDK

Thanks,
Bob HIt would appear that NETSDK is the "instance name" of the MSDE installation.

With SQL Server 2000 (and MSDE), multiple instances of SQL Server can be installed. The first uses the "default instance"; that is, to access it, simply reference the name of the server in a connection string. To reference a non-default instance, follow the server with \<instance name>sql

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?

Saturday, February 25, 2012

Database removable

Hello,is possible attach and use the mdf exists in a pen drive or an usb
hard disk ?
What commands are involved in this operation ?
Thanks in advance.
I have a lot of DB allocated on my USB (or Firewire) external disk; even a
pen drive is managed by the OS as an external, removable disk.
The only attention you hav to pay is to remember detach you removable
database when you suppose the next startup of your PC will be without the
external disks containing your databases.
When you need to use such databases you'll attach it again
Gilberto
"Luis Tarzia" wrote:

> Hello,is possible attach and use the mdf exists in a pen drive or an usb
> hard disk ?
> What commands are involved in this operation ?
> Thanks in advance.
>
>
|||I attach the mdf with the sp_attachd but when i execute any sql command the
sql mark an error of access a memory and exit.
"Gilberto Zampatti" <GilbertoZampatti@.discussions.microsoft.com> escribi en
el mensaje news:5BF5A51B-83A5-4A23-B540-B104BBCDD7AC@.microsoft.com...
> I have a lot of DB allocated on my USB (or Firewire) external disk; even
a[vbcol=seagreen]
> pen drive is managed by the OS as an external, removable disk.
> The only attention you hav to pay is to remember detach you removable
> database when you suppose the next startup of your PC will be without the
> external disks containing your databases.
> When you need to use such databases you'll attach it again
> Gilberto
> "Luis Tarzia" wrote:

Database removable

Hello,is possible attach and use the mdf exists in a pen drive or an usb
hard disk ?
What commands are involved in this operation '
Thanks in advance.I have a lot of DB allocated on my USB (or Firewire) external disk; even a
pen drive is managed by the OS as an external, removable disk.
The only attention you hav to pay is to remember detach you removable
database when you suppose the next startup of your PC will be without the
external disks containing your databases.
When you need to use such databases you'll attach it again
Gilberto
"Luis Tarzia" wrote:

> Hello,is possible attach and use the mdf exists in a pen drive or an usb
> hard disk ?
> What commands are involved in this operation '
> Thanks in advance.
>
>|||I attach the mdf with the sp_attachd but when i execute any sql command the
sql mark an error of access a memory and exit.
"Gilberto Zampatti" <GilbertoZampatti@.discussions.microsoft.com> escribi en
el mensaje news:5BF5A51B-83A5-4A23-B540-B104BBCDD7AC@.microsoft.com...
> I have a lot of DB allocated on my USB (or Firewire) external disk; even
a[vbcol=seagreen]
> pen drive is managed by the OS as an external, removable disk.
> The only attention you hav to pay is to remember detach you removable
> database when you suppose the next startup of your PC will be without the
> external disks containing your databases.
> When you need to use such databases you'll attach it again
> Gilberto
> "Luis Tarzia" wrote:
>

Database removable

Hello,is possible attach and use the mdf exists in a pen drive or an usb
hard disk ?
What commands are involved in this operation '
Thanks in advance.I have a lot of DB allocated on my USB (or Firewire) external disk; even a
pen drive is managed by the OS as an external, removable disk.
The only attention you hav to pay is to remember detach you removable
database when you suppose the next startup of your PC will be without the
external disks containing your databases.
When you need to use such databases you'll attach it again
Gilberto
"Luis Tarzia" wrote:
> Hello,is possible attach and use the mdf exists in a pen drive or an usb
> hard disk ?
> What commands are involved in this operation '
> Thanks in advance.
>
>|||I attach the mdf with the sp_attachd but when i execute any sql command the
sql mark an error of access a memory and exit.
"Gilberto Zampatti" <GilbertoZampatti@.discussions.microsoft.com> escribió en
el mensaje news:5BF5A51B-83A5-4A23-B540-B104BBCDD7AC@.microsoft.com...
> I have a lot of DB allocated on my USB (or Firewire) external disk; even
a
> pen drive is managed by the OS as an external, removable disk.
> The only attention you hav to pay is to remember detach you removable
> database when you suppose the next startup of your PC will be without the
> external disks containing your databases.
> When you need to use such databases you'll attach it again
> Gilberto
> "Luis Tarzia" wrote:
> > Hello,is possible attach and use the mdf exists in a pen drive or an usb
> > hard disk ?
> > What commands are involved in this operation '
> > Thanks in advance.
> >
> >
> >