Wednesday, March 28, 2012
Restore using... attcahe database.....
colleague restored the database using attach database in the enterprise
manager even though the database was not detached exclusively. We did not
see any data discrepancies. It now makes me feel all my differential and
transactional backups are redundant.
Is it correct to attach the database when it is not exclusively detached?
I am using SQL 2K.
Thanks,
Nelson
Sometimes it work, sometimes it doesn't. You can search the newsgroup archives for a *bunch* of
times where it evidently didn't work. I.e nothing to count on. Also, BOL clearly states this (need
to be detached to guarantee).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Nelson Smith" <NelSmith@.hotmail.com> wrote in message news:udXwZ7dQFHA.3404@.TK2MSFTNGP12.phx.gbl...
> When we wanted to restore SQL server (entire server was rebuild) my
> colleague restored the database using attach database in the enterprise
> manager even though the database was not detached exclusively. We did not
> see any data discrepancies. It now makes me feel all my differential and
> transactional backups are redundant.
> Is it correct to attach the database when it is not exclusively detached?
> I am using SQL 2K.
> Thanks,
> Nelson
>
>
Restore using... attcahe database.....
colleague restored the database using attach database in the enterprise
manager even though the database was not detached exclusively. We did not
see any data discrepancies. It now makes me feel all my differential and
transactional backups are redundant.
Is it correct to attach the database when it is not exclusively detached?
I am using SQL 2K.
Thanks,
NelsonSometimes it work, sometimes it doesn't. You can search the newsgroup archiv
es for a *bunch* of
times where it evidently didn't work. I.e nothing to count on. Also, BOL cle
arly states this (need
to be detached to guarantee).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Nelson Smith" <NelSmith@.hotmail.com> wrote in message news:udXwZ7dQFHA.3404@.TK2MSFTNGP12.ph
x.gbl...
> When we wanted to restore SQL server (entire server was rebuild) my
> colleague restored the database using attach database in the enterprise
> manager even though the database was not detached exclusively. We did not
> see any data discrepancies. It now makes me feel all my differential and
> transactional backups are redundant.
> Is it correct to attach the database when it is not exclusively detached?
> I am using SQL 2K.
> Thanks,
> Nelson
>
>sql
Restore using... attcahe database.....
colleague restored the database using attach database in the enterprise
manager even though the database was not detached exclusively. We did not
see any data discrepancies. It now makes me feel all my differential and
transactional backups are redundant.
Is it correct to attach the database when it is not exclusively detached?
I am using SQL 2K.
Thanks,
NelsonSometimes it work, sometimes it doesn't. You can search the newsgroup archives for a *bunch* of
times where it evidently didn't work. I.e nothing to count on. Also, BOL clearly states this (need
to be detached to guarantee).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Nelson Smith" <NelSmith@.hotmail.com> wrote in message news:udXwZ7dQFHA.3404@.TK2MSFTNGP12.phx.gbl...
> When we wanted to restore SQL server (entire server was rebuild) my
> colleague restored the database using attach database in the enterprise
> manager even though the database was not detached exclusively. We did not
> see any data discrepancies. It now makes me feel all my differential and
> transactional backups are redundant.
> Is it correct to attach the database when it is not exclusively detached?
> I am using SQL 2K.
> Thanks,
> Nelson
>
>
Monday, March 12, 2012
restore problem about sql server
to get the database back, and it works well on the server, which means
i can get the data using Query analyser, but when i use the web
application to access the database, it always come out with error
message, it seems that the connection to the database can not be
established, but it used to be ok before i reinstalled the sql server.
do i need to do any configuration after attaching the data files and
log files(.mdf and .ldf).
i think the source code(i mean the database connection code) for the
web application should be fine caze i didnt change it before after.
caze i didnt create instance of database and just use default, so the
connection string is defined below:
thisConnection = new SqlConnection(@."Data Source=pdsmfg014;Initial
Catalog=epcsii;User ID=epcs2;Password=******")
the server name is pdsmfg014
the database name is epcsii
oh, the code is designed using C#Dee (luye_qq@.hotmail.com) writes:
> i reinstall the sql server on the machine, and use attach file method
> to get the database back, and it works well on the server, which means
> i can get the data using Query analyser, but when i use the web
> application to access the database, it always come out with error
> message, it seems that the connection to the database can not be
> established, but it used to be ok before i reinstalled the sql server.
> do i need to do any configuration after attaching the data files and
> log files(.mdf and .ldf).
> i think the source code(i mean the database connection code) for the
> web application should be fine caze i didnt change it before after.
> caze i didnt create instance of database and just use default, so the
> connection string is defined below:
> thisConnection = new SqlConnection(@."Data Source=pdsmfg014;Initial
> Catalog=epcsii;User ID=epcs2;Password=******")
> the server name is pdsmfg014
> the database name is epcsii
So is this login epcs2 present on the reinstalled server? In such
case it could be that when you reinstalled the server the mapping
between logins and database users were lost. Run sp_helpuser in the
database and see if the output makes sense.
If not the procedure sp_changes_users_login can help you. Please check
Books Online for details.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||thx, erland,
I think the databse is working properly right now.
it must be some OS environment problems that prevent the application
accessing the database.
caze i migrate the application to my laptop and also install the SQL
server on my laptop to access the database, it works. it just means,
the laptop is my application server ,and the original server is just
the database server.
thus, there is sth wrong with my IIS setting probably, but I dont know
how to fig it out.
anyone can help?|||Hi,
You did not mention what kind of error you are getting.
If you are getting access denied error then make sure your Sql instance
authentication is eiter mixed mode or in SQl server authentication mode
and check the user has proper permission on that server, the easiest
way to check is open query analyzer from your laptop and give the same
server name(type id down), userid and password.
besides this make sure both database server and your laptop are in the
same domain and also you can try switching off the windows xp fire
wall.
bye
ssk
Dee wrote:
> thx, erland,
> I think the databse is working properly right now.
> it must be some OS environment problems that prevent the application
> accessing the database.
> caze i migrate the application to my laptop and also install the SQL
> server on my laptop to access the database, it works. it just means,
> the laptop is my application server ,and the original server is just
> the database server.
> thus, there is sth wrong with my IIS setting probably, but I dont know
> how to fig it out.
> anyone can help?|||Dee (luye_qq@.hotmail.com) writes:
> I think the databse is working properly right now.
> it must be some OS environment problems that prevent the application
> accessing the database.
> caze i migrate the application to my laptop and also install the SQL
> server on my laptop to access the database, it works. it just means,
> the laptop is my application server ,and the original server is just
> the database server.
> thus, there is sth wrong with my IIS setting probably, but I dont know
> how to fig it out.
> anyone can help?
As a start, please post the exact error message you are getting.
Did you perform the check with sp_helpuser, that I suggested?
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
Saturday, February 25, 2012
Restore msdb and master db from files.
My SQL Server crashed and I don't have any backup. So, I install new server, I attach user databases, everythink ok, but i need restore master and msdb databases from master.mdf , master.ldf and msdb.mdf and msdb.ldf. Is there any way to do it?
Thanks a lot
Systemspecialist,
Build your SQL Server directory structure *exactly* the same as it was
set up on the old server, and place the .mdf and .ldf files in the same
locations, then start SQL Server. It should just start up. Make sure you
have the same service pack applied on the new box as you did on the old,
before copying the data files over.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Systemspecialist wrote:
> Hi all,
> My SQL Server crashed and I don't have any backup. So, I install new server, I attach user databases, everythink ok, but i need restore master and msdb databases from master.mdf , master.ldf and msdb.mdf and msdb.ldf. Is there any way to do it?
> Thanks a lot
|||Hi,
I was about to say the same, but Systemspecialist has already installed,
applied service pack and attached the user databases.
The steps you supposed to do is:-
1. Copy all the MDF and LDF (Including system databases) to a safe directory
2. Install SQl server in same directory as old and apply the same service
pack as old
3. Stop SQL server and SQL Agent
4. Copy all the MDF and LDF files to the same folder
5. STart sql server.
This will start the sql server with the same setup as old.
Thanks
Hari
MCDBA
"Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
news:up6u5nJREHA.3300@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Systemspecialist,
> Build your SQL Server directory structure *exactly* the same as it was
> set up on the old server, and place the .mdf and .ldf files in the same
> locations, then start SQL Server. It should just start up. Make sure you
> have the same service pack applied on the new box as you did on the old,
> before copying the data files over.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Systemspecialist wrote:
server, I attach user databases, everythink ok, but i need restore master
and msdb databases from master.mdf , master.ldf and msdb.mdf and msdb.ldf.
Is there any way to do it?
>
|||Thanks Hari, you're saying the same thing as me, just better.
Hari wrote:
> Hi,
> I was about to say the same, but Systemspecialist has already installed,
> applied service pack and attached the user databases.
> The steps you supposed to do is:-
> 1. Copy all the MDF and LDF (Including system databases) to a safe directory
> 2. Install SQl server in same directory as old and apply the same service
> pack as old
> 3. Stop SQL server and SQL Agent
> 4. Copy all the MDF and LDF files to the same folder
> 5. STart sql server.
> This will start the sql server with the same setup as old.
> Thanks
> Hari
> MCDBA
>
Restore msdb and master db from files.
My SQL Server crashed and I don't have any backup. So, I install new server, I attach user databases, everythink ok, but i need restore master and msdb databases from master.mdf , master.ldf and msdb.mdf and msdb.ldf. Is there any way to do it
Thanks a lotSystemspecialist,
Build your SQL Server directory structure *exactly* the same as it was
set up on the old server, and place the .mdf and .ldf files in the same
locations, then start SQL Server. It should just start up. Make sure you
have the same service pack applied on the new box as you did on the old,
before copying the data files over.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Systemspecialist wrote:
> Hi all,
> My SQL Server crashed and I don't have any backup. So, I install new server, I attach user databases, everythink ok, but i need restore master and msdb databases from master.mdf , master.ldf and msdb.mdf and msdb.ldf. Is there any way to do it?
> Thanks a lot|||Hi,
I was about to say the same, but Systemspecialist has already installed,
applied service pack and attached the user databases.
The steps you supposed to do is:-
1. Copy all the MDF and LDF (Including system databases) to a safe directory
2. Install SQl server in same directory as old and apply the same service
pack as old
3. Stop SQL server and SQL Agent
4. Copy all the MDF and LDF files to the same folder
5. STart sql server.
This will start the sql server with the same setup as old.
Thanks
Hari
MCDBA
"Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
news:up6u5nJREHA.3300@.TK2MSFTNGP09.phx.gbl...
> Systemspecialist,
> Build your SQL Server directory structure *exactly* the same as it was
> set up on the old server, and place the .mdf and .ldf files in the same
> locations, then start SQL Server. It should just start up. Make sure you
> have the same service pack applied on the new box as you did on the old,
> before copying the data files over.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Systemspecialist wrote:
> > Hi all,
> > My SQL Server crashed and I don't have any backup. So, I install new
server, I attach user databases, everythink ok, but i need restore master
and msdb databases from master.mdf , master.ldf and msdb.mdf and msdb.ldf.
Is there any way to do it?
> >
> > Thanks a lot
>|||Thanks Hari, you're saying the same thing as me, just better.
Hari wrote:
> Hi,
> I was about to say the same, but Systemspecialist has already installed,
> applied service pack and attached the user databases.
> The steps you supposed to do is:-
> 1. Copy all the MDF and LDF (Including system databases) to a safe directory
> 2. Install SQl server in same directory as old and apply the same service
> pack as old
> 3. Stop SQL server and SQL Agent
> 4. Copy all the MDF and LDF files to the same folder
> 5. STart sql server.
> This will start the sql server with the same setup as old.
> Thanks
> Hari
> MCDBA
>
Restore msdb and master db from files.
My SQL Server crashed and I don't have any backup. So, I install new server,
I attach user databases, everythink ok, but i need restore master and msdb
databases from master.mdf , master.ldf and msdb.mdf and msdb.ldf. Is there a
ny way to do it?
Thanks a lotSystemspecialist,
Build your SQL Server directory structure *exactly* the same as it was
set up on the old server, and place the .mdf and .ldf files in the same
locations, then start SQL Server. It should just start up. Make sure you
have the same service pack applied on the new box as you did on the old,
before copying the data files over.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Systemspecialist wrote:
> Hi all,
> My SQL Server crashed and I don't have any backup. So, I install new serve
r, I attach user databases, everythink ok, but i need restore master and msd
b databases from master.mdf , master.ldf and msdb.mdf and msdb.ldf. Is there
any way to do it?
> Thanks a lot|||Hi,
I was about to say the same, but Systemspecialist has already installed,
applied service pack and attached the user databases.
The steps you supposed to do is:-
1. Copy all the MDF and LDF (Including system databases) to a safe directory
2. Install SQl server in same directory as old and apply the same service
pack as old
3. Stop SQL server and SQL Agent
4. Copy all the MDF and LDF files to the same folder
5. STart sql server.
This will start the sql server with the same setup as old.
Thanks
Hari
MCDBA
"Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
news:up6u5nJREHA.3300@.TK2MSFTNGP09.phx.gbl...
> Systemspecialist,
> Build your SQL Server directory structure *exactly* the same as it was
> set up on the old server, and place the .mdf and .ldf files in the same
> locations, then start SQL Server. It should just start up. Make sure you
> have the same service pack applied on the new box as you did on the old,
> before copying the data files over.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Systemspecialist wrote:
>
server, I attach user databases, everythink ok, but i need restore master
and msdb databases from master.mdf , master.ldf and msdb.mdf and msdb.ldf.
Is there any way to do it?[vbcol=seagreen]
>|||Thanks Hari, you're saying the same thing as me, just better.
Hari wrote:
> Hi,
> I was about to say the same, but Systemspecialist has already installed,
> applied service pack and attached the user databases.
> The steps you supposed to do is:-
> 1. Copy all the MDF and LDF (Including system databases) to a safe directo
ry
> 2. Install SQl server in same directory as old and apply the same service
> pack as old
> 3. Stop SQL server and SQL Agent
> 4. Copy all the MDF and LDF files to the same folder
> 5. STart sql server.
> This will start the sql server with the same setup as old.
> Thanks
> Hari
> MCDBA
>