Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Tuesday, March 27, 2012

Advice on how to handle backup files

Hi all,
Our client wants some guidance on how to handle backup files created by
SQL Server 2005 for our product.
I was thinking that we would create
1) a nightly backup to say e:\backup
2) create a transaction log backup every hour to e:\backup
Now is it best to create a new file each time - or is it best to
overwrite the original file?
Reason I ask is the client will need to them back these files up to an
external tape drive.
It will probably be easier for them if they have the same 20+ files
each time (ie. one full backup, and hourly transaction files)
If the filenames incremented, then they would need to delete older
files that have been backed up (which can invite user error)
What are peoples opinions on this? Is there a "good way" to do this'
Cheers
DavidHi
Well, in our shop we do a full backup every night to c:\ and log backup
every 15 minutes to d:\
A log file may contain many files so you'll need to specify i like
drop database test
go
create database test
GO
create table test..test(id int identity)
insert test..test default values
backup database test to disk = 'd:\db.bak' WITH INIT
insert test..test default values
backup log test to disk = 'd:\log.bak'WITH INIT
insert test..test default values
backup log test to disk = 'd:\log.bak' WITH NOINIT
GO
RESTORE DATABASE test FROM disk = 'd:\db.bak' WITH FILE = 1, norecovery
RESTORE LOG test FROM disk = 'd:\log.bak' WITH FILE = 1, norecovery
RESTORE LOG test FROM disk = 'd:\log.bak' WITH FILE = 2, recovery
...............
.............
<davconts@.gmail.com> wrote in message
news:1151992078.629506.142340@.p79g2000cwp.googlegroups.com...
> Hi all,
> Our client wants some guidance on how to handle backup files created by
> SQL Server 2005 for our product.
> I was thinking that we would create
> 1) a nightly backup to say e:\backup
> 2) create a transaction log backup every hour to e:\backup
> Now is it best to create a new file each time - or is it best to
> overwrite the original file?
> Reason I ask is the client will need to them back these files up to an
> external tape drive.
> It will probably be easier for them if they have the same 20+ files
> each time (ie. one full backup, and hourly transaction files)
> If the filenames incremented, then they would need to delete older
> files that have been backed up (which can invite user error)
> What are peoples opinions on this? Is there a "good way" to do this'
> Cheers
> David
>|||This is a multi-part message in MIME format.
--070701000301070106090101
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
davconts@.gmail.com wrote:
> Hi all,
> Our client wants some guidance on how to handle backup files created by
> SQL Server 2005 for our product.
> I was thinking that we would create
> 1) a nightly backup to say e:\backup
> 2) create a transaction log backup every hour to e:\backup
> Now is it best to create a new file each time - or is it best to
> overwrite the original file?
> Reason I ask is the client will need to them back these files up to an
> external tape drive.
> It will probably be easier for them if they have the same 20+ files
> each time (ie. one full backup, and hourly transaction files)
> If the filenames incremented, then they would need to delete older
> files that have been backed up (which can invite user error)
> What are peoples opinions on this? Is there a "good way" to do this'
> Cheers
> David
>
Hi David
I don't think there's a single "good way" to do it. It pretty much
depends on personal preferences and I don't think one mtethod is better
than others.
Bottomline is that no matter how you decide to do it, it will require
some degree of knowledge on how it works in order to maintain it and
restore a backup in case of a failure.
I prefer to only have one backup in each file and then name the files
with a name that are composed by date and a forth running number( for
the log files). This is because I like to know that each file only
contains one backup so when I need to restore I have to find the full
backup file and then the corresponding logfile 1, 2, 3... up to the
point in time I need. If I had more backups in the same file, I'd first
have to find out which file number I had to restore for the fulle backup
and then I'd also have to find out from which filenumber the logfile
backup would start. Another thing that I don't like about having many
backups in one file, is when the backups starts to get too big. In that
case you suddenly get some quite big backup files that can be a pain to
"administer". The backup of one of our databases are currently around 85
GB and if you have a number of these in the same file, it will easily
get quite "un-handy".
I think the biggest advantage of having several files in one backup
file, is that it's easier to let SQL server delete old backups in the
file. If you have seperate files with naming by date, you'll have to do
some scripting to delete the files.
Regards
Steen Schlüter Persson
Databaseadministrator / Systemadministrator
--070701000301070106090101
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:davconts@.gmail.com">davconts@.gmail.com</a> wrote:
<blockquote
cite="mid1151992078.629506.142340@.p79g2000cwp.googlegroups.com"
type="cite">
<pre wrap="">Hi all,
Our client wants some guidance on how to handle backup files created by
SQL Server 2005 for our product.
I was thinking that we would create
1) a nightly backup to say e:\backup
2) create a transaction log backup every hour to e:\backup
Now is it best to create a new file each time - or is it best to
overwrite the original file?
Reason I ask is the client will need to them back these files up to an
external tape drive.
It will probably be easier for them if they have the same 20+ files
each time (ie. one full backup, and hourly transaction files)
If the filenames incremented, then they would need to delete older
files that have been backed up (which can invite user error)
What are peoples opinions on this? Is there a "good way" to do this'
Cheers
David
</pre>
</blockquote>
<font size="-1"><font face="Arial">Hi David<br>
<br>
I don't think there's a single "good way" to do it. It pretty much
depends on personal preferences and I don't think one mtethod is better
than others.<br>
Bottomline is that no matter how you decide to do it, it will require
some degree of knowledge on how it works in order to maintain it and
restore a backup in case of a failure.<br>
I prefer to only have one backup in each file and then name the files
with a name that are composed by date and a forth running number( for
the log files). This is because I like to know that each file only
contains one backup so when I need to restore I have to find the full
backup file and then the corresponding logfile 1, 2, 3... up to the
point in time I need. If I had more backups in the same file, I'd first
have to find out which file number I had to restore for the fulle
backup and then I'd also have to find out from which filenumber the
logfile backup would start. Another thing that I don't like about
having many backups in one file, is when the backups starts to get too
big. In that case you suddenly get some quite big backup files that can
be a pain to "administer". The backup of one of our databases are
currently around 85 GB and if you have a number of these in the same
file, it will easily get quite "un-handy".<br>
I think the biggest advantage of having several files in one backup
file, is that it's easier to let SQL server delete old backups in the
file. If you have seperate files with naming by date, you'll have to do
some scripting to delete the files.<br>
<br>
<br>
-- <br>
Regards<br>
Steen Schlüter Persson<br>
Databaseadministrator / Systemadministrator<br>
<br>
</font></font>
</body>
</html>
--070701000301070106090101--|||In addition to the other posts:
I agree that there is no "best way" for this. Understand the backup command and the options (mainly
INIT and NOINIT). Then you can consider:
Maintenance plans (to do backups). It creates a new file for each time a backup is taken and also
remove files older than X days.
Do above with your own TSQL code. This opens the ability for further customization.
Have several backups on same file. For instance, have a Monday backup file which you backup to on
Mondays and overwrite each time. This will give you 7 days worth of backup generations. Or some
variation of this. One advantage is reduced number of files. Just make sure that the people doing
restore know about RESTORE HEADERONLY and FILELISTONY and the FILE option.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<davconts@.gmail.com> wrote in message news:1151992078.629506.142340@.p79g2000cwp.googlegroups.com...
> Hi all,
> Our client wants some guidance on how to handle backup files created by
> SQL Server 2005 for our product.
> I was thinking that we would create
> 1) a nightly backup to say e:\backup
> 2) create a transaction log backup every hour to e:\backup
> Now is it best to create a new file each time - or is it best to
> overwrite the original file?
> Reason I ask is the client will need to them back these files up to an
> external tape drive.
> It will probably be easier for them if they have the same 20+ files
> each time (ie. one full backup, and hourly transaction files)
> If the filenames incremented, then they would need to delete older
> files that have been backed up (which can invite user error)
> What are peoples opinions on this? Is there a "good way" to do this'
> Cheers
> David
>

Advice on how to handle backup files

Hi all,
Our client wants some guidance on how to handle backup files created by
SQL Server 2005 for our product.
I was thinking that we would create
1) a nightly backup to say e:\backup
2) create a transaction log backup every hour to e:\backup
Now is it best to create a new file each time - or is it best to
overwrite the original file?
Reason I ask is the client will need to them back these files up to an
external tape drive.
It will probably be easier for them if they have the same 20+ files
each time (ie. one full backup, and hourly transaction files)
If the filenames incremented, then they would need to delete older
files that have been backed up (which can invite user error)
What are peoples opinions on this? Is there a "good way" to do this'
Cheers
DavidHi
Well, in our shop we do a full backup every night to c:\ and log backup
every 15 minutes to d:\
A log file may contain many files so you'll need to specify i like
drop database test
go
create database test
GO
create table test..test(id int identity)
insert test..test default values
backup database test to disk = 'd:\db.bak' WITH INIT
insert test..test default values
backup log test to disk = 'd:\log.bak'WITH INIT
insert test..test default values
backup log test to disk = 'd:\log.bak' WITH NOINIT
GO
RESTORE DATABASE test FROM disk = 'd:\db.bak' WITH FILE = 1, norecovery
RESTORE LOG test FROM disk = 'd:\log.bak' WITH FILE = 1, norecovery
RESTORE LOG test FROM disk = 'd:\log.bak' WITH FILE = 2, recovery
...............
.............
<davconts@.gmail.com> wrote in message
news:1151992078.629506.142340@.p79g2000cwp.googlegroups.com...
> Hi all,
> Our client wants some guidance on how to handle backup files created by
> SQL Server 2005 for our product.
> I was thinking that we would create
> 1) a nightly backup to say e:\backup
> 2) create a transaction log backup every hour to e:\backup
> Now is it best to create a new file each time - or is it best to
> overwrite the original file?
> Reason I ask is the client will need to them back these files up to an
> external tape drive.
> It will probably be easier for them if they have the same 20+ files
> each time (ie. one full backup, and hourly transaction files)
> If the filenames incremented, then they would need to delete older
> files that have been backed up (which can invite user error)
> What are peoples opinions on this? Is there a "good way" to do this'
> Cheers
> David
>|||davconts@.gmail.com wrote:
> Hi all,
> Our client wants some guidance on how to handle backup files created by
> SQL Server 2005 for our product.
> I was thinking that we would create
> 1) a nightly backup to say e:\backup
> 2) create a transaction log backup every hour to e:\backup
> Now is it best to create a new file each time - or is it best to
> overwrite the original file?
> Reason I ask is the client will need to them back these files up to an
> external tape drive.
> It will probably be easier for them if they have the same 20+ files
> each time (ie. one full backup, and hourly transaction files)
> If the filenames incremented, then they would need to delete older
> files that have been backed up (which can invite user error)
> What are peoples opinions on this? Is there a "good way" to do this'
> Cheers
> David
>
Hi David
I don't think there's a single "good way" to do it. It pretty much
depends on personal preferences and I don't think one mtethod is better
than others.
Bottomline is that no matter how you decide to do it, it will require
some degree of knowledge on how it works in order to maintain it and
restore a backup in case of a failure.
I prefer to only have one backup in each file and then name the files
with a name that are composed by date and a forth running number( for
the log files). This is because I like to know that each file only
contains one backup so when I need to restore I have to find the full
backup file and then the corresponding logfile 1, 2, 3... up to the
point in time I need. If I had more backups in the same file, I'd first
have to find out which file number I had to restore for the fulle backup
and then I'd also have to find out from which filenumber the logfile
backup would start. Another thing that I don't like about having many
backups in one file, is when the backups starts to get too big. In that
case you suddenly get some quite big backup files that can be a pain to
"administer". The backup of one of our databases are currently around 85
GB and if you have a number of these in the same file, it will easily
get quite "un-handy".
I think the biggest advantage of having several files in one backup
file, is that it's easier to let SQL server delete old backups in the
file. If you have seperate files with naming by date, you'll have to do
some scripting to delete the files.
Regards
Steen Schlter Persson
Databaseadministrator / Systemadministrator|||In addition to the other posts:
I agree that there is no "best way" for this. Understand the backup command
and the options (mainly
INIT and NOINIT). Then you can consider:
Maintenance plans (to do backups). It creates a new file for each time a bac
kup is taken and also
remove files older than X days.
Do above with your own TSQL code. This opens the ability for further customi
zation.
Have several backups on same file. For instance, have a Monday backup file w
hich you backup to on
Mondays and overwrite each time. This will give you 7 days worth of backup g
enerations. Or some
variation of this. One advantage is reduced number of files. Just make sure
that the people doing
restore know about RESTORE HEADERONLY and FILELISTONY and the FILE option.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<davconts@.gmail.com> wrote in message news:1151992078.629506.142340@.p79g2000cwp.googlegroups
.com...
> Hi all,
> Our client wants some guidance on how to handle backup files created by
> SQL Server 2005 for our product.
> I was thinking that we would create
> 1) a nightly backup to say e:\backup
> 2) create a transaction log backup every hour to e:\backup
> Now is it best to create a new file each time - or is it best to
> overwrite the original file?
> Reason I ask is the client will need to them back these files up to an
> external tape drive.
> It will probably be easier for them if they have the same 20+ files
> each time (ie. one full backup, and hourly transaction files)
> If the filenames incremented, then they would need to delete older
> files that have been backed up (which can invite user error)
> What are peoples opinions on this? Is there a "good way" to do this'
> Cheers
> David
>

Advice on dynamically generating RDL files

I would prefer to dynamically create my RDL files on the fly instead of
building them ahead of time. My question is this: the creation of these files
would occur on the server, but the reporting server may or may not be the
same box. Is the best way to upload the RDL file to use the web service
interface and import it, or are there other options here?
Thanks!
MichaelHi moflaherty,
You can create your RDL on the fly, the creation of the files can be
located at the client or server side, it does not matter as long you can
create the XML/RDL after that you can use the WS interface to upload them
into the server. In this example
http://www.rdlcomponents.com/ASPExamples/Default.aspx?sm=b1_a
You can see how the RDL creation process is isolated from the upload process.
Thanks
JErry
"moflaherty" wrote:
> I would prefer to dynamically create my RDL files on the fly instead of
> building them ahead of time. My question is this: the creation of these files
> would occur on the server, but the reporting server may or may not be the
> same box. Is the best way to upload the RDL file to use the web service
> interface and import it, or are there other options here?
> Thanks!
> Michael
>sql

Sunday, March 25, 2012

advice

hey all,
does sql batch files allow you to have transactions? i'm trying to update 3
tables in a sql batch file and was wondering if this was a good idea or
should i just use stored procedure?
thanks,
ariari wrote:
> hey all,
> does sql batch files allow you to have transactions? i'm trying to
> update 3 tables in a sql batch file and was wondering if this was a
> good idea or should i just use stored procedure?
> thanks,
> ari
Sure you can use transactions. Just add BEGIN TRAN / COMMIT TRAN /
ROLLBACK to the batch where needed.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||this helped, thank you.
"David Gugick" wrote:

> ari wrote:
> Sure you can use transactions. Just add BEGIN TRAN / COMMIT TRAN /
> ROLLBACK to the batch where needed.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
>

Thursday, March 22, 2012

AdventureWorks Report Samples Problem

Hi,
I am trying to deploy the AdventureWorks OLAP cube in C:\Program
Files\Microsoft SQL Server\90\Tools\Samples\AdventureWorks Analysis Services
Project but unfortunately the folder "AdventureWorks Analysis Services
Project" does not exist nor does the file Adventure Works DW.dwproj. I have
installed the samples using the Microsoft SQL Server 2005 Samples installer.
Where can I find this directory and project?
Kind regards,
TrevorHi Trevor,
Welcome to use MSDN Managed Newsgroup!
From your descriptions, I understood you would like to launch
AdventureWorks Analysis Services Project but cannot find it in the
identified folder. If I have misunderstood your concern, please feel free
to point it out.
Based on my knowledge, please perform the steps below to make sure you have
installed AdventureWorksDW sample datawarehouse and AdventureWorks Sample
OLAP.
- Open Add or remove Programs in Control Panel
- Select Microsoft SQL Server 2005, click Change
- Select Workstation Components under SQL Server 2005 common components,
click Next
- After System Configuration Check, click Next.
- Click Change Installed Components
- Expand Documentation, Samples and Sample Databases, Expand Sample
Databases, Expand AdventureWorksDW Sample Data Warehouse. Make sure
everything was selected and then click Next
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.

AdventureWorks Install

I am using sqlserver 2005 express edition and have downloaded the
AdventureWorksDB.msi. I have installed it and it created 3 files:
AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~ 164MB) and
AdventureWorks_log.idf (~1MB). When I added the database to the sqlserver,
no tables appear under system tables. Is there something I am missing here?No, it's normal in SQL Server 2005. System tables are hidden and you can't
see or modify them directly.
--
Regards
Pawel Potasinski
U¿ytkownik "Richard" <rich_a_wms@.yahoo.com> napisa³ w wiadomo¶ci
news:u4xAciayHHA.748@.TK2MSFTNGP04.phx.gbl...
>I am using sqlserver 2005 express edition and have downloaded the
> AdventureWorksDB.msi. I have installed it and it created 3 files:
> AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~ 164MB) and
> AdventureWorks_log.idf (~1MB). When I added the database to the sqlserver,
> no tables appear under system tables. Is there something I am missing
> here?
>
>|||I have another DB (storeDB) on the server and I am able to see all the
tables under Databases > System Databases > storeDB > Tables > System
Tables, but I am unable to see the System Tables under AdventureWorks. I am
going through the tutorial and it's asking me to create the following query:
SELECT * FROM Production.Product;
GO
and I receive this error message:
Msg 208, Level 16, State 1, Line 1
Invalid object name 'Production.Product'.
I have a connection the AdventureWorks DB. I'm obviously new to SQL Server
2005.
Any help would be appreciated.
Regards, Richard
"Pawel Potasinski" <pawel.potasinski@.gmail.com> wrote in message
news:OLCmDdcyHHA.1776@.TK2MSFTNGP03.phx.gbl...
> No, it's normal in SQL Server 2005. System tables are hidden and you can't
> see or modify them directly.
> --
> Regards
> Pawel Potasinski
>
> U¿ytkownik "Richard" <rich_a_wms@.yahoo.com> napisa³ w wiadomo¶ci
> news:u4xAciayHHA.748@.TK2MSFTNGP04.phx.gbl...
>>I am using sqlserver 2005 express edition and have downloaded the
>> AdventureWorksDB.msi. I have installed it and it created 3 files:
>> AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~ 164MB) and
>> AdventureWorks_log.idf (~1MB). When I added the database to the
>> sqlserver,
>> no tables appear under system tables. Is there something I am missing
>> here?
>>
>|||On Thu, 19 Jul 2007 12:53:50 -0700, Richard wrote:
> I have another DB (storeDB) on the server and I am able to see all the
> tables under Databases > System Databases > storeDB > Tables > System
> Tables, but I am unable to see the System Tables under AdventureWorks. I am
> going through the tutorial and it's asking me to create the following query:
> SELECT * FROM Production.Product;
> GO
> and I receive this error message:
> Msg 208, Level 16, State 1, Line 1
> Invalid object name 'Production.Product'.
> I have a connection the AdventureWorks DB. I'm obviously new to SQL Server
> 2005.
> Any help would be appreciated.
> Regards, Richard
> "Pawel Potasinski" <pawel.potasinski@.gmail.com> wrote in message
> news:OLCmDdcyHHA.1776@.TK2MSFTNGP03.phx.gbl...
>> No, it's normal in SQL Server 2005. System tables are hidden and you can't
>> see or modify them directly.
>> --
>> Regards
>> Pawel Potasinski
>>
>> U¿ytkownik "Richard" <rich_a_wms@.yahoo.com> napisa³ w wiadomo¶ci
>> news:u4xAciayHHA.748@.TK2MSFTNGP04.phx.gbl...
>>I am using sqlserver 2005 express edition and have downloaded the
>> AdventureWorksDB.msi. I have installed it and it created 3 files:
>> AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~ 164MB) and
>> AdventureWorks_log.idf (~1MB). When I added the database to the
>> sqlserver,
>> no tables appear under system tables. Is there something I am missing
>> here?
>>
>>
Looks like a permissions issue. If you are just testing, make your account
you log in as a Server Role of Sysadmin (God-level rights).
Chuck Lathrope
www.sqlwebpedia.com|||Thanks, I changed permissions, but I still can't see the tables. The strange
thing is that there are 3 files in the Data folder under the MSSQL folder
for AdventureWorks: AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~
164MB) and AdventureWorks_log.idf (~1MB). The other DB's on the server only
have 2 files (.mdf and .idf) for each database. There are no _Data.mdf
files.
Regards, Richard
"Chuck Lathrope" <computerguy_chuck@.fixmehotmail.com> wrote in message
news:rugaxfto4xox$.1xm17ldm6wy7j$.dlg@.40tude.net...
> On Thu, 19 Jul 2007 12:53:50 -0700, Richard wrote:
>> I have another DB (storeDB) on the server and I am able to see all the
>> tables under Databases > System Databases > storeDB > Tables > System
>> Tables, but I am unable to see the System Tables under AdventureWorks. I
>> am
>> going through the tutorial and it's asking me to create the following
>> query:
>> SELECT * FROM Production.Product;
>> GO
>> and I receive this error message:
>> Msg 208, Level 16, State 1, Line 1
>> Invalid object name 'Production.Product'.
>> I have a connection the AdventureWorks DB. I'm obviously new to SQL
>> Server
>> 2005.
>> Any help would be appreciated.
>> Regards, Richard
>> "Pawel Potasinski" <pawel.potasinski@.gmail.com> wrote in message
>> news:OLCmDdcyHHA.1776@.TK2MSFTNGP03.phx.gbl...
>> No, it's normal in SQL Server 2005. System tables are hidden and you
>> can't
>> see or modify them directly.
>> --
>> Regards
>> Pawel Potasinski
>>
>> U¿ytkownik "Richard" <rich_a_wms@.yahoo.com> napisa³ w wiadomo¶ci
>> news:u4xAciayHHA.748@.TK2MSFTNGP04.phx.gbl...
>>I am using sqlserver 2005 express edition and have downloaded the
>> AdventureWorksDB.msi. I have installed it and it created 3 files:
>> AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~ 164MB) and
>> AdventureWorks_log.idf (~1MB). When I added the database to the
>> sqlserver,
>> no tables appear under system tables. Is there something I am missing
>> here?
>>
>>
> Looks like a permissions issue. If you are just testing, make your account
> you log in as a Server Role of Sysadmin (God-level rights).
> Chuck Lathrope
> www.sqlwebpedia.com

Adventureworks db

I installed adventureworks db onto sqlExpress. It does not show up althought it is in the:

C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

I look up the database in the Microsoft SQL Server Management Studio Express, But it's not visible. I've turned the service off andon, but it still is not available. Any ideas what has happened.

john welte

The installation of the sample database does not mean that you attached it for use in SQL Server. You will need to use the sp_attach procedure or the command which can be found in Management Studio under Right click the Server > Attach Database > specify the location and the name of the database file > Done :-)

HTH; Jens Suessmeyer.

http://www.sqlserver2005.de

AdventureWorks database question

How can I install theAdventureWorks database on my box where C:\Program Files\Microsoft SQL Server\90\Tools\Samples\ is missing? My SQL 2005 is currently without AdventureWorks OLT. I downloaded the Enterprise trial before uninstalling SQL2005Express. Please help. Thanks.

It looks like the AdventureWorks database can be downloadedhere.

HTH,
Ryan

|||

As I did the following:

exec

sp_attach_db @.dbname=N'AdventureWorks', @.filename1=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf', @.filename2=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldf'

Here's what came back:

Msg 1813, Level 16, State 2, Line 1

Could not open new database 'AdventureWorks'. CREATE DATABASE is aborted.

Msg 602, Level 21, State 50, Line 1

Could not find row in sysindexes for database ID 24, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes.

What's wrong here?

Any help is greatly appreciated.

|||

Find instawdb.sql and execute it. This will open "SQL server manegament studio. Enter localhost for servername then click connect. On the sql editor toolbar click execute. wait until get the message "database installed succesfully" in the status bar.

|||

When I do that I get the following error messages:

Microsoft SQL Server 2000 - 8.00.194 (Intel X86)

Aug 6 2000 00:57:48

Copyright (c) 1988-2000 Microsoft Corporation

Personal Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

*** Dropping Database

Msg 208, Level 16, State 1, Line 2

Invalid object name 'master.sys.databases'.

*** Creating Database

Msg 208, Level 16, State 1, Line 5

Invalid object name 'master.sys.master_files'.

Msg 102, Level 15, State 6, Line 11

Incorrect syntax near 'CHECKSUM'.

Msg 911, Level 16, State 1, Line 2

Could not locate entry in sysdatabases for database 'AdventureWorksDW'. No entry found with that name. Make sure that the name is entered correctly.

*** Creating DDL Trigger for Database

Msg 170, Level 15, State 1, Line 9

Line 9: Incorrect syntax near 'max'.

Msg 156, Level 15, State 1, Procedure ddlDatabaseTriggerLog, Line 3

Incorrect syntax near the keyword 'DATABASE'.

Msg 195, Level 15, State 10, Procedure ddlDatabaseTriggerLog, Line 14

'EVENTDATA' is not a recognized function name.

Msg 170, Level 15, State 1, Procedure ddlDatabaseTriggerLog, Line 15

Line 15: Incorrect syntax near '.'.

Msg 170, Level 15, State 1, Procedure ddlDatabaseTriggerLog, Line 16

Line 16: Incorrect syntax near '.'.

Msg 170, Level 15, State 1, Procedure ddlDatabaseTriggerLog, Line 17

Line 17: Incorrect syntax near '.'.

Msg 170, Level 15, State 1, Procedure ddlDatabaseTriggerLog, Line 25

Line 25: Incorrect syntax near 'max'.

Msg 170, Level 15, State 1, Procedure ddlDatabaseTriggerLog, Line 44

Line 44: Incorrect syntax near '.'.

*** Creating Tables

Msg 2714, Level 16, State 6, Line 2

There is already an object named 'AdventureWorksDWBuildVersion' in the database.

Msg 170, Level 15, State 1, Line 80

Line 80: Incorrect syntax near 'max'.

*** Loading Data

Msg 208, Level 16, State 1, Line 6

Invalid object name 'master.sys.master_files'.

Msg 1779, Level 16, State 0, Line 2

Table 'DimAccount' already has a primary key defined on it.

Msg 1750, Level 16, State 0, Line 2

Could not create constraint. See previous errors.

Msg 1913, Level 16, State 1, Line 2

There is already an index on table 'DimAccount' named 'AK_DimAccount_AccountCodeAlternateKey'.

*** Creating Foreign Key Constraints

Msg 2714, Level 16, State 4, Line 2

There is already an object named 'FK_DimAccount_DimAccount' in the database.

Msg 1750, Level 16, State 0, Line 2

Could not create constraint. See previous errors.

*** Creating Table Views

Msg 170, Level 15, State 1, Procedure vDMPrep, Line 48

Line 48: Incorrect syntax near ';'.

Msg 170, Level 15, State 1, Procedure vTimeSeries, Line 41

Line 41: Incorrect syntax near ';'.

Msg 170, Level 15, State 1, Procedure vTargetMail, Line 62

Line 62: Incorrect syntax near ';'.

Msg 208, Level 16, State 1, Procedure vAssocSeqOrders, Line 7

Invalid object name 'dbo.vDMPrep'.

Msg 170, Level 15, State 1, Procedure vAssocSeqLineItems, Line 12

Line 12: Incorrect syntax near ';'.

*** Creating Functions

Msg 2714, Level 16, State 5, Procedure udfMinimumDate, Line 15

There is already an object named 'udfMinimumDate' in the database.

*** Disabling DDL Trigger for Database

Msg 156, Level 15, State 1, Line 2

Incorrect syntax near the keyword 'TRIGGER'.

*** Changing File Growth Values for Database

Msg 911, Level 16, State 1, Line 2

Could not locate entry in sysdatabases for database 'AdventureWorksDW'. No entry found with that name. Make sure that the name is entered correctly.

*** Shrinking Database

Msg 2520, Level 16, State 12, Line 2

Could not find database 'AdventureWorksDW'. Check sysdatabases.

DBCC execution completed. If DBCC printed error messages, contact your system administrator.

And on that download link none of those will install either, they installation stops with an error.

AdventureWorks database not seen by Management Studio Express CTP

When I install AdventureWorks.db for SQL Express, it runs without errors. The database files (data and logs) are in the SQL Express 2005 data directory. However, I can not see the database in Managment Studio Express CTP. I've tried repairing and uninstall/install again. Does not help.

I have SQL Express 2005 cleanly installed. I have the pubs and Northwinds databases cleanly installed. (I was able to execute the queries that came for installing these). I can see both pubs and Northwinds in Management Studio Express CTP.

Any suggestions?

You won′t be able to see them if you don′t have permissions to the database itself, did you connect to database with the same credentials as you connected as you executed the queries that you mentioned ?

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||

Yes, I did connect with the same credentials.

Also, the AdventureWorks did not come with a query like the pubs and Northwind databases. It just comes as a self-installing file. So I didn't have to open it in Mgmt Studio and execute it. It just installs and says it was successful when done.

|||

You must attach the files to an instance of SQL Server Express.

Execute the following script to identify the directory where the master database file is located.

select physical_name from sys.database_files where name = 'master'

Then, execute a similar script to attach the files.

exec sp_attach_db @.dbname=N'AdventureWorks', @.filename1=N'c:\Programas\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\AdventureWorks_Data.mdf', @.filename2=N'c:\Programas\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\AdventureWorks_log.ldf'

Regards.

|||I did all above and still did not see it in the list.|||

hi,

you mean you executed the attach statement with no exception raised and you can't see the database in the list of registered databases even after a refresh of the list (rx click the database node, refresh)?

regards

|||

Hi there.

When you start SQL Management Studio Express, right click on Databases and click add in the Attach Databases window that opens. This will open the directory tree on your system and it will default to the Data directory where the AdventureWorks database is installed by default. You should see it in the window. Select it and click OK. It will then appear in the Attach Databases window so click OK again.

You may have to refresh the Object Explorer window, and then the database will show up in your list of databases. Hope that helps.

Graham.

AdventureWorks database not seen by Management Studio Express CTP

When I install AdventureWorks.db for SQL Express, it runs without errors. The database files (data and logs) are in the SQL Express 2005 data directory. However, I can not see the database in Managment Studio Express CTP. I've tried repairing and uninstall/install again. Does not help.

I have SQL Express 2005 cleanly installed. I have the pubs and Northwinds databases cleanly installed. (I was able to execute the queries that came for installing these). I can see both pubs and Northwinds in Management Studio Express CTP.

Any suggestions?

You won′t be able to see them if you don′t have permissions to the database itself, did you connect to database with the same credentials as you connected as you executed the queries that you mentioned ?

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||

Yes, I did connect with the same credentials.

Also, the AdventureWorks did not come with a query like the pubs and Northwind databases. It just comes as a self-installing file. So I didn't have to open it in Mgmt Studio and execute it. It just installs and says it was successful when done.

|||

You must attach the files to an instance of SQL Server Express.

Execute the following script to identify the directory where the master database file is located.

select physical_name from sys.database_files where name = 'master'

Then, execute a similar script to attach the files.

exec sp_attach_db @.dbname=N'AdventureWorks', @.filename1=N'c:\Programas\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\AdventureWorks_Data.mdf', @.filename2=N'c:\Programas\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\AdventureWorks_log.ldf'

Regards.

|||I did all above and still did not see it in the list.|||

hi,

you mean you executed the attach statement with no exception raised and you can't see the database in the list of registered databases even after a refresh of the list (rx click the database node, refresh)?

regards

|||

Hi there.

When you start SQL Management Studio Express, right click on Databases and click add in the Attach Databases window that opens. This will open the directory tree on your system and it will default to the Data directory where the AdventureWorks database is installed by default. You should see it in the window. Select it and click OK. It will then appear in the Attach Databases window so click OK again.

You may have to refresh the Object Explorer window, and then the database will show up in your list of databases. Hope that helps.

Graham.

Thursday, March 8, 2012

ADP files?

Hi,
I just upsized my Access 2000 database to MSDE (which I intend to upsize
to SQL Server in a few ws) and got a .adp file from a .mdb file. How
do I connect to this .adp file from Visual Basic? Can I distribute this
file easily like Access? Please help, I have no idea what to do with
MSDE and how to connect DSN-LESSly to this file.
regards,
Steve"Steve" <stephen@.anu.edu.au> schrieb im Newsbeitrag
news:%23dm9qBUUFHA.3312@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I just upsized my Access 2000 database to MSDE (which I intend to upsize
> to SQL Server in a few ws) and got a .adp file from a .mdb file. How do
> I connect to this .adp file from Visual Basic? Can I distribute this file
> easily like Access? Please help, I have no idea what to do with MSDE and
> how to connect DSN-LESSly to this file.
>
> regards,
> Steve|||You can easily share that file, but would i make sense ? (There must be
alway a connetion between ADP and aAccess to get the data from the MSDE)
Wouldnt that be a better way just to make your way directly to SQL Server ?
Or do you need some special features (Form, Reports) from Access ?
Jens Suessmeyer.
"Steve" <stephen@.anu.edu.au> schrieb im Newsbeitrag
news:%23dm9qBUUFHA.3312@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I just upsized my Access 2000 database to MSDE (which I intend to upsize
> to SQL Server in a few ws) and got a .adp file from a .mdb file. How do
> I connect to this .adp file from Visual Basic? Can I distribute this file
> easily like Access? Please help, I have no idea what to do with MSDE and
> how to connect DSN-LESSly to this file.
>
> regards,
> Steve

Tuesday, March 6, 2012

ADP , MDB help

I hv adp and mdb files. When i double click them they oppen as application. But i wanna open them in design mode so that i could see whats in thr.
Is there any special key combination...
plz tell
thxi think it was hold down shift and double click but I do not encourage that kind of behavoir. I always used to compile mine before I gave them out to people but that changes the file extension.|||I have tried this so many times but it is not working
any other way...|||thx its workng now...

Sunday, February 19, 2012

ADO Recordset from SQL Task issue

Dear Folks,
I have a Foreach Loop that enumerates a set of files from an ADO recordset variable which is populated by a preceding SQL task. The query from the task that populates the recordset returns about 200 rows with one varchar field(a file path). The loop is long running, and so far it errors on the connection string populated by the enumeration variable after about an hour. The timeout for the SQL task is set to zero. Could it be the source recordset variable timing out, or could it be that the recordset is too large?
Thanks,
Chris

If it is related to the number of records you could start by limiting the result to 10 records, and add 10 records until you see the problem again.

Also, do you have the latest service pack? Here's a post concerning an issue prior to the service pack.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=277765&SiteID=1

|||

200 rows is not too large for a recordset.

I am confused. the sql task populates the recordset and the for each loop enumerates the results. I assume that the sql task is outside (before) the loop. so, which is taking a long time? executing the sql command or running over the recordset in the loop?

|||Thanks

for the replies, and yes, the SQL Task populates the ADO recordset

variable before the loop. The loop enumerates the results for about an

hour before it errors out. The error is the same every time, reporting

that the connection string has failed to have been acquired. The

variable for the connection string is populated by enumerating the

recordset. If i change the loop's collection enumerator to a directory,

the loop runs fine.
Thanks for your help,
Chris
|||I'm on a SQL Server 2k5 x86 ,SP1, windows 2000 platform if that helps.
Thanks,
Chris
|||Also, It's definitely not the recordset itself, as I've been able to use the same ADO variable result set to enumerate loops with fewer tasks\are shorter running. Any chance this is a memory leak?
|||

Well, what are you doing with the rows from the recordset? I think the enumerator gives you a fields collection.

in other words, what is in the loop

|||The (one field per) rows from the recordset enumerate the collection, a directory of Access databases. Inside the Foreach loop are several data flow tasks. A variable is mapped from the returned row and helps populate a connection string expression for an Access connection manager. The source connection for each data flow task uses the connection manager. It works great for about an hour when i use the recordset as a collection enumerator, and the loop does not error out if I use the directory as a collection enumerator.
Thanks,
Chris
|||

This is odd. there certainly could be a bug somewhere in the recordset object itself (in the interest of full disclosure, I wrote the code for the ADO Recordset object back in '96 :) )

If you don't mind doing some experiments for me, I would ask you to try to separate the recordset usage from the pipeline usage as a way to try to narrow down the problem. it sounds like you have done this a bit.

instead of a dataflow task, put a script task in the loop. extract the value of the connection string and write it out somewhere so that you can see the values and make sure they all look rational. If this loop completes without error, then add some long delay (like a 5 minute wait) into the script task. this will tell us if their is some purely time related issue with the recordset (doubtful, but who knows could be a garbage collector kicking in and dropping references to the com objects of the recordset? crazy i know).

You say you can use a non-recordset list of the same exact connections and get this to succeed? that makes me think that this is not an issue with the access driver, but who knows. Exactly what error are you getting when it fails?

These two things just don't seem related.

Thursday, February 9, 2012

AdjustTokenPrivileges () failed

I have an SSIS package that parses a text file into 3 smaller text files and then takes the data and puts it into tables. The package runs fine up to the point where it needs to insert the data. I turned logging on but no errors are generated. But I do get a file named SQLDUMPER_ERRORLOG.log that is generated with the info below. Any ideas of where to look?

11/16/06 13:31:38, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges () failed (00000514)

11/16/06 13:31:38, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters:

4 supplied

11/16/06 13:31:38, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID =

1844

11/16/06 13:31:38, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0

11/16/06 13:31:38, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0

11/16/06 13:31:38, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags

= 0x0

11/16/06 13:31:38, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr =

0x0100C5D0

11/16/06 13:31:38, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir =

<NULL>

11/16/06 13:31:38, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr = 0x00000000

11/16/06 13:31:38, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr =

0x00000000

11/16/06 13:31:38, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile =

<NULL>

11/16/06 13:31:38, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName =

<NULL>

11/16/06 13:31:38, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName =

<NULL>

11/16/06 13:31:38, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not used

11/16/06 13:31:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not used

11/16/06 13:31:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump

completed: C:\Program Files\Microsoft SQL Server\90\Shared\ErrorDumps\SQLDmpr0033.mdmp

11/16/06 13:31:43, ACTION, DtsDebugHost.exe, Watson Invoke: No

11/16/06 13:31:43, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges () failed (00000514)

11/16/06 13:31:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters:

4 supplied

11/16/06 13:31:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID =

1844

11/16/06 13:31:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0

11/16/06 13:31:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0

11/16/06 13:31:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags

= 0x0

11/16/06 13:31:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr =

0x0100C5D0

11/16/06 13:31:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir =

<NULL>

11/16/06 13:31:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr = 0x00000000

11/16/06 13:31:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr =

0x00000000

11/16/06 13:31:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile =

<NULL>

11/16/06 13:31:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName =

<NULL>

11/16/06 13:31:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName =

<NULL>

11/16/06 13:31:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not used

11/16/06 13:31:44, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpWriteDump

() Failed 0x80070005 - Access is denied.

11/16/06 13:31:44, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Watson Invoke: No

Do you have anything in your Windows Event log that might indicate a better error?

Also, how are you authenticating to the databases? SQL Server users? Active Directory?

I'm just blurting out stuff to check, I guess.

Phil|||Also, you didn't need to start this thread when you replied to the other one. We don't need two threads about the same topic. Having more than one thread only makes it cumbersome to help you.|||

Nothing in the Application Log. I've tried authentication using windows auth and sql auth both result in the same error.

I was using an OLE DB Destination and I changed it to a SQL Server Destination which got rid of the error above but presented another. I still believe OLE DB Destination should work though.

I should add that I can run the package from my machine without a problem. But whenever I try to run it from the server It will be scheduled on is when I have the problem