Showing posts with label seperate. Show all posts
Showing posts with label seperate. Show all posts

Wednesday, March 21, 2012

Database Setup Tool

I was wondering if Microsoft SQL server has any tools that will will generate a setup.exe file to install the database on a seperate SQL server. I can see that you can script the entire database however it does not detect the dependencies in the correct order and hence I have to manually go through the script file and modify the creation order manually.

If we can generate a setup file

1) Network Admins who are installing the application and who have no idea of user SQL server can easily set up the database

2) I dont need to show the code for the sp, views etc as we can encrypt the code (I know it can be decrypted but that is ok)

I found tools from other vendors which we have to purchase to achive this.... Does MS Sql server have such a utility or is there any free utility that does this?

i guess u need to transfer database from one server to another. if this is the requirement , there are two methods

(a) Backup /restore

(b) detach/attach

You can automate it. If you have tried this pse let us know what is the difficulties u faced. Scripting database is not a complete solution.

pse refer BOL or post back if you are not clear with these terms

Madhu

|||

thanks Madhu.

But i only want to transfer the database structure ... not the data within it. If I do a backup / restore or detach / attach, it will take the data + transaction logs along with it. I can script the data + transaction logs to be cleared before doing the backup. But I dont want the data to be cleared in my environment as it has a lot of test data that has taken months to do. Alternatively i have to take another backup before clearing the data.

All this is going to be untidy. So that is why I was looking for a setup utility as I have seen other applications do this.

|||

if you asked the tool available ... then the answer may be Visio. Visio can easily handle these kind of scenario. As such there should not be any problem in Scripting from SQL Server also. Could you please tell us what is the problem u faced when u script the object using Management stuido and runing it in target server.

Redgate and all have tools for these kind of activities. But i strongly feel that SQL Server inbuilt features can easily handle this issue.

Also post back the result of Select @.@.version .

Madhu

Thursday, March 8, 2012

database restore issue

I cannot restore a differential database backup on top of a full back up for
some reason. I am installing it on a seperate server from a "device" , i
dont know what I ma doing wrong. Obviously I am new to sql server
administration. Any help will be appreciated.
best
Jay
Also, please post the exact error message...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"John" <anonymous@.discussions.microsoft.com> wrote in message news:22f7001c45e15$ba2d4670$a301280a@.phx.gbl...[vbcol=seagreen]
> Is there another backup between the full backup and
> differential backup?
>
> a full back up for
> a "device" , i
> sql server
|||No there isnt another backup between the Full and differential database
backup.
The exact error message is somehting of the effect that
"Microsoft SQL-DMO(ODBC SQL State:42000)
Cannot apply the backup on device 'D:\TestDB\x-D.bak' to database 'X'.
RESTORE DATABASE is terminating abnormally.
Its kinds frusterating because I dont know enough about the subject to be
able to troubleshoot this error convinceingly. I appreciate the help you
guys are offereing.
-Jay
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e5yevchXEHA.648@.TK2MSFTNGP10.phx.gbl...
> Also, please post the exact error message...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "John" <anonymous@.discussions.microsoft.com> wrote in message
news:22f7001c45e15$ba2d4670$a301280a@.phx.gbl...
>

database restore issue

I cannot restore a differential database backup on top of a full back up for
some reason. I am installing it on a seperate server from a "device" , i
dont know what I ma doing wrong. Obviously I am new to sql server
administration. Any help will be appreciated.
best
Jay
Also, please post the exact error message...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"John" <anonymous@.discussions.microsoft.com> wrote in message news:22f7001c45e15$ba2d4670$a301280a@.phx.gbl...[vbcol=seagreen]
> Is there another backup between the full backup and
> differential backup?
>
> a full back up for
> a "device" , i
> sql server
|||No there isnt another backup between the Full and differential database
backup.
The exact error message is somehting of the effect that
"Microsoft SQL-DMO(ODBC SQL State:42000)
Cannot apply the backup on device 'D:\TestDB\x-D.bak' to database 'X'.
RESTORE DATABASE is terminating abnormally.
Its kinds frusterating because I dont know enough about the subject to be
able to troubleshoot this error convinceingly. I appreciate the help you
guys are offereing.
-Jay
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e5yevchXEHA.648@.TK2MSFTNGP10.phx.gbl...
> Also, please post the exact error message...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "John" <anonymous@.discussions.microsoft.com> wrote in message
news:22f7001c45e15$ba2d4670$a301280a@.phx.gbl...
>
|||Hi,
You have to restore the full database backup with "norecovery" and then
restoring the
differential with "recovery" option. If you have not specified the
NORECOVERY option during your
FULL backup restore , the database will become open and you will not be able
to apply a subsequent backups (
Differential or transaction log) above that
RESTORE Database <dbname> from disk='fullbackup' with NORECOVERY
go
RESTORE Database <dbname> from disk='diff_backup' with RECOVERY
Thanks
Hari
MCDBA
"Jay Taylor" <help4u@.gmail.com> wrote in message
news:uZqceShXEHA.3640@.TK2MSFTNGP11.phx.gbl...
> I cannot restore a differential database backup on top of a full back up
for
> some reason. I am installing it on a seperate server from a "device" , i
> dont know what I ma doing wrong. Obviously I am new to sql server
> administration. Any help will be appreciated.
> best
> Jay
>
|||I'm sorry but I can't really be of more help. I would triple check that you indeed work against the
correct backup files (also use RESTORE HEADERONLY), and that you really really don't have a database
backup in between. Also, do a simple test case against pubs or so, and verify that the test case
work as you expect.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jay Taylor" <help4u@.gmail.com> wrote in message news:OpEpnyjXEHA.648@.TK2MSFTNGP10.phx.gbl...
> No there isnt another backup between the Full and differential database
> backup.
> The exact error message is somehting of the effect that
> "Microsoft SQL-DMO(ODBC SQL State:42000)
> Cannot apply the backup on device 'D:\TestDB\x-D.bak' to database 'X'.
> RESTORE DATABASE is terminating abnormally.
> Its kinds frusterating because I dont know enough about the subject to be
> able to troubleshoot this error convinceingly. I appreciate the help you
> guys are offereing.
> -Jay
>
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:e5yevchXEHA.648@.TK2MSFTNGP10.phx.gbl...
> news:22f7001c45e15$ba2d4670$a301280a@.phx.gbl...
>

database restore issue

I cannot restore a differential database backup on top of a full back up for
some reason. I am installing it on a seperate server from a "device" , i
dont know what I ma doing wrong. Obviously I am new to sql server
administration. Any help will be appreciated.
best
JayHi,
You have to restore the full database backup with "norecovery" and then
restoring the
differential with "recovery" option. If you have not specified the
NORECOVERY option during your
FULL backup restore , the database will become open and you will not be able
to apply a subsequent backups (
Differential or transaction log) above that
RESTORE Database <dbname> from disk='fullbackup' with NORECOVERY
go
RESTORE Database <dbname> from disk='diff_backup' with RECOVERY
Thanks
Hari
MCDBA
"Jay Taylor" <help4u@.gmail.com> wrote in message
news:uZqceShXEHA.3640@.TK2MSFTNGP11.phx.gbl...
> I cannot restore a differential database backup on top of a full back up
for
> some reason. I am installing it on a seperate server from a "device" , i
> dont know what I ma doing wrong. Obviously I am new to sql server
> administration. Any help will be appreciated.
> best
> Jay
>

database restore issue

I cannot restore a differential database backup on top of a full back up for
some reason. I am installing it on a seperate server from a "device" , i
dont know what I ma doing wrong. Obviously I am new to sql server
administration. Any help will be appreciated.
best
JayAlso, please post the exact error message...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"John" <anonymous@.discussions.microsoft.com> wrote in message news:22f7001c45e15$ba2d4670$a301280a@.phx.gbl...
> Is there another backup between the full backup and
> differential backup'
>
> >--Original Message--
> >I cannot restore a differential database backup on top of
> a full back up for
> >some reason. I am installing it on a seperate server from
> a "device" , i
> >dont know what I ma doing wrong. Obviously I am new to
> sql server
> >administration. Any help will be appreciated.
> >
> >best
> >Jay
> >
> >
> >.
> >|||No there isnt another backup between the Full and differential database
backup.
The exact error message is somehting of the effect that
"Microsoft SQL-DMO(ODBC SQL State:42000)
Cannot apply the backup on device 'D:\TestDB\x-D.bak' to database 'X'.
RESTORE DATABASE is terminating abnormally.
Its kinds frusterating because I dont know enough about the subject to be
able to troubleshoot this error convinceingly. I appreciate the help you
guys are offereing.
-Jay
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e5yevchXEHA.648@.TK2MSFTNGP10.phx.gbl...
> Also, please post the exact error message...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "John" <anonymous@.discussions.microsoft.com> wrote in message
news:22f7001c45e15$ba2d4670$a301280a@.phx.gbl...
> > Is there another backup between the full backup and
> > differential backup'
> >
> >
> >
> > >--Original Message--
> > >I cannot restore a differential database backup on top of
> > a full back up for
> > >some reason. I am installing it on a seperate server from
> > a "device" , i
> > >dont know what I ma doing wrong. Obviously I am new to
> > sql server
> > >administration. Any help will be appreciated.
> > >
> > >best
> > >Jay
> > >
> > >
> > >.
> > >
>|||Hi,
You have to restore the full database backup with "norecovery" and then
restoring the
differential with "recovery" option. If you have not specified the
NORECOVERY option during your
FULL backup restore , the database will become open and you will not be able
to apply a subsequent backups (
Differential or transaction log) above that
RESTORE Database <dbname> from disk='fullbackup' with NORECOVERY
go
RESTORE Database <dbname> from disk='diff_backup' with RECOVERY
Thanks
Hari
MCDBA
"Jay Taylor" <help4u@.gmail.com> wrote in message
news:uZqceShXEHA.3640@.TK2MSFTNGP11.phx.gbl...
> I cannot restore a differential database backup on top of a full back up
for
> some reason. I am installing it on a seperate server from a "device" , i
> dont know what I ma doing wrong. Obviously I am new to sql server
> administration. Any help will be appreciated.
> best
> Jay
>|||I'm sorry but I can't really be of more help. I would triple check that you indeed work against the
correct backup files (also use RESTORE HEADERONLY), and that you really really don't have a database
backup in between. Also, do a simple test case against pubs or so, and verify that the test case
work as you expect.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jay Taylor" <help4u@.gmail.com> wrote in message news:OpEpnyjXEHA.648@.TK2MSFTNGP10.phx.gbl...
> No there isnt another backup between the Full and differential database
> backup.
> The exact error message is somehting of the effect that
> "Microsoft SQL-DMO(ODBC SQL State:42000)
> Cannot apply the backup on device 'D:\TestDB\x-D.bak' to database 'X'.
> RESTORE DATABASE is terminating abnormally.
> Its kinds frusterating because I dont know enough about the subject to be
> able to troubleshoot this error convinceingly. I appreciate the help you
> guys are offereing.
> -Jay
>
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:e5yevchXEHA.648@.TK2MSFTNGP10.phx.gbl...
> > Also, please post the exact error message...
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> >
> >
> > "John" <anonymous@.discussions.microsoft.com> wrote in message
> news:22f7001c45e15$ba2d4670$a301280a@.phx.gbl...
> > > Is there another backup between the full backup and
> > > differential backup'
> > >
> > >
> > >
> > > >--Original Message--
> > > >I cannot restore a differential database backup on top of
> > > a full back up for
> > > >some reason. I am installing it on a seperate server from
> > > a "device" , i
> > > >dont know what I ma doing wrong. Obviously I am new to
> > > sql server
> > > >administration. Any help will be appreciated.
> > > >
> > > >best
> > > >Jay
> > > >
> > > >
> > > >.
> > > >
> >
> >
>

Wednesday, March 7, 2012

Database restore after system Rebuild

Hi,
I have one SQL server where my databases where kept on the D drive, and
the transaction logs where on a physically seperate C drive. The D
drive became corrupted and I could not start SQL Server because the
master database was corrupt. So, I had to use the RebuildDM.exe to
rebuild the system tables. I have the log files sitting on the C
drive, but I never had a chance to back them up to the most recent
point today because I could not get into SQL Server until I rebuild it.
Now what I would like to do is just restore the databases and then use
the logs that are sitting on C, but the only way it seems that I can do
this is by backing up the transaction logs first, which I did not have
a chance to do. Is there anyway I can take a backup of my DB and tell
it to use the transaction logs that already exists so that it can apply
any missing transactions?
I forgot to mention, this box is windows server 2003 with sql server
2000 SP4
|||Doh, after hours of searching I found the answer right after posting
this. For anyone who has this problem, look here
http://support.microsoft.com/default...;EN-US;Q253817

Database restore after system Rebuild

Hi,
I have one SQL server where my databases where kept on the D drive, and
the transaction logs where on a physically seperate C drive. The D
drive became corrupted and I could not start SQL Server because the
master database was corrupt. So, I had to use the RebuildDM.exe to
rebuild the system tables. I have the log files sitting on the C
drive, but I never had a chance to back them up to the most recent
point today because I could not get into SQL Server until I rebuild it.
Now what I would like to do is just restore the databases and then use
the logs that are sitting on C, but the only way it seems that I can do
this is by backing up the transaction logs first, which I did not have
a chance to do. Is there anyway I can take a backup of my DB and tell
it to use the transaction logs that already exists so that it can apply
any missing transactions?I forgot to mention, this box is windows server 2003 with sql server
2000 SP4|||Doh, after hours of searching I found the answer right after posting
this. For anyone who has this problem, look here
http://support.microsoft.com/defaul...b;EN-US;Q253817

Database restore after system Rebuild

Hi,
I have one SQL server where my databases where kept on the D drive, and
the transaction logs where on a physically seperate C drive. The D
drive became corrupted and I could not start SQL Server because the
master database was corrupt. So, I had to use the RebuildDM.exe to
rebuild the system tables. I have the log files sitting on the C
drive, but I never had a chance to back them up to the most recent
point today because I could not get into SQL Server until I rebuild it.
Now what I would like to do is just restore the databases and then use
the logs that are sitting on C, but the only way it seems that I can do
this is by backing up the transaction logs first, which I did not have
a chance to do. Is there anyway I can take a backup of my DB and tell
it to use the transaction logs that already exists so that it can apply
any missing transactions?I forgot to mention, this box is windows server 2003 with sql server
2000 SP4|||Doh, after hours of searching I found the answer right after posting
this. For anyone who has this problem, look here
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q253817

Saturday, February 25, 2012

Database Replication

Hi everybody

Can I replicate a database onto a seperate instance of SQL? I need to
replicate a database to a stand-alone machine with no connectivety to
anything. Does anyone know where I can find info on this?

Thanks for any help.

--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forum...eneral/200509/1Perhaps in Books Online, under "Replication"? :-) And I guess you
don't really mean "no connectivity to anything", otherwise it would be
somewhat difficult to implement. Depending on what your goal is
(availability, disaster recovery, offline reporting etc.) you could
also look at log shipping, clustering, and of course backup/restore.

Replication is quite a specialized area, so if you have specific
questions about it, you'll probably get a better response in
microsoft.public.sqlserver.replication.

Simon|||Thanks Simon. I did check the Books Online ;-). All I need is our online
database on another stand-alone computer
that is not connected to any network (due to stupid security). I need this
for a whole bunch of testing on one of our apps. I think that the
backup/restore option would be better?

--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forum...eneral/200509/1|||If you have no network connection, you'll need to copy the database to
a physical medium (DVD, tape, USB drive) anyway, so backup/restore
would be the only real option (you could detach/attach, but that would
mean taking the source offline).

Also see this article:

http://support.microsoft.com/defaul...kb;en-us;314546

Simon