Showing posts with label greetings. Show all posts
Showing posts with label greetings. Show all posts

Thursday, March 22, 2012

Database Backup question

Greetings...
I have a tape drive that my data base it backed up to. I'm running SQL
Server 7 and I backup the entire MSSQL7 folder.
I needed to restore some data in the database. The file was going to
restore was my_database_name.mdf.
Is that the actual database file, and if not, what is?
The reason I ask is because when looking at the file in Windows Explorer,
the date modified was from a week ago, and I know the database has been
modified since then...it changes daily of course.
So basically...if I wanted to back up the database not using the backup in
SQL server, but the one I use for my tape drive, which file or files would I
back up? Any why doesn't the date modified show the current date, since the
database has been modified today?
Thanks
Dan
It's normal that the database file has an old time stamp even it's being
changed actively. The timestamp seems to reflect the time that the file gets
created.
The .mdf file is the data file, not the backup file. you can't restore from
it. You can use sp_attach_db to attach it. If you want to restore, probably
look for a backup file (with or without extension).
HTH.
"Dan B" <none@.none.com> wrote in message
news:eLzrIfI3EHA.3416@.TK2MSFTNGP09.phx.gbl...
> Greetings...
> I have a tape drive that my data base it backed up to. I'm running SQL
> Server 7 and I backup the entire MSSQL7 folder.
> I needed to restore some data in the database. The file was going to
> restore was my_database_name.mdf.
> Is that the actual database file, and if not, what is?
> The reason I ask is because when looking at the file in Windows Explorer,
> the date modified was from a week ago, and I know the database has been
> modified since then...it changes daily of course.
> So basically...if I wanted to back up the database not using the backup
> in SQL server, but the one I use for my tape drive, which file or files
> would I back up? Any why doesn't the date modified show the current date,
> since the database has been modified today?
> Thanks
> Dan
>
|||In order to successfully backup your .MDF and .NDF files (data and log),
using the scenario that you posed, you must FIRST stop the MSSQLServer
service. While SQL Server is running, those files will be open and you will
not be able to back them up properly.
Another option is to perform an sp_detachdb and once detached, backup the
data file.
You should really use the Backup features in SQL Server however.
HTH
Rick Sawtell
MCT, MCSD, MCDBA
"Dan B" <none@.none.com> wrote in message
news:eLzrIfI3EHA.3416@.TK2MSFTNGP09.phx.gbl...
> Greetings...
> I have a tape drive that my data base it backed up to. I'm running SQL
> Server 7 and I backup the entire MSSQL7 folder.
> I needed to restore some data in the database. The file was going to
> restore was my_database_name.mdf.
> Is that the actual database file, and if not, what is?
> The reason I ask is because when looking at the file in Windows Explorer,
> the date modified was from a week ago, and I know the database has been
> modified since then...it changes daily of course.
> So basically...if I wanted to back up the database not using the backup
> in SQL server, but the one I use for my tape drive, which file or files
> would I back up? Any why doesn't the date modified show the current date,
> since the database has been modified today?
> Thanks
> Dan
>
|||On Tue, 7 Dec 2004 11:08:39 -0700, "Dan B" <none@.none.com> wrote:
>So basically...if I wanted to back up the database not using the backup in
>SQL server, but the one I use for my tape drive, which file or files would I
>back up?
By default, everything in your PRIMARY filegroup is in the one .mdf
file.
You can set up additional filegroups which are separately restorable.
As usual, see BOL.
J.

Database Backup question

Greetings...
I have a tape drive that my data base it backed up to. I'm running SQL
Server 7 and I backup the entire MSSQL7 folder.
I needed to restore some data in the database. The file was going to
restore was my_database_name.mdf.
Is that the actual database file, and if not, what is?
The reason I ask is because when looking at the file in Windows Explorer,
the date modified was from a week ago, and I know the database has been
modified since then...it changes daily of course.
So basically...if I wanted to back up the database not using the backup in
SQL server, but the one I use for my tape drive, which file or files would I
back up? Any why doesn't the date modified show the current date, since the
database has been modified today?
Thanks
Dan
It's normal that the database file has an old time stamp even it's being
changed actively. The timestamp seems to reflect the time that the file gets
created.
The .mdf file is the data file, not the backup file. you can't restore from
it. You can use sp_attach_db to attach it. If you want to restore, probably
look for a backup file (with or without extension).
HTH.
"Dan B" <none@.none.com> wrote in message
news:eLzrIfI3EHA.3416@.TK2MSFTNGP09.phx.gbl...
> Greetings...
> I have a tape drive that my data base it backed up to. I'm running SQL
> Server 7 and I backup the entire MSSQL7 folder.
> I needed to restore some data in the database. The file was going to
> restore was my_database_name.mdf.
> Is that the actual database file, and if not, what is?
> The reason I ask is because when looking at the file in Windows Explorer,
> the date modified was from a week ago, and I know the database has been
> modified since then...it changes daily of course.
> So basically...if I wanted to back up the database not using the backup
> in SQL server, but the one I use for my tape drive, which file or files
> would I back up? Any why doesn't the date modified show the current date,
> since the database has been modified today?
> Thanks
> Dan
>
|||In order to successfully backup your .MDF and .NDF files (data and log),
using the scenario that you posed, you must FIRST stop the MSSQLServer
service. While SQL Server is running, those files will be open and you will
not be able to back them up properly.
Another option is to perform an sp_detachdb and once detached, backup the
data file.
You should really use the Backup features in SQL Server however.
HTH
Rick Sawtell
MCT, MCSD, MCDBA
"Dan B" <none@.none.com> wrote in message
news:eLzrIfI3EHA.3416@.TK2MSFTNGP09.phx.gbl...
> Greetings...
> I have a tape drive that my data base it backed up to. I'm running SQL
> Server 7 and I backup the entire MSSQL7 folder.
> I needed to restore some data in the database. The file was going to
> restore was my_database_name.mdf.
> Is that the actual database file, and if not, what is?
> The reason I ask is because when looking at the file in Windows Explorer,
> the date modified was from a week ago, and I know the database has been
> modified since then...it changes daily of course.
> So basically...if I wanted to back up the database not using the backup
> in SQL server, but the one I use for my tape drive, which file or files
> would I back up? Any why doesn't the date modified show the current date,
> since the database has been modified today?
> Thanks
> Dan
>
|||On Tue, 7 Dec 2004 11:08:39 -0700, "Dan B" <none@.none.com> wrote:
>So basically...if I wanted to back up the database not using the backup in
>SQL server, but the one I use for my tape drive, which file or files would I
>back up?
By default, everything in your PRIMARY filegroup is in the one .mdf
file.
You can set up additional filegroups which are separately restorable.
As usual, see BOL.
J.

Database Backup question

Greetings...
I have a tape drive that my data base it backed up to. I'm running SQL
Server 7 and I backup the entire MSSQL7 folder.
I needed to restore some data in the database. The file was going to
restore was my_database_name.mdf.
Is that the actual database file, and if not, what is?
The reason I ask is because when looking at the file in Windows Explorer,
the date modified was from a week ago, and I know the database has been
modified since then...it changes daily of course.
So basically...if I wanted to back up the database not using the backup in
SQL server, but the one I use for my tape drive, which file or files would I
back up? Any why doesn't the date modified show the current date, since the
database has been modified today?
Thanks
DanIn order to successfully backup your .MDF and .NDF files (data and log),
using the scenario that you posed, you must FIRST stop the MSSQLServer
service. While SQL Server is running, those files will be open and you will
not be able to back them up properly.
Another option is to perform an sp_detachdb and once detached, backup the
data file.
You should really use the Backup features in SQL Server however.
HTH
Rick Sawtell
MCT, MCSD, MCDBA
"Dan B" <none@.none.com> wrote in message
news:eLzrIfI3EHA.3416@.TK2MSFTNGP09.phx.gbl...
> Greetings...
> I have a tape drive that my data base it backed up to. I'm running SQL
> Server 7 and I backup the entire MSSQL7 folder.
> I needed to restore some data in the database. The file was going to
> restore was my_database_name.mdf.
> Is that the actual database file, and if not, what is?
> The reason I ask is because when looking at the file in Windows Explorer,
> the date modified was from a week ago, and I know the database has been
> modified since then...it changes daily of course.
> So basically...if I wanted to back up the database not using the backup
> in SQL server, but the one I use for my tape drive, which file or files
> would I back up? Any why doesn't the date modified show the current date,
> since the database has been modified today?
> Thanks
> Dan
>|||It's normal that the database file has an old time stamp even it's being
changed actively. The timestamp seems to reflect the time that the file gets
created.
The .mdf file is the data file, not the backup file. you can't restore from
it. You can use sp_attach_db to attach it. If you want to restore, probably
look for a backup file (with or without extension).
HTH.
"Dan B" <none@.none.com> wrote in message
news:eLzrIfI3EHA.3416@.TK2MSFTNGP09.phx.gbl...
> Greetings...
> I have a tape drive that my data base it backed up to. I'm running SQL
> Server 7 and I backup the entire MSSQL7 folder.
> I needed to restore some data in the database. The file was going to
> restore was my_database_name.mdf.
> Is that the actual database file, and if not, what is?
> The reason I ask is because when looking at the file in Windows Explorer,
> the date modified was from a week ago, and I know the database has been
> modified since then...it changes daily of course.
> So basically...if I wanted to back up the database not using the backup
> in SQL server, but the one I use for my tape drive, which file or files
> would I back up? Any why doesn't the date modified show the current date,
> since the database has been modified today?
> Thanks
> Dan
>|||On Tue, 7 Dec 2004 11:08:39 -0700, "Dan B" <none@.none.com> wrote:
>So basically...if I wanted to back up the database not using the backup in
>SQL server, but the one I use for my tape drive, which file or files would I
>back up?
By default, everything in your PRIMARY filegroup is in the one .mdf
file.
You can set up additional filegroups which are separately restorable.
As usual, see BOL.
J.

Saturday, February 25, 2012

Data Warehousing Learning Sample

Greetings,
I'm new with data warehousing. Just wondering, do any of you know of a
free sample/example that would help me learn the ABC's of data
warehousing?
The SQL 2000 sample is only available with SQL Enterprise..
Thanks in advance,
Don
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
The Analysis Services installation comes with a sample database called Food
Mart 2000 which is an OLAP database that sits on top of an .mdb file. Is
this the one that you have already investigated?
Jay Nathan, MCP
http://www.jaynathan.com/blog
"don larry" <donlarry17@.hotmail.com> wrote in message
news:O4t01EM3EHA.3932@.TK2MSFTNGP12.phx.gbl...
> Greetings,
> I'm new with data warehousing. Just wondering, do any of you know of a
> free sample/example that would help me learn the ABC's of data
> warehousing?
> The SQL 2000 sample is only available with SQL Enterprise..
> Thanks in advance,
> Don
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
|||Greetings,
Hi Jay, it is a great sample. Just what I was looking for.
Thank you,
Don
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!

Friday, February 24, 2012

Data types question - Varbinary and timestamps

Greetings once again SSIS friends,

I have some source tables which contain timestamp fields (that's timestamp data type not datetime). My dimension table holds the maximum timestamp value as a varbinary(8).

I want my package to have a variable that holds that value but I don't know which data type to use for this. The reason for this is because I want to use that variable to then retrieve all records from my source table that have a timestamp value greater than the value stored in the variable.

Please advise on what data type is suitable.

Thanks for your help in advance.

Greetings once again guys,

I found the following article which gives a workable solution to my problem, but I am still interested to find out the equivalent of timestamp data type in SSIS.

http://solidqualitylearning.com/blogs/erik/archive/2005/12/09/1499.aspx

|||

DT_BYTES

binary, varbinary, timestamp

binary, varbinary, timestamp

BigBinary, VarBinary

RAW

RAW

You will want to use DT_BYTES. See this article on MSDN.

http://msdn2.microsoft.com/en-us/library/ms141036.aspx

Does this answer your question?

Sunday, February 19, 2012

Data type problem

Greetings SSIS friends,

I cast one of my fields from a decimal to an int in my data source (generated from a SQL command). But when I try and map that field to another one of my tables, i get an error saying that I can not cvonvert from decimal to Int32.

Is there any solution which doest require using the derived column or data conversion components?!

Your help would be appreciated.

Can you provide your SQL so that we can look at it? If you are casting to an integer from a decimal in the SQL, SSIS should only see an integer...|||

Hi Phil,

That's what I don't understand.

The SQL is pretty straightforward to be honest.

select
distinct
b.eventid as evt_eventid,
b.meetid as evt_meetid,
cast(h.longname as varchar) as evt_long_name,
cast(h.shortname as varchar) as evt_source_short_name,
b.expstartdate as evt_expstartdate,
b.expstarttime as evt_expstarttime,
b.eventnumber as evt_eventnumber,
b.expertgroup as evt_expertgroup,
b.currentrun as evt_currentrun,
b.enddate as evt_enddate,
b.endtime as evt_endtime,
b.eventstatus as evt_eventstatus,
f.etypeid evt_etypeid,
cast(g.longname as varchar) as evt_type_long_name,
cast(h.longname as varchar) as evt_name,
b.maxplaces as evt_maxplaces,
b.maxpayout as evt_specific_maxpayout,
f.maxpayout as evt_default_type_maxpayout,
b.offdate as evt_offdate,
b.offtime as evt_offtime,
cast(b.callitap as char(1)) as evt_callitap,
cast(isnull(b.maxstake, 0) as int) as evt_maxstake,
b.scoop6leg as evt_scoop6leg,
b.riskoff as evt_riskoff,
b.userofftime as evt_userofftime,
b.delayofftime as evt_delayofftime,
cast(b.suspendliability as int) as evt_suspendliability,
b.termsid as evt_specific_termsid,
i.termsid as evt_default_termsid,
cast(j.longname as varchar) as evt_default_terms,
cast(l.longname as varchar) as specific_evt_terms,
convert(varchar(20), convert(bigint, b.updatetimestamp)) as evt_updatetimestamp
from meetings as a
inner join events as b
on a.meetid = b.meetid
inner join names as c
on a.nameid = c.nameid
inner join EvenType as d
on a.etypeid = d.etypeid
inner join names as e
on d.nameid = e.nameid
inner join EvenType as f
on b.etypeid = f.etypeid
inner join names as g
on f.nameid = g.nameid
inner join names as h
on b.nameid = h.nameid
inner join terms as i
on f.termsid = i.termsid
inner join names as j
on i.nameid = j.nameid
left join terms as k
on b.termsid = k.termsid
left join names as l
on k.nameid = l.nameid
where
convert(varchar(20), convert(bigint, a.updatetimestamp)) > ?
or convert(varchar(20), convert(bigint, b.updatetimestamp)) > ?

order by b.meetid, b.eventid

In SSIS however, it still thinks the column is a decimal.

|||Did you previously have the decimal coming into the source and then later changed the SQL to cast it to an integer?

In the source column mappings, delete the row that corresponds to the column you are working with, and re-map it. Does that help?|||

Hi Phil,

Yes you are right. I unmapped the column and then remaped it and reconfigured my other merge joins and it is now in the data type that I cast it in the SQL code.

Thanks for your help.