Friday, March 30, 2012
Restore DB to sql 2k
system (English version) to a SQL 2000 on an XP system
(Spanish version) I get the following message on a stored
procedure:
Server: Msg 446, Level 16, State 9, Procedure
sp_RptPartida, Line 33
Cannot resolve collation conflict for equal to operation.
I did not get such message in the old system. Is there a
way to avoid it. I need to be able to maintain the db on
my client (they have sql 7.0) and I wish to do the
development on sql 2000.There is a conflict in collations between your Charcter table attributes
that you are comparing
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_da-db_7ory.asp
http://tinyurl.com/3dr2j
--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Mauricio" <macs01@.telesal.net> wrote in message
news:036f01c3cb24$72727230$a001280a@.phx.gbl...
> After restoring a db from SQL 7.0 running on a Win98
> system (English version) to a SQL 2000 on an XP system
> (Spanish version) I get the following message on a stored
> procedure:
> Server: Msg 446, Level 16, State 9, Procedure
> sp_RptPartida, Line 33
> Cannot resolve collation conflict for equal to operation.
> I did not get such message in the old system. Is there a
> way to avoid it. I need to be able to maintain the db on
> my client (they have sql 7.0) and I wish to do the
> development on sql 2000.
Restore DB table - SQL Server 2000
I made a release on system at 12pm 22/02 and overwrote a table by
mistake.
I have a back from from the night before (12 at night) but from the
time I did a backup and and the time I did the release some records
would be lost.
I want to recover the data lost.
Can I examine the transaction logs to get back the data?
Is there a tool in SQL server to do this or is there a free one?
TIA,
Darren
This was replied to in another group. Please don't multipost.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
<darren.daniel@.iclployalty.com> wrote in message
news:1141131966.097622.3760@.p10g2000cwp.googlegrou ps.com...
> Hi,
> I made a release on system at 12pm 22/02 and overwrote a table by
> mistake.
>
> I have a back from from the night before (12 at night) but from the
> time I did a backup and and the time I did the release some records
> would be lost.
> I want to recover the data lost.
> Can I examine the transaction logs to get back the data?
> Is there a tool in SQL server to do this or is there a free one?
> TIA,
> Darren
>
Wednesday, March 28, 2012
Restore DB - SQL Server 2000
I made a release on system at 12pm 22/02 and overwrote a table by
mistake.
I have a back from from the night before (12 at night) but from the
time I did a backup and and the time I did the release some records
would be lost.
I want to recover the data lost.
Can I examine the transaction logs to get back the data?
What would I need to do?
TIA,
Darren
So ,have you done BACKUP LOG file?
If yop do , just apply all log'd backups WITH NORECOVERY option except the
last one
Visit at Tibor's web site to find a greate example ,how to restore a
database at point of time
<darren.daniel@.iclployalty.com> wrote in message
news:1141131856.938247.59340@.z34g2000cwc.googlegro ups.com...
> Hi,
> I made a release on system at 12pm 22/02 and overwrote a table by
> mistake.
>
> I have a back from from the night before (12 at night) but from the
> time I did a backup and and the time I did the release some records
> would be lost.
> I want to recover the data lost.
> Can I examine the transaction logs to get back the data?
> What would I need to do?
> TIA,
> Darren
>
Restore DB - SQL Server 2000
I made a release on system at 12pm 22/02 and overwrote a table by
mistake.
I have a back from from the night before (12 at night) but from the
time I did a backup and and the time I did the release some records
would be lost.
I want to recover the data lost.
Can I examine the transaction logs to get back the data?
What would I need to do?
TIA,
DarrenSo ,have you done BACKUP LOG file?
If yop do , just apply all log'd backups WITH NORECOVERY option except the
last one
Visit at Tibor's web site to find a greate example ,how to restore a
database at point of time
<darren.daniel@.iclployalty.com> wrote in message
news:1141131856.938247.59340@.z34g2000cwc.googlegroups.com...
> Hi,
> I made a release on system at 12pm 22/02 and overwrote a table by
> mistake.
>
> I have a back from from the night before (12 at night) but from the
> time I did a backup and and the time I did the release some records
> would be lost.
> I want to recover the data lost.
> Can I examine the transaction logs to get back the data?
> What would I need to do?
> TIA,
> Darren
>
Restore DB - SQL Server 2000
I made a release on system at 12pm 22/02 and overwrote a table by
mistake.
I have a back from from the night before (12 at night) but from the
time I did a backup and and the time I did the release some records
would be lost.
I want to recover the data lost.
Can I examine the transaction logs to get back the data?
What would I need to do?
TIA,
DarrenSo ,have you done BACKUP LOG file?
If yop do , just apply all log'd backups WITH NORECOVERY option except the
last one
Visit at Tibor's web site to find a greate example ,how to restore a
database at point of time
<darren.daniel@.iclployalty.com> wrote in message
news:1141131856.938247.59340@.z34g2000cwc.googlegroups.com...
> Hi,
> I made a release on system at 12pm 22/02 and overwrote a table by
> mistake.
>
> I have a back from from the night before (12 at night) but from the
> time I did a backup and and the time I did the release some records
> would be lost.
> I want to recover the data lost.
> Can I examine the transaction logs to get back the data?
> What would I need to do?
> TIA,
> Darren
>
Monday, March 26, 2012
restore database without mdf or ldf file
Is it possible to restore a database with only a .bak file??
When I try to restore the system comes up with 2 paths where probably the original .mdf and .ldf files existed, but on my system they don't exist. How can I avoid this problem? (it's not possible to get the ldf and mdf files anymore...)
Grtz
Carloscreate a new database like so...
CREATE DATABASE MyDATABASE
use sp_helpdb to get the filenames for the mdf and the ldf you just created
sp_helpdb MYDATABASE
use RESTORE FILELISTONLY to get the logical filenames of the mdf and ldf in the backup file like
RESTORE FILELISTONLY
FROM DISK = 'C:\Mybackup.bak'
Use RESTORE with MOVE like so
RESTORE DATABASE MyDatabase
FROM DISK = 'C:\Mybackup.bak'
WITH REPLACE,RECOVERY,
MOVE 'Logicalfile_Data' TO 'D:\Microsoft SQL Server\MSSQL\data\physicalfile.mdf' , MOVE 'Logicalfile_Log' TO 'D:\Microsoft SQL Server\MSSQL\data\physicalfile_log.LDF'|||Its quite possible to restore the db even if the underlying db is not preset. U need to provide the correct path where u want the mdf and ldf files to be created.|||Thnx for the quick reply!
Restore Database With Move
ServerA
Data on: C:\Data
Log on: C:\Logs
ServerB
System Databases on: D:\SysData
Data on: E:\Data
Indexes on : D:\Indexes
Log on: F:\Logs
So, what I want to do is restore a database from ServerA to ServerB. Placing the
files and data in the correct locations. I want the data in a filegroup called
DatabaseName_Data. Problem is when I restore to ServerB, the data always goes to
PRIMARY filegroup during restore. The only thing I can find is to manually
change the location of the data for each table in Enterprise Manager (YUCK!)
Isn't there an easier way?
Thanks for the help
DarrellYou cannot change file or filegroup layout using backup/restore (which basically gives you an image
of your database). Either use EM to move or do it from QA using more or less clever/complicated TSQL
scripts. You change location of a table by (re)creating a clustered index. For an index, you rebuild
the index.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Darrell" <Darrell.Wright.nospam@.okc.gov> wrote in message
news:ehhWgpTvFHA.3740@.TK2MSFTNGP14.phx.gbl...
> OK. I have a good one. I have the following setup:
> ServerA
> Data on: C:\Data
> Log on: C:\Logs
> ServerB
> System Databases on: D:\SysData
> Data on: E:\Data
> Indexes on : D:\Indexes
> Log on: F:\Logs
> So, what I want to do is restore a database from ServerA to ServerB. Placing the files and data in
> the correct locations. I want the data in a filegroup called DatabaseName_Data. Problem is when I
> restore to ServerB, the data always goes to PRIMARY filegroup during restore. The only thing I can
> find is to manually change the location of the data for each table in Enterprise Manager (YUCK!)
> Isn't there an easier way?
> Thanks for the help
> Darrell|||Refer to "How to restore files to a new location (Transact-SQL)" in BOL...
"Darrell" <Darrell.Wright.nospam@.okc.gov> wrote in message
news:ehhWgpTvFHA.3740@.TK2MSFTNGP14.phx.gbl...
> OK. I have a good one. I have the following setup:
> ServerA
> Data on: C:\Data
> Log on: C:\Logs
> ServerB
> System Databases on: D:\SysData
> Data on: E:\Data
> Indexes on : D:\Indexes
> Log on: F:\Logs
> So, what I want to do is restore a database from ServerA to ServerB.
> Placing the files and data in the correct locations. I want the data in a
> filegroup called DatabaseName_Data. Problem is when I restore to ServerB,
> the data always goes to PRIMARY filegroup during restore. The only thing I
> can find is to manually change the location of the data for each table in
> Enterprise Manager (YUCK!)
> Isn't there an easier way?
> Thanks for the help
> Darrell
Wednesday, March 21, 2012
Restore database error
"MODIFY FILE encountered operating system error 112(There is not enough spac
e
on the disk.) while attempting to expand the physical file. Could not adjust
the space allocation for file 'MyFile_Log'. RESTORE database is terminating
abnormally."
What do I need to do to solve this issue?
Thanks,
Ninel
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200512/1Hi
You don't have enough disk space for the DB. Full stop.
Don't forget, the size of the backup does not indicate the size of the DB.
Look at RESTORE FILELISTONLY and RESTORE HEADERONLY to get the information
as to how much space you need on disk.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"ninel g via webservertalk.com" <u9125@.uwe> wrote in message
news:5895a870b9427@.uwe...
> I'm trying to restore a database and am getting the following error:
> "MODIFY FILE encountered operating system error 112(There is not enough
> space
> on the disk.) while attempting to expand the physical file. Could not
> adjust
> the space allocation for file 'MyFile_Log'. RESTORE database is
> terminating
> abnormally."
> What do I need to do to solve this issue?
> Thanks,
> Ninel
> --
> Message posted via webservertalk.com
> http://www.webservertalk.com/Uwe/Forum...amming/200512/1sql
Friday, March 9, 2012
Restore All System Databases
Hi All,
I need to do a restore of all my system databases, master, msdb and model, and of course my production database.
The Windows 2003 OS and Sql Server 2005 have both been reinstalled on the server.
I understand I need to be in Single User Mode to restore the master database and I just wanted to clarify the procedure for a successful restore.
I've found this page: http://msdn2.microsoft.com/en-us/library/ms190679.aspx which has instructions for restoring a master database.
So, all I have to do is:
1. Be in single user mode
2. Using SQLCMD run:
C:\> sqlcmd
1> RESTORE DATABASE master FROM DISK = 'Z:\MyBackLocation\master.bak';
2> GO
From the instructions:
"After master is restored, the instance of SQL Server shuts down and terminates the sqlcmd process"
My Questions:
When I've restored the master do I repeat the steps above to restore the msdb and model databases?
Are there any other pitfalls?
Thanks for any advice
Melt
Restore all data (system must not exit during restore) using SQL DMO
Need help ASAP!!
Thanks!!!Is the database you're attempting to restore your default database on the server? If so, change it. You can't restore a database if any connections exist to that database.|||I'll explain to you what exactly needs to be done then you maybe can help me better.
I need to do a full backup and restore of the database. The user with the correct login details will have the ability to perform the backup and restore.
And it is right there where the problem comes in. A user is logged into the system so a connection to the database exist.The "master" database in SQL Server is the default db.
Another option that I am considering is to remove the requirement that a user must be logged in to do a backup. Let me explain how this will be possible. The application is written to function in a server enviroment and I am writen a standalone app to be installed on the server to perform certain tasks of which one is the backup/restore functionality. Seeing that only one or two people will have access to the server, user controll is already managed.
If I do this, it means that no current connections exist on my database and the backup can be performed!
Now you know the exact problem and the two options I have got. I'm not keen on the second option of removing the login, but will do so if I have no other choice.
Any suggestions?
MS|||If the default database of the user is "master" then you shouldn't have this problem. I'd take a look at the server when this user is connected to see what other connections exist. You can be connected to the server and restore a database other than the one you're connected to.|||
I
|||I am taking back up of database ABC (ABC.bak )from Server A. My application need is such that i should be able to restore ABC.bak on server A as well as Server B. My ASP Application is connected to server A. so while restoring back up, db already exists ,I am overwriting the current but different application users are connected to server A. therefore restore fails. What could be the possible solution for this situation?Restore all data (system must not exit during restore) using SQL DMO
Need help ASAP!!
Thanks!!!Is the database you're attempting to restore your default database on the server? If so, change it. You can't restore a database if any connections exist to that database.|||I'll explain to you what exactly needs to be done then you maybe can help me better.
I need to do a full backup and restore of the database. The user with the correct login details will have the ability to perform the backup and restore.
And it is right there where the problem comes in. A user is logged into the system so a connection to the database exist.The "master" database in SQL Server is the default db.
Another option that I am considering is to remove the requirement that a user must be logged in to do a backup. Let me explain how this will be possible. The application is written to function in a server enviroment and I am writen a standalone app to be installed on the server to perform certain tasks of which one is the backup/restore functionality. Seeing that only one or two people will have access to the server, user controll is already managed.
If I do this, it means that no current connections exist on my database and the backup can be performed!
Now you know the exact problem and the two options I have got. I'm not keen on the second option of removing the login, but will do so if I have no other choice.
Any suggestions?
MS|||If the default database of the user is "master" then you shouldn't have this problem. I'd take a look at the server when this user is connected to see what other connections exist. You can be connected to the server and restore a database other than the one you're connected to.|||
I
|||I am taking back up of database ABC (ABC.bak )from Server A. My application need is such that i should be able to restore ABC.bak on server A as well as Server B. My ASP Application is connected to server A. so while restoring back up, db already exists ,I am overwriting the current but different application users are connected to server A. therefore restore fails. What could be the possible solution for this situation?