Wednesday, March 28, 2012
Recovery Model Full
operating system. I am trying to set sp_dboption database_name, 'trunc. log
on chkpt.','TRUE' with the recovery model set to full.
When I set the database recovery model to full and then execute sp_dboption
acn_sideB, 'trunc. log on chkpt.','TRUE' SQL Server changes the recovery
model back to simple.
Please help me resolve this issue with recovery model and 'trunc. log on
chkpt.','TRUE'.
Thank You,The recovery model concept *replaces* the two old database options "trunc."
and "select into".
Setting trunc to TRUE is the very same thing as setting recovery model to si
mple.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Joe K." <Joe K.@.discussions.microsoft.com> wrote in message
news:1875F20C-FD1E-4691-9240-7DCF7BD93F16@.microsoft.com...
> I have a SQL Server 2000 databases that has Windows 2000 Advanced Server a
s
> operating system. I am trying to set sp_dboption database_name, 'trunc. l
og
> on chkpt.','TRUE' with the recovery model set to full.
> When I set the database recovery model to full and then execute sp_dboptio
n
> acn_sideB, 'trunc. log on chkpt.','TRUE' SQL Server changes the recovery
> model back to simple.
> Please help me resolve this issue with recovery model and 'trunc. log on
> chkpt.','TRUE'.
> Thank You,|||That's really there for backwards compatibility. Use ALTER DATABASE.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"Joe K." <Joe K.@.discussions.microsoft.com> wrote in message
news:1875F20C-FD1E-4691-9240-7DCF7BD93F16@.microsoft.com...
I have a SQL Server 2000 databases that has Windows 2000 Advanced Server as
operating system. I am trying to set sp_dboption database_name, 'trunc. log
on chkpt.','TRUE' with the recovery model set to full.
When I set the database recovery model to full and then execute sp_dboption
acn_sideB, 'trunc. log on chkpt.','TRUE' SQL Server changes the recovery
model back to simple.
Please help me resolve this issue with recovery model and 'trunc. log on
chkpt.','TRUE'.
Thank You,|||Joe,
SQL Server doesnt allow you truncate the log on checkpoint when the
recovery model is FULL. ie...either a database can be in Simple Recovery
Model (truncate log on checkpoint) or Full Reovery Model but not both.
Jayesh
"Joe K." <Joe K.@.discussions.microsoft.com> wrote in message
news:1875F20C-FD1E-4691-9240-7DCF7BD93F16@.microsoft.com...
> I have a SQL Server 2000 databases that has Windows 2000 Advanced Server
> as
> operating system. I am trying to set sp_dboption database_name, 'trunc.
> log
> on chkpt.','TRUE' with the recovery model set to full.
> When I set the database recovery model to full and then execute
> sp_dboption
> acn_sideB, 'trunc. log on chkpt.','TRUE' SQL Server changes the recovery
> model back to simple.
> Please help me resolve this issue with recovery model and 'trunc. log on
> chkpt.','TRUE'.
> Thank You,
Recovery Model Full
operating system. I am trying to set sp_dboption database_name, 'trunc. log
on chkpt.','TRUE' with the recovery model set to full.
When I set the database recovery model to full and then execute sp_dboption
acn_sideB, 'trunc. log on chkpt.','TRUE' SQL Server changes the recovery
model back to simple.
Please help me resolve this issue with recovery model and 'trunc. log on
chkpt.','TRUE'.
Thank You,The recovery model concept *replaces* the two old database options "trunc." and "select into".
Setting trunc to TRUE is the very same thing as setting recovery model to simple.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Joe K." <Joe K.@.discussions.microsoft.com> wrote in message
news:1875F20C-FD1E-4691-9240-7DCF7BD93F16@.microsoft.com...
> I have a SQL Server 2000 databases that has Windows 2000 Advanced Server as
> operating system. I am trying to set sp_dboption database_name, 'trunc. log
> on chkpt.','TRUE' with the recovery model set to full.
> When I set the database recovery model to full and then execute sp_dboption
> acn_sideB, 'trunc. log on chkpt.','TRUE' SQL Server changes the recovery
> model back to simple.
> Please help me resolve this issue with recovery model and 'trunc. log on
> chkpt.','TRUE'.
> Thank You,|||That's really there for backwards compatibility. Use ALTER DATABASE.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"Joe K." <Joe K.@.discussions.microsoft.com> wrote in message
news:1875F20C-FD1E-4691-9240-7DCF7BD93F16@.microsoft.com...
I have a SQL Server 2000 databases that has Windows 2000 Advanced Server as
operating system. I am trying to set sp_dboption database_name, 'trunc. log
on chkpt.','TRUE' with the recovery model set to full.
When I set the database recovery model to full and then execute sp_dboption
acn_sideB, 'trunc. log on chkpt.','TRUE' SQL Server changes the recovery
model back to simple.
Please help me resolve this issue with recovery model and 'trunc. log on
chkpt.','TRUE'.
Thank You,|||Joe,
SQL Server doesnt allow you truncate the log on checkpoint when the
recovery model is FULL. ie...either a database can be in Simple Recovery
Model (truncate log on checkpoint) or Full Reovery Model but not both.
Jayesh
"Joe K." <Joe K.@.discussions.microsoft.com> wrote in message
news:1875F20C-FD1E-4691-9240-7DCF7BD93F16@.microsoft.com...
> I have a SQL Server 2000 databases that has Windows 2000 Advanced Server
> as
> operating system. I am trying to set sp_dboption database_name, 'trunc.
> log
> on chkpt.','TRUE' with the recovery model set to full.
> When I set the database recovery model to full and then execute
> sp_dboption
> acn_sideB, 'trunc. log on chkpt.','TRUE' SQL Server changes the recovery
> model back to simple.
> Please help me resolve this issue with recovery model and 'trunc. log on
> chkpt.','TRUE'.
> Thank You,
Monday, March 26, 2012
Recovery from crash
I had a hard-drive failure this week and lost my root drive, with
operating system and SQL Server 2000.
Fortunately my data was on another volume and still exists.
I know about sp_attach_db, but looking at BOL, it says that sp_attach_db
only works with databases that were previously detached with
sp_detach_db.
How do I reattach my existing mdf and ldf files?
-- Rick
P.S. I know that the dbs are not corrupt because when the hard drive
failed SQL Server was offline.Guinness Mann (GMann@.dublin.com) writes:
> I had a hard-drive failure this week and lost my root drive, with
> operating system and SQL Server 2000.
> Fortunately my data was on another volume and still exists.
> I know about sp_attach_db, but looking at BOL, it says that sp_attach_db
> only works with databases that were previously detached with
> sp_detach_db.
> How do I reattach my existing mdf and ldf files?
> P.S. I know that the dbs are not corrupt because when the hard drive
> failed SQL Server was offline.
I would first try with sp_attach_db. If SQL Server was shut down cleanly,
I would expect the database files to be available.
If that fails, I would try sp_attach_single_file_db.
If that fails, there is an undocumented and unsupported method, that
I am not telling about in a newsgroup, because that methods is just
simply far too dangerous. I have no problem sharing it by mail. But
please try sp_detach_db first.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||In article <Xns93F5E2EFD74Yazorman@.127.0.0.1>, sommar@.algonet.se says...
> > I know about sp_attach_db, but looking at BOL, it says that sp_attach_db
> > only works with databases that were previously detached with
> > sp_detach_db.
> I would first try with sp_attach_db. If SQL Server was shut down cleanly,
> I would expect the database files to be available.
sp_attach_db worked great, Erland. Thank you.
-- Rick
Wednesday, March 21, 2012
Recover System Stored Procedure
you could restore your master database if you've a recent copy. Alternatively, the following script will recreate it. You'll need to either run it via a GUI tool, or else use osql from Dos.
use master
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/* Procedure for 8.0 server */
CREATE PROCEDURE sp_columns (
@.table_name nvarchar(384),
@.table_owner nvarchar(384) = null,
@.table_qualifier sysname = null,
@.column_name nvarchar(384) = null,
@.ODBCVer int = 2)
AS
DECLARE @.full_table_name nvarchar(769)
DECLARE @.table_id int
if @.ODBCVer <> 3
select @.ODBCVer = 2
if @.column_name is null /* If column name not supplied, match all */
select @.column_name = '%'
if @.table_qualifier is not null
begin
if db_name() <> @.table_qualifier
begin /* If qualifier doesn't match current database */
raiserror (15250, -1,-1)
return
end
end
if @.table_name is null
begin /* If table name not supplied, match all */
select @.table_name = '%'
end
if @.table_owner is null
begin /* If unqualified table name */
SELECT @.full_table_name = quotename(@.table_name)
end
else
begin /* Qualified table name */
if @.table_owner = ''
begin /* If empty owner name */
SELECT @.full_table_name = quotename(@.table_owner)
end
else
begin
SELECT @.full_table_name = quotename(@.table_owner) +
'.' + quotename(@.table_name)
end
end
/* Get Object ID */
SELECT @.table_id = object_id(@.full_table_name)
if ((isnull(charindex('%', @.full_table_name),0) = 0) and
(isnull(charindex('[', @.table_name),0) = 0) and
(isnull(charindex('[', @.table_owner),0) = 0) and
(isnull(charindex('_', @.full_table_name),0) = 0) and
@.table_id <> 0)
begin
/* this block is for the case where there is no pattern
matching required for the table name */
SELECT
TABLE_QUALIFIER = convert(sysname,DB_NAME()),
TABLE_OWNER = convert(sysname,USER_NAME(o.uid)),
TABLE_NAME = convert(sysname,o.name),
COLUMN_NAME = convert(sysname,c.name),
d.DATA_TYPE,
convert (sysname,case
when t.xusertype > 255 then t.name
else d.TYPE_NAME collate database_default
end) TYPE_NAME,
convert(int,case
when d.DATA_TYPE in (6,7) then d.data_precision /* FLOAT/REAL */
else OdbcPrec(c.xtype,c.length,c.xprec)
end) "PRECISION",
convert(int,case
when type_name(d.ss_dtype) IN ('numeric','decimal') then /* decimal/numeric types */
OdbcPrec(c.xtype,c.length,c.xprec)+2
else
isnull(d.length, c.length)
end) LENGTH,
SCALE = convert(smallint, OdbcScale(c.xtype,c.xscale)),
d.RADIX,
NULLABLE = convert(smallint, ColumnProperty (c.id, c.name, 'AllowsNull')),
REMARKS = convert(varchar(254),null), /* Remarks are NULL */
COLUMN_DEF = text,
d.SQL_DATA_TYPE,
d.SQL_DATETIME_SUB,
CHAR_OCTET_LENGTH = isnull(d.length, c.length)+d.charbin,
ORDINAL_POSITION = convert(int,
(
select count(*)
from syscolumns sc
where sc.id = c.id
AND sc.number = c.number
AND sc.colid <= c.colid
)),
IS_NULLABLE = convert(varchar(254),
substring('NO YES',(ColumnProperty (c.id, c.name, 'AllowsNull')*3)+1,3)),
SS_DATA_TYPE = c.type
FROM
sysobjects o,
master.dbo.spt_datatype_info d,
systypes t,
syscolumns c
LEFT OUTER JOIN syscomments m on c.cdefault = m.id
AND m.colid = 1
WHERE
o.id = @.table_id
AND c.id = o.id
AND t.xtype = d.ss_dtype
AND c.length = isnull(d.fixlen, c.length)
AND (d.ODBCVer is null or d.ODBCVer = @.ODBCVer)
AND (o.type not in ('P', 'FN', 'TF', 'IF') OR (o.type in ('TF', 'IF') and c.number = 0))
AND isnull(d.AUTO_INCREMENT,0) = isnull(ColumnProperty (c.id, c.name, 'IsIdentity'),0)
AND c.xusertype = t.xusertype
AND c.name like @.column_name
ORDER BY 17
end
else
begin
/* this block is for the case where there IS pattern
matching done on the table name */
if @.table_owner is null /* If owner not supplied, match all */
select @.table_owner = '%'
SELECT
TABLE_QUALIFIER = convert(sysname,DB_NAME()),
TABLE_OWNER = convert(sysname,USER_NAME(o.uid)),
TABLE_NAME = convert(sysname,o.name),
COLUMN_NAME = convert(sysname,c.name),
d.DATA_TYPE,
convert (sysname,case
when t.xusertype > 255 then t.name
else d.TYPE_NAME collate database_default
end) TYPE_NAME,
convert(int,case
when d.DATA_TYPE in (6,7) then d.data_precision /* FLOAT/REAL */
else OdbcPrec(c.xtype,c.length,c.xprec)
end) "PRECISION",
convert(int,case
when type_name(d.ss_dtype) IN ('numeric','decimal') then /* decimal/numeric types */
OdbcPrec(c.xtype,c.length,c.xprec)+2
else
isnull(d.length, c.length)
end) LENGTH,
SCALE = convert(smallint, OdbcScale(c.xtype,c.xscale)),
d.RADIX,
NULLABLE = convert(smallint, ColumnProperty (c.id, c.name, 'AllowsNull')),
REMARKS = convert(varchar(254),null), /* Remarks are NULL */
COLUMN_DEF = text,
d.SQL_DATA_TYPE,
d.SQL_DATETIME_SUB,
CHAR_OCTET_LENGTH = isnull(d.length, c.length)+d.charbin,
ORDINAL_POSITION = convert(int,
(
select count(*)
from syscolumns sc
where sc.id = c.id
AND sc.number = c.number
AND sc.colid <= c.colid
)),
IS_NULLABLE = convert(varchar(254),
rtrim(substring('NO YES',(ColumnProperty (c.id, c.name, 'AllowsNull')*3)+1,3))),
SS_DATA_TYPE = c.type
FROM
sysobjects o,
master.dbo.spt_datatype_info d,
systypes t,
syscolumns c
LEFT OUTER JOIN syscomments m on c.cdefault = m.id
AND m.colid = 1
WHERE
o.name like @.table_name
AND user_name(o.uid) like @.table_owner
AND o.id = c.id
AND t.xtype = d.ss_dtype
AND c.length = isnull(d.fixlen, c.length)
AND (d.ODBCVer is null or d.ODBCVer = @.ODBCVer)
AND (o.type not in ('P', 'FN', 'TF', 'IF') OR (o.type in ('TF', 'IF') and c.number = 0))
AND isnull(d.AUTO_INCREMENT,0) = isnull(ColumnProperty (c.id, c.name, 'IsIdentity'),0)
AND c.xusertype = t.xusertype
AND c.name like @.column_name
ORDER BY 2, 3, 17
end
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
Tuesday, March 20, 2012
Recover Model Database
I was trying to move the system files, I managed to move the master, msdb,
tempdb but then it died on the model. and I need to recover database... the
sql service keeps failing. thank you!!!Gabe
Do you have a backup of model database?
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
> SQL 2000.
> I was trying to move the system files, I managed to move the master, msdb,
> tempdb but then it died on the model. and I need to recover database...
> the sql service keeps failing. thank you!!!
>|||yes i do, i try to restore it but i get this error..
tempdb is skipped. You cannot run a query that requires tempdb
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:up$BjYutHHA.4572@.TK2MSFTNGP02.phx.gbl...
> Gabe
> Do you have a backup of model database?
> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
> news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
>|||Gabe
> tempdb is skipped. You cannot run a query that requires tempdb
Is it an error?
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:OprCNZvtHHA.412@.TK2MSFTNGP04.phx.gbl...
> yes i do, i try to restore it but i get this error..
> tempdb is skipped. You cannot run a query that requires tempdb
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:up$BjYutHHA.4572@.TK2MSFTNGP02.phx.gbl...
>|||Yes, it is an error.
- Gabe
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:edKaC8vtHHA.484@.TK2MSFTNGP06.phx.gbl...
> Gabe
> Is it an error?
>
>
> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
> news:OprCNZvtHHA.412@.TK2MSFTNGP04.phx.gbl...
>|||Gabe
I have never restored master when trying to move a SQL server. I usually
script logins and jobs for transfer and restore only the user databases.
http://msdn2.microsoft.com/en-us/library/aa213790(SQL.80).aspx
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:uP8HfswtHHA.2108@.TK2MSFTNGP02.phx.gbl...
> Yes, it is an error.
> - Gabe
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:edKaC8vtHHA.484@.TK2MSFTNGP06.phx.gbl...
>|||Thanks for the link. I was able to get the entire server running again on
the cluster. Just need to restore the model from backup (i was able to
create a new one)
i issue:
RESTORE DATABASE model
FROM DISK = 'g:\model\model_db_200706242000.BAK'
WITH MOVE 'modeldev' TO 'G:\Program Files\Microsoft SQL
Server\MSSQL\Data\model.mdf',
MOVE 'modellog' TO 'G:\Program Files\Microsoft SQL
Server\MSSQL\Data\modellog.ldf'
i recieve:
Server: Msg 3156, Level 16, State 1, Line 1
File 'modeldev' cannot be restored to 'G:\Program Files\Microsoft SQL
Server\MSSQL\Data\model.mdf'. Use WITH MOVE to identify a valid location for
the file.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
at a lose!!!
Thanks for any help,
- Gabe
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23%23X0s2wtHHA.3544@.TK2MSFTNGP03.phx.gbl...
> Gabe
> I have never restored master when trying to move a SQL server. I usually
> script logins and jobs for transfer and restore only the user databases.
> http://msdn2.microsoft.com/en-us/library/aa213790(SQL.80).aspx
>
> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
> news:uP8HfswtHHA.2108@.TK2MSFTNGP02.phx.gbl...
>|||resolved!
thanks all.
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
> SQL 2000.
> I was trying to move the system files, I managed to move the master, msdb,
> tempdb but then it died on the model. and I need to recover database...
> the sql service keeps failing. thank you!!!
>
Recover Model Database
I was trying to move the system files, I managed to move the master, msdb,
tempdb but then it died on the model. and I need to recover database... the
sql service keeps failing. thank you!!!
Gabe
Do you have a backup of model database?
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
> SQL 2000.
> I was trying to move the system files, I managed to move the master, msdb,
> tempdb but then it died on the model. and I need to recover database...
> the sql service keeps failing. thank you!!!
>
|||yes i do, i try to restore it but i get this error..
tempdb is skipped. You cannot run a query that requires tempdb
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:up$BjYutHHA.4572@.TK2MSFTNGP02.phx.gbl...
> Gabe
> Do you have a backup of model database?
> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
> news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
>
|||Gabe
> tempdb is skipped. You cannot run a query that requires tempdb
Is it an error?
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:OprCNZvtHHA.412@.TK2MSFTNGP04.phx.gbl...
> yes i do, i try to restore it but i get this error..
> tempdb is skipped. You cannot run a query that requires tempdb
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:up$BjYutHHA.4572@.TK2MSFTNGP02.phx.gbl...
>
|||Yes, it is an error.
- Gabe
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:edKaC8vtHHA.484@.TK2MSFTNGP06.phx.gbl...
> Gabe
> Is it an error?
>
>
> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
> news:OprCNZvtHHA.412@.TK2MSFTNGP04.phx.gbl...
>
|||Gabe
I have never restored master when trying to move a SQL server. I usually
script logins and jobs for transfer and restore only the user databases.
http://msdn2.microsoft.com/en-us/library/aa213790(SQL.80).aspx
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:uP8HfswtHHA.2108@.TK2MSFTNGP02.phx.gbl...
> Yes, it is an error.
> - Gabe
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:edKaC8vtHHA.484@.TK2MSFTNGP06.phx.gbl...
>
|||Thanks for the link. I was able to get the entire server running again on
the cluster. Just need to restore the model from backup (i was able to
create a new one)
i issue:
RESTORE DATABASE model
FROM DISK = 'g:\model\model_db_200706242000.BAK'
WITH MOVE 'modeldev' TO 'G:\Program Files\Microsoft SQL
Server\MSSQL\Data\model.mdf',
MOVE 'modellog' TO 'G:\Program Files\Microsoft SQL
Server\MSSQL\Data\modellog.ldf'
i recieve:
Server: Msg 3156, Level 16, State 1, Line 1
File 'modeldev' cannot be restored to 'G:\Program Files\Microsoft SQL
Server\MSSQL\Data\model.mdf'. Use WITH MOVE to identify a valid location for
the file.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
at a lose!!!
Thanks for any help,
- Gabe
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23%23X0s2wtHHA.3544@.TK2MSFTNGP03.phx.gbl...
> Gabe
> I have never restored master when trying to move a SQL server. I usually
> script logins and jobs for transfer and restore only the user databases.
> http://msdn2.microsoft.com/en-us/library/aa213790(SQL.80).aspx
>
> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
> news:uP8HfswtHHA.2108@.TK2MSFTNGP02.phx.gbl...
>
|||resolved!
thanks all.
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
> SQL 2000.
> I was trying to move the system files, I managed to move the master, msdb,
> tempdb but then it died on the model. and I need to recover database...
> the sql service keeps failing. thank you!!!
>
Recover Model Database
I was trying to move the system files, I managed to move the master, msdb,
tempdb but then it died on the model. and I need to recover database... the
sql service keeps failing. thank you!!!
Gabe
Do you have a backup of model database?
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
> SQL 2000.
> I was trying to move the system files, I managed to move the master, msdb,
> tempdb but then it died on the model. and I need to recover database...
> the sql service keeps failing. thank you!!!
>
|||yes i do, i try to restore it but i get this error..
tempdb is skipped. You cannot run a query that requires tempdb
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:up$BjYutHHA.4572@.TK2MSFTNGP02.phx.gbl...
> Gabe
> Do you have a backup of model database?
> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
> news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
>
|||Gabe
> tempdb is skipped. You cannot run a query that requires tempdb
Is it an error?
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:OprCNZvtHHA.412@.TK2MSFTNGP04.phx.gbl...
> yes i do, i try to restore it but i get this error..
> tempdb is skipped. You cannot run a query that requires tempdb
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:up$BjYutHHA.4572@.TK2MSFTNGP02.phx.gbl...
>
|||Yes, it is an error.
- Gabe
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:edKaC8vtHHA.484@.TK2MSFTNGP06.phx.gbl...
> Gabe
> Is it an error?
>
>
> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
> news:OprCNZvtHHA.412@.TK2MSFTNGP04.phx.gbl...
>
|||Gabe
I have never restored master when trying to move a SQL server. I usually
script logins and jobs for transfer and restore only the user databases.
http://msdn2.microsoft.com/en-us/library/aa213790(SQL.80).aspx
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:uP8HfswtHHA.2108@.TK2MSFTNGP02.phx.gbl...
> Yes, it is an error.
> - Gabe
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:edKaC8vtHHA.484@.TK2MSFTNGP06.phx.gbl...
>
|||Thanks for the link. I was able to get the entire server running again on
the cluster. Just need to restore the model from backup (i was able to
create a new one)
i issue:
RESTORE DATABASE model
FROM DISK = 'g:\model\model_db_200706242000.BAK'
WITH MOVE 'modeldev' TO 'G:\Program Files\Microsoft SQL
Server\MSSQL\Data\model.mdf',
MOVE 'modellog' TO 'G:\Program Files\Microsoft SQL
Server\MSSQL\Data\modellog.ldf'
i recieve:
Server: Msg 3156, Level 16, State 1, Line 1
File 'modeldev' cannot be restored to 'G:\Program Files\Microsoft SQL
Server\MSSQL\Data\model.mdf'. Use WITH MOVE to identify a valid location for
the file.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
at a lose!!!
Thanks for any help,
- Gabe
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23%23X0s2wtHHA.3544@.TK2MSFTNGP03.phx.gbl...
> Gabe
> I have never restored master when trying to move a SQL server. I usually
> script logins and jobs for transfer and restore only the user databases.
> http://msdn2.microsoft.com/en-us/library/aa213790(SQL.80).aspx
>
> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
> news:uP8HfswtHHA.2108@.TK2MSFTNGP02.phx.gbl...
>
|||resolved!
thanks all.
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
> SQL 2000.
> I was trying to move the system files, I managed to move the master, msdb,
> tempdb but then it died on the model. and I need to recover database...
> the sql service keeps failing. thank you!!!
>
Recover Model Database
I was trying to move the system files, I managed to move the master, msdb,
tempdb but then it died on the model. and I need to recover database... the
sql service keeps failing. thank you!!!
Gabe
Do you have a backup of model database?
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
> SQL 2000.
> I was trying to move the system files, I managed to move the master, msdb,
> tempdb but then it died on the model. and I need to recover database...
> the sql service keeps failing. thank you!!!
>
|||yes i do, i try to restore it but i get this error..
tempdb is skipped. You cannot run a query that requires tempdb
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:up$BjYutHHA.4572@.TK2MSFTNGP02.phx.gbl...
> Gabe
> Do you have a backup of model database?
> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
> news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
>
|||Gabe
> tempdb is skipped. You cannot run a query that requires tempdb
Is it an error?
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:OprCNZvtHHA.412@.TK2MSFTNGP04.phx.gbl...
> yes i do, i try to restore it but i get this error..
> tempdb is skipped. You cannot run a query that requires tempdb
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:up$BjYutHHA.4572@.TK2MSFTNGP02.phx.gbl...
>
|||Yes, it is an error.
- Gabe
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:edKaC8vtHHA.484@.TK2MSFTNGP06.phx.gbl...
> Gabe
> Is it an error?
>
>
> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
> news:OprCNZvtHHA.412@.TK2MSFTNGP04.phx.gbl...
>
|||Gabe
I have never restored master when trying to move a SQL server. I usually
script logins and jobs for transfer and restore only the user databases.
http://msdn2.microsoft.com/en-us/library/aa213790(SQL.80).aspx
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:uP8HfswtHHA.2108@.TK2MSFTNGP02.phx.gbl...
> Yes, it is an error.
> - Gabe
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:edKaC8vtHHA.484@.TK2MSFTNGP06.phx.gbl...
>
|||Thanks for the link. I was able to get the entire server running again on
the cluster. Just need to restore the model from backup (i was able to
create a new one)
i issue:
RESTORE DATABASE model
FROM DISK = 'g:\model\model_db_200706242000.BAK'
WITH MOVE 'modeldev' TO 'G:\Program Files\Microsoft SQL
Server\MSSQL\Data\model.mdf',
MOVE 'modellog' TO 'G:\Program Files\Microsoft SQL
Server\MSSQL\Data\modellog.ldf'
i recieve:
Server: Msg 3156, Level 16, State 1, Line 1
File 'modeldev' cannot be restored to 'G:\Program Files\Microsoft SQL
Server\MSSQL\Data\model.mdf'. Use WITH MOVE to identify a valid location for
the file.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
at a lose!!!
Thanks for any help,
- Gabe
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23%23X0s2wtHHA.3544@.TK2MSFTNGP03.phx.gbl...
> Gabe
> I have never restored master when trying to move a SQL server. I usually
> script logins and jobs for transfer and restore only the user databases.
> http://msdn2.microsoft.com/en-us/library/aa213790(SQL.80).aspx
>
> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
> news:uP8HfswtHHA.2108@.TK2MSFTNGP02.phx.gbl...
>
|||resolved!
thanks all.
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
> SQL 2000.
> I was trying to move the system files, I managed to move the master, msdb,
> tempdb but then it died on the model. and I need to recover database...
> the sql service keeps failing. thank you!!!
>
Recover Model Database
I was trying to move the system files, I managed to move the master, msdb,
tempdb but then it died on the model. and I need to recover database... the
sql service keeps failing. thank you!!!Gabe
Do you have a backup of model database?
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
> SQL 2000.
> I was trying to move the system files, I managed to move the master, msdb,
> tempdb but then it died on the model. and I need to recover database...
> the sql service keeps failing. thank you!!!
>|||yes i do, i try to restore it but i get this error..
tempdb is skipped. You cannot run a query that requires tempdb
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:up$BjYutHHA.4572@.TK2MSFTNGP02.phx.gbl...
> Gabe
> Do you have a backup of model database?
> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
> news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
>> SQL 2000.
>> I was trying to move the system files, I managed to move the master,
>> msdb, tempdb but then it died on the model. and I need to recover
>> database... the sql service keeps failing. thank you!!!
>|||Gabe
> tempdb is skipped. You cannot run a query that requires tempdb
Is it an error?
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:OprCNZvtHHA.412@.TK2MSFTNGP04.phx.gbl...
> yes i do, i try to restore it but i get this error..
> tempdb is skipped. You cannot run a query that requires tempdb
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:up$BjYutHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Gabe
>> Do you have a backup of model database?
>> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
>> news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
>> SQL 2000.
>> I was trying to move the system files, I managed to move the master,
>> msdb, tempdb but then it died on the model. and I need to recover
>> database... the sql service keeps failing. thank you!!!
>>
>|||Yes, it is an error.
- Gabe
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:edKaC8vtHHA.484@.TK2MSFTNGP06.phx.gbl...
> Gabe
>> tempdb is skipped. You cannot run a query that requires tempdb
> Is it an error?
>
>
> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
> news:OprCNZvtHHA.412@.TK2MSFTNGP04.phx.gbl...
>> yes i do, i try to restore it but i get this error..
>> tempdb is skipped. You cannot run a query that requires tempdb
>>
>> "Uri Dimant" <urid@.iscar.co.il> wrote in message
>> news:up$BjYutHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Gabe
>> Do you have a backup of model database?
>> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
>> news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
>> SQL 2000.
>> I was trying to move the system files, I managed to move the master,
>> msdb, tempdb but then it died on the model. and I need to recover
>> database... the sql service keeps failing. thank you!!!
>>
>>
>|||Gabe
I have never restored master when trying to move a SQL server. I usually
script logins and jobs for transfer and restore only the user databases.
http://msdn2.microsoft.com/en-us/library/aa213790(SQL.80).aspx
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:uP8HfswtHHA.2108@.TK2MSFTNGP02.phx.gbl...
> Yes, it is an error.
> - Gabe
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:edKaC8vtHHA.484@.TK2MSFTNGP06.phx.gbl...
>> Gabe
>> tempdb is skipped. You cannot run a query that requires tempdb
>> Is it an error?
>>
>>
>> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
>> news:OprCNZvtHHA.412@.TK2MSFTNGP04.phx.gbl...
>> yes i do, i try to restore it but i get this error..
>> tempdb is skipped. You cannot run a query that requires tempdb
>>
>> "Uri Dimant" <urid@.iscar.co.il> wrote in message
>> news:up$BjYutHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Gabe
>> Do you have a backup of model database?
>> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
>> news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
>> SQL 2000.
>> I was trying to move the system files, I managed to move the master,
>> msdb, tempdb but then it died on the model. and I need to recover
>> database... the sql service keeps failing. thank you!!!
>>
>>
>>
>|||Thanks for the link. I was able to get the entire server running again on
the cluster. Just need to restore the model from backup (i was able to
create a new one)
i issue:
RESTORE DATABASE model
FROM DISK = 'g:\model\model_db_200706242000.BAK'
WITH MOVE 'modeldev' TO 'G:\Program Files\Microsoft SQL
Server\MSSQL\Data\model.mdf',
MOVE 'modellog' TO 'G:\Program Files\Microsoft SQL
Server\MSSQL\Data\modellog.ldf'
i recieve:
Server: Msg 3156, Level 16, State 1, Line 1
File 'modeldev' cannot be restored to 'G:\Program Files\Microsoft SQL
Server\MSSQL\Data\model.mdf'. Use WITH MOVE to identify a valid location for
the file.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
at a lose!!!
Thanks for any help,
- Gabe
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23%23X0s2wtHHA.3544@.TK2MSFTNGP03.phx.gbl...
> Gabe
> I have never restored master when trying to move a SQL server. I usually
> script logins and jobs for transfer and restore only the user databases.
> http://msdn2.microsoft.com/en-us/library/aa213790(SQL.80).aspx
>
> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
> news:uP8HfswtHHA.2108@.TK2MSFTNGP02.phx.gbl...
>> Yes, it is an error.
>> - Gabe
>> "Uri Dimant" <urid@.iscar.co.il> wrote in message
>> news:edKaC8vtHHA.484@.TK2MSFTNGP06.phx.gbl...
>> Gabe
>> tempdb is skipped. You cannot run a query that requires tempdb
>> Is it an error?
>>
>>
>> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
>> news:OprCNZvtHHA.412@.TK2MSFTNGP04.phx.gbl...
>> yes i do, i try to restore it but i get this error..
>> tempdb is skipped. You cannot run a query that requires tempdb
>>
>> "Uri Dimant" <urid@.iscar.co.il> wrote in message
>> news:up$BjYutHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Gabe
>> Do you have a backup of model database?
>> "Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
>> news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
>> SQL 2000.
>> I was trying to move the system files, I managed to move the master,
>> msdb, tempdb but then it died on the model. and I need to recover
>> database... the sql service keeps failing. thank you!!!
>>
>>
>>
>>
>|||resolved!
thanks all.
"Gabe Matteson" <gmatteson.rounder.com.nospam> wrote in message
news:ek6F7SutHHA.3480@.TK2MSFTNGP04.phx.gbl...
> SQL 2000.
> I was trying to move the system files, I managed to move the master, msdb,
> tempdb but then it died on the model. and I need to recover database...
> the sql service keeps failing. thank you!!!
>
Friday, March 9, 2012
recover a database without backup
Is there any way to recover a sql database from a file system backup (.mdf
and .ldf files copies taken every night while sql was up and running)? The
client does not have any sql backups. I know he should ...
Thanks very much.
BrianYou can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR ATT
ACH). It is only
guaranteed if you first detached the database, though.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
> Hi,
> Is there any way to recover a sql database from a file system backup (.mdf
> and .ldf files copies taken every night while sql was up and running)? The
> client does not have any sql backups. I know he should ...
> Thanks very much.
> --
> Brian|||unfortunately it was not detached... those files restored were just image
copied during OS backup process... thanks anyway.
--
Brian
"Tibor Karaszi" wrote:
> You can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR A
TTACH). It is only
> guaranteed if you first detached the database, though.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
> news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
>|||It is worth a try, it is likely it will work even though you didn't detached
first.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
news:6B4403AF-8256-4086-825C-852CF5078B77@.microsoft.com...[vbcol=seagreen]
> unfortunately it was not detached... those files restored were just image
> copied during OS backup process... thanks anyway.
> --
> Brian
>
> "Tibor Karaszi" wrote:
>|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OxIuUgpgHHA.2640@.TK2MSFTNGP06.phx.gbl...
> It is worth a try, it is likely it will work even though you didn't
> detached first.
Be forewarned, even if it it DOES work... you may have corruption.
I'd certainly run a DBCC CHECKDB on all the databases. (with all the flags)
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
> news:6B4403AF-8256-4086-825C-852CF5078B77@.microsoft.com...
>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html
recover a database without backup
Is there any way to recover a sql database from a file system backup (.mdf
and .ldf files copies taken every night while sql was up and running)? The
client does not have any sql backups. I know he should ...
Thanks very much.
--
BrianYou can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR ATTACH). It is only
guaranteed if you first detached the database, though.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
> Hi,
> Is there any way to recover a sql database from a file system backup (.mdf
> and .ldf files copies taken every night while sql was up and running)? The
> client does not have any sql backups. I know he should ...
> Thanks very much.
> --
> Brian|||unfortunately it was not detached... those files restored were just image
copied during OS backup process... thanks anyway.
--
Brian
"Tibor Karaszi" wrote:
> You can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR ATTACH). It is only
> guaranteed if you first detached the database, though.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
> news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
> > Hi,
> >
> > Is there any way to recover a sql database from a file system backup (.mdf
> > and .ldf files copies taken every night while sql was up and running)? The
> > client does not have any sql backups. I know he should ...
> >
> > Thanks very much.
> >
> > --
> > Brian
>|||It is worth a try, it is likely it will work even though you didn't detached first.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
news:6B4403AF-8256-4086-825C-852CF5078B77@.microsoft.com...
> unfortunately it was not detached... those files restored were just image
> copied during OS backup process... thanks anyway.
> --
> Brian
>
> "Tibor Karaszi" wrote:
>> You can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR ATTACH). It is only
>> guaranteed if you first detached the database, though.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
>> news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
>> > Hi,
>> >
>> > Is there any way to recover a sql database from a file system backup (.mdf
>> > and .ldf files copies taken every night while sql was up and running)? The
>> > client does not have any sql backups. I know he should ...
>> >
>> > Thanks very much.
>> >
>> > --
>> > Brian
>>|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OxIuUgpgHHA.2640@.TK2MSFTNGP06.phx.gbl...
> It is worth a try, it is likely it will work even though you didn't
> detached first.
Be forewarned, even if it it DOES work... you may have corruption.
I'd certainly run a DBCC CHECKDB on all the databases. (with all the flags)
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
> news:6B4403AF-8256-4086-825C-852CF5078B77@.microsoft.com...
>> unfortunately it was not detached... those files restored were just image
>> copied during OS backup process... thanks anyway.
>> --
>> Brian
>>
>> "Tibor Karaszi" wrote:
>> You can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR
>> ATTACH). It is only
>> guaranteed if you first detached the database, though.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
>> news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
>> > Hi,
>> >
>> > Is there any way to recover a sql database from a file system backup
>> > (.mdf
>> > and .ldf files copies taken every night while sql was up and running)?
>> > The
>> > client does not have any sql backups. I know he should ...
>> >
>> > Thanks very much.
>> >
>> > --
>> > Brian
>>
>
--
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html
Saturday, February 25, 2012
Records appearing and then disappearing
We have a SQL server db backend for our ERP system. I have written a
Crystal Report to extract data from one particular table called
itemspecbomw (c.30000 records) which contains amongst other things
Bill of Materials costings. When I run the report I know that some
rows are missing as when I look at values through the ERP system
itself, the values are different.
What I have found is that when I run the equivalent ERP system report,
the Crystal Report I have written shows extra rows. SQL Query Analyser
behaves exactly the same as the report I have written even when using
a "select * from". I have tested opening up a bigger tables (c. 700000
records) which appears without a problem. If anyone knows why this
mystery is happening, I woould be grateful for your help.
Many thanks,
Tony.tkennedy@.blenders.ie (Tony Kennedy) wrote in message news:<f25d55e1.0402170538.4d2c54f4@.posting.google.com>...
> Hi,
> We have a SQL server db backend for our ERP system. I have written a
> Crystal Report to extract data from one particular table called
> itemspecbomw (c.30000 records) which contains amongst other things
> Bill of Materials costings. When I run the report I know that some
> rows are missing as when I look at values through the ERP system
> itself, the values are different.
> What I have found is that when I run the equivalent ERP system report,
> the Crystal Report I have written shows extra rows. SQL Query Analyser
> behaves exactly the same as the report I have written even when using
> a "select * from". I have tested opening up a bigger tables (c. 700000
> records) which appears without a problem. If anyone knows why this
> mystery is happening, I woould be grateful for your help.
> Many thanks,
> Tony.
I don't completely follow your explanation, but you seem to be saying
that QA and Crystal give the same results, but your ERP report gives
different ones? If two tools are giving different results, then the
most likely explanation is that they are submitting different queries.
I would suggest using Profiler to trace the SQL sent to the server by
your ERP application, and then run the same SQL in QA - you may find
that it is constructing a query which is different from what you
expect.
Simon|||Hi Simon,
I checked out the query used in the system ERP report, but I found
when I cut'n pasted the query into query analyser and ran it, it
returned the exact same number of records as the one I wrote. It seems
to be a problem with the way I access the db or that the ERP program
has some sort of lock on the table...
Thanks for your advice,
Tony.
sql@.hayes.ch (Simon Hayes) wrote in message news:<60cd0137.0402171042.2caa5e1c@.posting.google.com>...
> tkennedy@.blenders.ie (Tony Kennedy) wrote in message news:<f25d55e1.0402170538.4d2c54f4@.posting.google.com>...
> > Hi,
> > We have a SQL server db backend for our ERP system. I have written a
> > Crystal Report to extract data from one particular table called
> > itemspecbomw (c.30000 records) which contains amongst other things
> > Bill of Materials costings. When I run the report I know that some
> > rows are missing as when I look at values through the ERP system
> > itself, the values are different.
> > What I have found is that when I run the equivalent ERP system report,
> > the Crystal Report I have written shows extra rows. SQL Query Analyser
> > behaves exactly the same as the report I have written even when using
> > a "select * from". I have tested opening up a bigger tables (c. 700000
> > records) which appears without a problem. If anyone knows why this
> > mystery is happening, I woould be grateful for your help.
> > Many thanks,
> > Tony.
> I don't completely follow your explanation, but you seem to be saying
> that QA and Crystal give the same results, but your ERP report gives
> different ones? If two tools are giving different results, then the
> most likely explanation is that they are submitting different queries.
> I would suggest using Profiler to trace the SQL sent to the server by
> your ERP application, and then run the same SQL in QA - you may find
> that it is constructing a query which is different from what you
> expect.
> Simon
Monday, February 20, 2012
record server and agent start-up status
When the sql server and sql agent are first started, are
their status being written to any system tables or logs?
Many thanks.
JJThe SQL Server error log has the startup info for SQL
Server. The default location is the Log directory under your
SQL instance directory. The most recent file name is
errorlog. Previous logs have a number appended to the file
name.
The SQL Agent log has the startup info for SQL Server Agent.
It's also in the Log directory. File name is SQLAgent.Out
-Sue
On Mon, 13 Oct 2003 17:18:07 -0700, "JJ Wang"
<jwang@.leapwireless.com> wrote:
>hi,
>When the sql server and sql agent are first started, are
>their status being written to any system tables or logs?
>Many thanks.
>JJ