Saturday, February 25, 2012

Backup of SQL Server 2005 database to local P.C ?

Hi,
Could anyone please explain how I could backup a SQL Server database
on a server to my local P.C. ?
I am running Microsoft SQL Server 2005 Management Studio on my P.C.
I need to move the database to another server, but the current hosting
company are very inefficient (slow) at providing me with a database
backup file (.bak).
Is there any way that this can be done with T-SQL or C# or VB.Net
etc ?
I'd be grateful for any help.
DavidExport the database on your hosting company to your local machine using
SSMS.
--
Ekrem Önsoy
<Fresh_Air_Rider@.hotmail.com> wrote in message
news:885bc7de-4a19-42d9-821a-7ca513acea11@.s19g2000prg.googlegroups.com...
> Hi,
> Could anyone please explain how I could backup a SQL Server database
> on a server to my local P.C. ?
> I am running Microsoft SQL Server 2005 Management Studio on my P.C.
> I need to move the database to another server, but the current hosting
> company are very inefficient (slow) at providing me with a database
> backup file (.bak).
> Is there any way that this can be done with T-SQL or C# or VB.Net
> etc ?
> I'd be grateful for any help.
> David|||Hi Ekrem,
Thanks for your suggestion.
The problem with the Import / Export wizard is that it doesn't include
primary keys, identities, default column values and foreign keys etc. I tried
creating the tables on my P.C. using a script, which works fine, but then
when I import the data, it resets all of the identity values, which is why I
really need some way of saving the backup (.bak) files to my P.C.|||Sorry David, I don't know another way.
--
Ekrem Ã?nsoy
"David" <David@.discussions.microsoft.com> wrote in message
news:FC81D22C-8265-4BD5-8B9E-3EEA4F1A07DF@.microsoft.com...
> Hi Ekrem,
> Thanks for your suggestion.
> The problem with the Import / Export wizard is that it doesn't include
> primary keys, identities, default column values and foreign keys etc. I
> tried
> creating the tables on my P.C. using a script, which works fine, but then
> when I import the data, it resets all of the identity values, which is why
> I
> really need some way of saving the backup (.bak) files to my P.C.|||Hello,
You can use SQL Server Management Studio to create the backup qutie easily:
1) Select the database you want to backup
2) Right click the database to backup
3) Select Tasks and then Backup
Another option is to just query your database with the following syntax:
BACKUP DATABASE
You can find out more about BACKUP DATABASE via SQL Server Books Online
(from Microsoft). This feature is available in SQL Server 2000 or later.
Regards,
James Simpson
Straightway Technologies Inc.|||Hi James,
Many thanks indeed for taking the time to reply to my posting.
I think your suggestion will only allow the backup file to be stored
on the server and I was looking for a solution for storing the backup
file on my local P.C.
I tried simply copying the data from the destination machine to the
source machine but then hit the following bug in SQL Server 2005
http://rip747.wordpress.com/2007/10/01/sql-server-2005-import-export-reset-identity-keys-no-workaround-2005-sucks-period-the-end/|||Fresh_Air_Rider@.hotmail.com wrote:
> Hi James,
> Many thanks indeed for taking the time to reply to my posting.
> I think your suggestion will only allow the backup file to be stored
> on the server and I was looking for a solution for storing the backup
> file on my local P.C.
> I tried simply copying the data from the destination machine to the
> source machine but then hit the following bug in SQL Server 2005
> http://rip747.wordpress.com/2007/10/01/sql-server-2005-import-export-reset-identity-keys-no-workaround-2005-sucks-period-the-end/
>
If I understand your issue correctly, you want to create a backup of
your database and copy that backup to your local machine. If so, then
you need to have access to a file share on the server, or be able to
access FTP on the server, or - be able to share a folder on your system.
If you have access to a file share on the server, just backup to that
file share and then copy the backup file. The same if you have access
to FTP on that server (not sure here, but maybe since you said you are
using a hosting service).
Finally, if you can create a share on your machine that the SQL Server
can see you can then backup using UNC to your file share.
Since this is a hosting service, I do not think you have any other options.
HTH,
Jeff|||Not sure if this will help or not, but I found it useful.
http://www.associatedcontent.com/article/267055/how_to_setup_sql_server_2005_backups.html
On Dec 26, 3:12 pm, Jeffrey Williams <jeff.williams3...@.verizon.net>
wrote:
> Fresh_Air_Ri...@.hotmail.com wrote:
> > Hi James,
> > Many thanks indeed for taking the time to reply to my posting.
> > I think your suggestion will only allow the backup file to be stored
> > on the server and I was looking for a solution for storing the backup
> > file on my local P.C.
> > I tried simply copying the data from the destination machine to the
> > source machine but then hit the following bug in SQL Server 2005
> >http://rip747.wordpress.com/2007/10/01/sql-server-2005-import-export-...
> If I understand your issue correctly, you want to create a backup of
> your database and copy that backup to your local machine. If so, then
> you need to have access to a file share on the server, or be able to
> access FTP on the server, or - be able to share a folder on your system.
> If you have access to a file share on the server, just backup to that
> file share and then copy the backup file. The same if you have access
> to FTP on that server (not sure here, but maybe since you said you are
> using a hosting service).
> Finally, if you can create a share on your machine that the SQL Server
> can see you can then backup using UNC to your file share.
> Since this is a hosting service, I do not think you have any other options.
> HTH,
> Jeff|||Hi Jeff,
Many thanks indeed for taking the trouble to reply to my posting. I do
have FTP access, but unfortunately not to the directory where the SQL
Server backups are saved.
I like your suggestion of a creating a share on my machine that the
SQL Server can see you can then backup using UNC to my file share. I
might give that one a go.
I understand that SQL Server 2008 is due to be launched at the end
(27th) of Feb and hopefully Microsoft will have fixed all the bugs in
the Import / Export wizard, including the one that resets all the
identity column values.
Thanks again
David|||Fresh_Air_Rider@.hotmail.com wrote:
> Hi Jeff,
> Many thanks indeed for taking the trouble to reply to my posting. I do
> have FTP access, but unfortunately not to the directory where the SQL
> Server backups are saved.
> I like your suggestion of a creating a share on my machine that the
> SQL Server can see you can then backup using UNC to my file share. I
> might give that one a go.
> I understand that SQL Server 2008 is due to be launched at the end
> (27th) of Feb and hopefully Microsoft will have fixed all the bugs in
> the Import / Export wizard, including the one that resets all the
> identity column values.
> Thanks again
> David
>
>
If you have access to FTP - can you create a new backup to the same
folder on the server? I don't see why not - but really depends on how
the hosting company set this up. I would try that first since it does
not require changing anything.

No comments:

Post a Comment