Showing posts with label message. Show all posts
Showing posts with label message. Show all posts

Thursday, March 29, 2012

Database state loading after restore.

Hi,
I have sql server 2000 running on windows 2003 clusters. While i
tried to restore the database i got the message that The restore
operation was successful. But still the database is showing state
"Loading."
I restored the database with recovery (Leave database opeational in
EM). I kept the database for a day and it shows still status as
"Loading".
Any help for this is highly appreciated.
Regards,
Jay
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!Are you sure it is not only a refers issue in EM? Did you try below:
RESTORE DATABASE dbname WITH RECOVERY
And if you try above, what messages do you get?
Also, if you open QA and say "USE dbname", any errors?
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Jigar Patel" <jigar_pcs@.rediffmail.com> wrote in message
news:uCLjUt4rDHA.2828@.tk2msftngp13.phx.gbl...
> Hi,
> I have sql server 2000 running on windows 2003 clusters. While i
> tried to restore the database i got the message that The restore
> operation was successful. But still the database is showing state
> "Loading."
> I restored the database with recovery (Leave database opeational in
> EM). I kept the database for a day and it shows still status as
> "Loading".
> Any help for this is highly appreciated.
> Regards,
> Jay
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!|||I am sure as i have done this operation for atleast 15 times as of now.
I tried everything.
When i try to use
Use Database
Go
The message comes saying the database is still loading is not available.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||So what errors/messages do you get from the below command?
RESTORE DATABASE dbname WITH RECOVERY
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Jigar Patel" <jigar_pcs@.rediffmail.com> wrote in message
news:uovOaN7rDHA.2360@.TK2MSFTNGP09.phx.gbl...
> I am sure as i have done this operation for atleast 15 times as of now.
> I tried everything.
> When i try to use
> Use Database
> Go
> The message comes saying the database is still loading is not available.
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Database spanning multiple partitions.....help

I posted a message earlier, thinking I knew the how. However I didn't
Cany anyone tell me how to change an existing database that exists on an H:
drive to span across another partition of say an I: .
My idea is this, the database is growing. We expanded the mirrored hard
drives from 70gb to 140gb. Now we have an additional amount of unused
space. I formatted the new partition and gave it an I: name.
I thought you could give the database a "Secondary" location. I thought
this meant that if the database filled up my H: drive, then it would
automatically start writing to the I: drive. Is this the case? If so, ho
w
can I set it up?
Thanks for any help
GordonYou thought wrong Gordon<g>. You would be better off to change the original
partition to the full size of the new drives and not have to worry about
splitting them up. Since the two partitions are on the same drive array
there is no performance gain in splitting them. You can add a new file to
the existing file group on the new partition but what will happen is this.
SQL Server uses a proportional fill algorithm to fill the files within the
filegroup. This is based on the amount of free space in each file. Ideally
you start with multiple files that are empty and sql server will fill them
equally as it inserts new rows. In your case if you simply add a new file
there will be some data written to the new file and some to the old. The
ratio depends on the amount of free space in each file. When filling in
disproportion like that it will cause more reads and writes to one file vs
spreading evenly over all of them. While you can do what you are after you
need to realize this is not going to work the way you thought. I recommend
you repartition the drive to make it one large partition instead of two
smaller ones.
Andrew J. Kelly SQL MVP
"Gordon" <Gordon@.discussions.microsoft.com> wrote in message
news:90E69280-63BF-4BA8-8F73-584C9534B06E@.microsoft.com...
>I posted a message earlier, thinking I knew the how. However I didn't
> Cany anyone tell me how to change an existing database that exists on an
> H:
> drive to span across another partition of say an I: .
> My idea is this, the database is growing. We expanded the mirrored hard
> drives from 70gb to 140gb. Now we have an additional amount of unused
> space. I formatted the new partition and gave it an I: name.
> I thought you could give the database a "Secondary" location. I thought
> this meant that if the database filled up my H: drive, then it would
> automatically start writing to the I: drive. Is this the case? If so,
> how
> can I set it up?
> Thanks for any help
> Gordonsql

Database spanning multiple partitions.....help

I posted a message earlier, thinking I knew the how. However I didn't
Cany anyone tell me how to change an existing database that exists on an H:
drive to span across another partition of say an I: .
My idea is this, the database is growing. We expanded the mirrored hard
drives from 70gb to 140gb. Now we have an additional amount of unused
space. I formatted the new partition and gave it an I: name.
I thought you could give the database a "Secondary" location. I thought
this meant that if the database filled up my H: drive, then it would
automatically start writing to the I: drive. Is this the case? If so, how
can I set it up?
Thanks for any help
GordonYou thought wrong Gordon<g>. You would be better off to change the original
partition to the full size of the new drives and not have to worry about
splitting them up. Since the two partitions are on the same drive array
there is no performance gain in splitting them. You can add a new file to
the existing file group on the new partition but what will happen is this.
SQL Server uses a proportional fill algorithm to fill the files within the
filegroup. This is based on the amount of free space in each file. Ideally
you start with multiple files that are empty and sql server will fill them
equally as it inserts new rows. In your case if you simply add a new file
there will be some data written to the new file and some to the old. The
ratio depends on the amount of free space in each file. When filling in
disproportion like that it will cause more reads and writes to one file vs
spreading evenly over all of them. While you can do what you are after you
need to realize this is not going to work the way you thought. I recommend
you repartition the drive to make it one large partition instead of two
smaller ones.
--
Andrew J. Kelly SQL MVP
"Gordon" <Gordon@.discussions.microsoft.com> wrote in message
news:90E69280-63BF-4BA8-8F73-584C9534B06E@.microsoft.com...
>I posted a message earlier, thinking I knew the how. However I didn't
> Cany anyone tell me how to change an existing database that exists on an
> H:
> drive to span across another partition of say an I: .
> My idea is this, the database is growing. We expanded the mirrored hard
> drives from 70gb to 140gb. Now we have an additional amount of unused
> space. I formatted the new partition and gave it an I: name.
> I thought you could give the database a "Secondary" location. I thought
> this meant that if the database filled up my H: drive, then it would
> automatically start writing to the I: drive. Is this the case? If so,
> how
> can I set it up?
> Thanks for any help
> Gordon

Database spanning multiple partitions.....help

I posted a message earlier, thinking I knew the how. However I didn't
Cany anyone tell me how to change an existing database that exists on an H:
drive to span across another partition of say an I: .
My idea is this, the database is growing. We expanded the mirrored hard
drives from 70gb to 140gb. Now we have an additional amount of unused
space. I formatted the new partition and gave it an I: name.
I thought you could give the database a "Secondary" location. I thought
this meant that if the database filled up my H: drive, then it would
automatically start writing to the I: drive. Is this the case? If so, how
can I set it up?
Thanks for any help
Gordon
You thought wrong Gordon<g>. You would be better off to change the original
partition to the full size of the new drives and not have to worry about
splitting them up. Since the two partitions are on the same drive array
there is no performance gain in splitting them. You can add a new file to
the existing file group on the new partition but what will happen is this.
SQL Server uses a proportional fill algorithm to fill the files within the
filegroup. This is based on the amount of free space in each file. Ideally
you start with multiple files that are empty and sql server will fill them
equally as it inserts new rows. In your case if you simply add a new file
there will be some data written to the new file and some to the old. The
ratio depends on the amount of free space in each file. When filling in
disproportion like that it will cause more reads and writes to one file vs
spreading evenly over all of them. While you can do what you are after you
need to realize this is not going to work the way you thought. I recommend
you repartition the drive to make it one large partition instead of two
smaller ones.
Andrew J. Kelly SQL MVP
"Gordon" <Gordon@.discussions.microsoft.com> wrote in message
news:90E69280-63BF-4BA8-8F73-584C9534B06E@.microsoft.com...
>I posted a message earlier, thinking I knew the how. However I didn't
> Cany anyone tell me how to change an existing database that exists on an
> H:
> drive to span across another partition of say an I: .
> My idea is this, the database is growing. We expanded the mirrored hard
> drives from 70gb to 140gb. Now we have an additional amount of unused
> space. I formatted the new partition and gave it an I: name.
> I thought you could give the database a "Secondary" location. I thought
> this meant that if the database filled up my H: drive, then it would
> automatically start writing to the I: drive. Is this the case? If so,
> how
> can I set it up?
> Thanks for any help
> Gordon

Monday, March 19, 2012

Database Seal: Transaction Log Backup, error in translog backup

I have changed the time for the maintenanceplan but i still get the same
message, could it be something wrong with the database?
a part from the last backuplog:
[31] Database SPS01_Config_db: Transaction Log Backup...
Destination: [D:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\SPS01_Config_db\SPS01_Config_db_tlog_200505100115.TRN]
** Execution Time: 0 hrs, 0 mins, 1 secs **
[32] Database SPS01_Config_db: Verifying Backup...
** Execution Time: 0 hrs, 0 mins, 1 secs **
Backup can not be performed on database 'VirtualCenter'. This sub task is
ignored.
End of maintenance plan 'UserDBs' on 2005-05-10 01:15:20
SQLMAINT.EXE Process Exit Code: 1 (Failed)You can not perform a transaction log backup on a database that uses the
simple recovery model. Set your database to either the full or bulk_logged
recovery model and you can make transaction log backups.
--
Jacco Schalkwijk
SQL Server MVP
"Biowaste" <Biowaste@.discussions.microsoft.com> wrote in message
news:35E8E641-6689-461A-A12C-CF1E69C08B8A@.microsoft.com...
>I have changed the time for the maintenanceplan but i still get the same
> message, could it be something wrong with the database?
> a part from the last backuplog:
> [31] Database SPS01_Config_db: Transaction Log Backup...
> Destination: [D:\Program Files\Microsoft SQL
> Server\MSSQL\BACKUP\SPS01_Config_db\SPS01_Config_db_tlog_200505100115.TRN]
> ** Execution Time: 0 hrs, 0 mins, 1 secs **
> [32] Database SPS01_Config_db: Verifying Backup...
> ** Execution Time: 0 hrs, 0 mins, 1 secs **
> Backup can not be performed on database 'VirtualCenter'. This sub task is
> ignored.
> End of maintenance plan 'UserDBs' on 2005-05-10 01:15:20
> SQLMAINT.EXE Process Exit Code: 1 (Failed)
>|||How and where do I change that in the maint. plan?
this has worked in the past... just a few weaks ago.
how come it is only one db that fails?
"Jacco Schalkwijk" wrote:
> You can not perform a transaction log backup on a database that uses the
> simple recovery model. Set your database to either the full or bulk_logged
> recovery model and you can make transaction log backups.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Biowaste" <Biowaste@.discussions.microsoft.com> wrote in message
> news:35E8E641-6689-461A-A12C-CF1E69C08B8A@.microsoft.com...
> >I have changed the time for the maintenanceplan but i still get the same
> > message, could it be something wrong with the database?
> >
> > a part from the last backuplog:
> > [31] Database SPS01_Config_db: Transaction Log Backup...
> > Destination: [D:\Program Files\Microsoft SQL
> > Server\MSSQL\BACKUP\SPS01_Config_db\SPS01_Config_db_tlog_200505100115.TRN]
> >
> > ** Execution Time: 0 hrs, 0 mins, 1 secs **
> >
> > [32] Database SPS01_Config_db: Verifying Backup...
> >
> > ** Execution Time: 0 hrs, 0 mins, 1 secs **
> >
> > Backup can not be performed on database 'VirtualCenter'. This sub task is
> > ignored.
> >
> > End of maintenance plan 'UserDBs' on 2005-05-10 01:15:20
> > SQLMAINT.EXE Process Exit Code: 1 (Failed)
> >
>
>|||This is a database option, not something you set in the maint plan. EM, right-click the database,
properties, options.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Biowaste" <kalmeborg@.hotmail.com> wrote in message
news:85A3F0C2-62B8-47E2-B424-09A2B5B245A4@.microsoft.com...
> How and where do I change that in the maint. plan?
> this has worked in the past... just a few weaks ago.
> how come it is only one db that fails?
> "Jacco Schalkwijk" wrote:
>> You can not perform a transaction log backup on a database that uses the
>> simple recovery model. Set your database to either the full or bulk_logged
>> recovery model and you can make transaction log backups.
>> --
>> Jacco Schalkwijk
>> SQL Server MVP
>>
>> "Biowaste" <Biowaste@.discussions.microsoft.com> wrote in message
>> news:35E8E641-6689-461A-A12C-CF1E69C08B8A@.microsoft.com...
>> >I have changed the time for the maintenanceplan but i still get the same
>> > message, could it be something wrong with the database?
>> >
>> > a part from the last backuplog:
>> > [31] Database SPS01_Config_db: Transaction Log Backup...
>> > Destination: [D:\Program Files\Microsoft SQL
>> > Server\MSSQL\BACKUP\SPS01_Config_db\SPS01_Config_db_tlog_200505100115.TRN]
>> >
>> > ** Execution Time: 0 hrs, 0 mins, 1 secs **
>> >
>> > [32] Database SPS01_Config_db: Verifying Backup...
>> >
>> > ** Execution Time: 0 hrs, 0 mins, 1 secs **
>> >
>> > Backup can not be performed on database 'VirtualCenter'. This sub task is
>> > ignored.
>> >
>> > End of maintenance plan 'UserDBs' on 2005-05-10 01:15:20
>> > SQLMAINT.EXE Process Exit Code: 1 (Failed)
>> >
>>

Wednesday, March 7, 2012

Database Restore error

Hi,
When I am using following script, I am getting an error message
ALTER DATABASE mydb SET SINGLE_USER WITH ROLLBACK IMMEDIATE
RESTORE DATABASE mydb FROM DISK
='\\myServer\c$\backup\mydb_oltp\mydb_oltp_db_200608062107.BAK'
Server: Msg 3101, Level 16, State 1, Line 1
Exclusive access could not be obtained because the database is in use.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
I am setting up the db with single mode and no one else is using the
db.. why am I getting this error?
Thank you,
hjAll right I got it. The cursor was still positioned on mydb in my Query
Analyzer.
I changed that and it worked like a charm... I have to make this work
inside a python file now.
Thanks all...
hj
Hitesh wrote:
> Hi,
> When I am using following script, I am getting an error message
> ALTER DATABASE mydb SET SINGLE_USER WITH ROLLBACK IMMEDIATE
> RESTORE DATABASE mydb FROM DISK
> ='\\myServer\c$\backup\mydb_oltp\mydb_oltp_db_200608062107.BAK'
>
> Server: Msg 3101, Level 16, State 1, Line 1
> Exclusive access could not be obtained because the database is in use.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.
> I am setting up the db with single mode and no one else is using the
> db.. why am I getting this error?
> Thank you,
> hj|||Hitesh wrote:
> All right I got it. The cursor was still positioned on mydb in my Query
> Analyzer.
> I changed that and it worked like a charm... I have to make this work
> inside a python file now.
> Thanks all...
> hj
>
At the beginning of the script, before the ALTER statement, do:
USE master
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||I am getting following error inside python when I use "USE Master"
[Microsoft][ODBC SQL Server Driver][SQL Server]Changed database context
to 'master'. in EXEC
here is the query:
qry_restore = """USE Master
ALTER DATABASE mydbtemp SET SINGLE_USER WITH
ROLLBACK IMMEDIATE
RESTORE DATABASE mydbtemp FROM DISK =""" +
restore_path + """
ALTER DATABASE mydbtemptemp SET MULTI_USER"""
hj
Tracy McKibben wrote:
> Hitesh wrote:
> > All right I got it. The cursor was still positioned on mydb in my Query
> > Analyzer.
> > I changed that and it worked like a charm... I have to make this work
> > inside a python file now.
> >
> > Thanks all...
> > hj
> >
> At the beginning of the script, before the ALTER statement, do:
> USE master
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com|||That's an informational message, not an error message, which
can be ignored. You'd need to handle informational messages
in your app.
-Sue
On 9 Aug 2006 13:07:45 -0700, "Hitesh" <hitesh287@.gmail.com>
wrote:
>I am getting following error inside python when I use "USE Master"
>[Microsoft][ODBC SQL Server Driver][SQL Server]Changed database context
>to 'master'. in EXEC
>here is the query:
> qry_restore = """USE Master
> ALTER DATABASE mydbtemp SET SINGLE_USER WITH
>ROLLBACK IMMEDIATE
> RESTORE DATABASE mydbtemp FROM DISK =""" +
>restore_path + """
> ALTER DATABASE mydbtemptemp SET MULTI_USER"""
>hj
>
>Tracy McKibben wrote:
>> Hitesh wrote:
>> > All right I got it. The cursor was still positioned on mydb in my Query
>> > Analyzer.
>> > I changed that and it worked like a charm... I have to make this work
>> > inside a python file now.
>> >
>> > Thanks all...
>> > hj
>> >
>> At the beginning of the script, before the ALTER statement, do:
>> USE master
>>
>> --
>> Tracy McKibben
>> MCDBA
>> http://www.realsqlguy.com

Database restore error

I've been trying to restore a database from a .bak file, but I receive the
next error message:
RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013)
An internal consistency error occurred. Contact Technical Support for
assistance. [SQLSTATE 42000] (Error 3270). The step failed.
Any idea what's this?
ThanksSounds like the backup file could be bad. Try executing a
restore headeronly to see if you get any errors when trying
to read the header - and what information is reported for
what is in the backup file if it executes without errors.
-Sue
On Fri, 3 Nov 2006 13:51:02 -0800, alejandro
<alejandro@.discussions.microsoft.com> wrote:
>I've been trying to restore a database from a .bak file, but I receive the
>next error message:
>RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013)
>An internal consistency error occurred. Contact Technical Support for
>assistance. [SQLSTATE 42000] (Error 3270). The step failed.
>Any idea what's this?
>Thanks|||Hi,
I had a similar issue before and that caused because Database backup was not
fully completed. Verify the source database server for
enough hard disk space. I recommend you to take a full database backup and
try restore...
As far as I know you can do much with corrupted backup file...
Thanks
Hari
"alejandro" <alejandro@.discussions.microsoft.com> wrote in message
news:8E712F6C-EC6A-4E7C-9BF5-50B70557E3B8@.microsoft.com...
> I've been trying to restore a database from a .bak file, but I receive the
> next error message:
> RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013)
> An internal consistency error occurred. Contact Technical Support for
> assistance. [SQLSTATE 42000] (Error 3270). The step failed.
> Any idea what's this?
> Thanks|||Hari Prasad wrote:
> Hi,
> I had a similar issue before and that caused because Database backup was not
> fully completed. Verify the source database server for
> enough hard disk space. I recommend you to take a full database backup and
> try restore...
> As far as I know you can do much with corrupted backup file...
> Thanks
> Hari
>
> "alejandro" <alejandro@.discussions.microsoft.com> wrote in message
> news:8E712F6C-EC6A-4E7C-9BF5-50B70557E3B8@.microsoft.com...
> > I've been trying to restore a database from a .bak file, but I receive the
> > next error message:
> >
> > RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013)
> > An internal consistency error occurred. Contact Technical Support for
> > assistance. [SQLSTATE 42000] (Error 3270). The step failed.
> >
> > Any idea what's this?
> >
> > Thanks
check validity of your backup using
restore verifyonly from disk = <backup path>
look at BOL for verfiying backups
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/9c0a9c0b-64ba-4d3d-95d5-e09fb05d6154.htm
Regards
Amish Shah
http://shahamishm.tripod.com

Database Resoration Error

Hi
I am getting the below error message when I restore the database.
Error Message
==========
Could not find stored procedure 'dbo_ss.dbo.sp_MSremovedbreplication'.
Could not adjust the replication state of database 'db_sss'. The database wa
s successfully
restored, however its replication state is inderminate. See the Troubleshoot
ing Replication secion in SQL Server Books Online.
RESTORE DATABASE successfully processed 10201 pages in 38.883 secounds(2.466
MB/sec
SQL Server Edition
============
MSDE with SP3
Operating System
============
Windows 2000 ProfessionalStupid question, but did you go through the troubleshooting section, as per
the error message recommendation? If that didn't help, I recommend you post
to the replication group.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Balaji Prabhu.T" <anonymous@.discussions.microsoft.com> wrote in message
news:36AF45C6-BB29-411B-A6AD-9ADF6599E830@.microsoft.com...
> Hi
> I am getting the below error message when I restore the database.
> Error Message
> ==========
> Could not find stored procedure 'dbo_ss.dbo.sp_MSremovedbreplication'.
> Could not adjust the replication state of database 'db_sss'. The database
was successfully
> restored, however its replication state is inderminate. See the
Troubleshooting Replication secion in SQL Server Books Online.
> RESTORE DATABASE successfully processed 10201 pages in 38.883
secounds(2.466MB/sec
> SQL Server Edition
> ============
> MSDE with SP3
> Operating System
> ============
> Windows 2000 Professional
>

Database ''ReportServer$SQLExpressTempDB'' cannot be opened

When I try the open the report file, I got the following error message. Database 'ReportServer$SQLExpressTempDB' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details. Anyony have ideas to fix this error?Yes. Get sufficient access or more memory.

Database 'ReportServer' does not exist

Shouldn't reporting services setup create ReportServer database
automatically?
The setup fails at the very end with this message:
SQL Server failed to execute command for server configuration. The error
was: Database 'ReportServer' does not exist. Check sysdatabases. ...
Thanks,
-StanYes, Reporting Services install should create the ReportServer and
ReportServerTempDB databases, as well as the AdventureWorks2000 sample
database if you specified that feature to be installed. Be sure that you
have permissions to create the database. Also check the Reporting Services
install log, it may have more information about the error you are receiving.
Jonathan Kyle, MCSD
Microsoft WebData Support Engineer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
| From: "Stan" <nospam@.yahoo.com>
| Subject: Database 'ReportServer' does not exist
| Date: Thu, 16 Sep 2004 16:24:41 -0400
| Lines: 13
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
| Message-ID: <OC#5asCnEHA.1236@.TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: 12.148.36.131
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.reportingsvcs:29431
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| Shouldn't reporting services setup create ReportServer database
| automatically?
|
| The setup fails at the very end with this message:
|
| SQL Server failed to execute command for server configuration. The error
| was: Database 'ReportServer' does not exist. Check sysdatabases. ...
|
| Thanks,
|
| -Stan
|
|
||||I have seen this error if there is not default directory set for SQL server
to create databases in. You can check this via Enterprise manager go to the
properties on the server node.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jonathan Kyle [MSFT]" <jkyle@.online.microsoft.com> wrote in message
news:5Pan3rynEHA.4040@.cpmsftngxa06.phx.gbl...
> Yes, Reporting Services install should create the ReportServer and
> ReportServerTempDB databases, as well as the AdventureWorks2000 sample
> database if you specified that feature to be installed. Be sure that you
> have permissions to create the database. Also check the Reporting
Services
> install log, it may have more information about the error you are
receiving.
> Jonathan Kyle, MCSD
> Microsoft WebData Support Engineer
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> --
> | From: "Stan" <nospam@.yahoo.com>
> | Subject: Database 'ReportServer' does not exist
> | Date: Thu, 16 Sep 2004 16:24:41 -0400
> | Lines: 13
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
> | Message-ID: <OC#5asCnEHA.1236@.TK2MSFTNGP09.phx.gbl>
> | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> | NNTP-Posting-Host: 12.148.36.131
> | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
> | Xref: cpmsftngxa06.phx.gbl
microsoft.public.sqlserver.reportingsvcs:29431
> | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> |
> | Shouldn't reporting services setup create ReportServer database
> | automatically?
> |
> | The setup fails at the very end with this message:
> |
> | SQL Server failed to execute command for server configuration. The
error
> | was: Database 'ReportServer' does not exist. Check sysdatabases. ...
> |
> | Thanks,
> |
> | -Stan
> |
> |
> |
>|||Yes, I ran out of space on SQL Server C: driver and setup failed to create a
reporting database
Thanks!
"Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
news:%233TUfQ3nEHA.592@.TK2MSFTNGP11.phx.gbl...
> I have seen this error if there is not default directory set for SQL
server
> to create databases in. You can check this via Enterprise manager go to
the
> properties on the server node.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "Jonathan Kyle [MSFT]" <jkyle@.online.microsoft.com> wrote in message
> news:5Pan3rynEHA.4040@.cpmsftngxa06.phx.gbl...
> > Yes, Reporting Services install should create the ReportServer and
> > ReportServerTempDB databases, as well as the AdventureWorks2000 sample
> > database if you specified that feature to be installed. Be sure that
you
> > have permissions to create the database. Also check the Reporting
> Services
> > install log, it may have more information about the error you are
> receiving.
> >
> > Jonathan Kyle, MCSD
> > Microsoft WebData Support Engineer
> >
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > --
> > | From: "Stan" <nospam@.yahoo.com>
> > | Subject: Database 'ReportServer' does not exist
> > | Date: Thu, 16 Sep 2004 16:24:41 -0400
> > | Lines: 13
> > | X-Priority: 3
> > | X-MSMail-Priority: Normal
> > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
> > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
> > | Message-ID: <OC#5asCnEHA.1236@.TK2MSFTNGP09.phx.gbl>
> > | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> > | NNTP-Posting-Host: 12.148.36.131
> > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
> > | Xref: cpmsftngxa06.phx.gbl
> microsoft.public.sqlserver.reportingsvcs:29431
> > | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> > |
> > | Shouldn't reporting services setup create ReportServer database
> > | automatically?
> > |
> > | The setup fails at the very end with this message:
> > |
> > | SQL Server failed to execute command for server configuration. The
> error
> > | was: Database 'ReportServer' does not exist. Check sysdatabases. ...
> > |
> > | Thanks,
> > |
> > | -Stan
> > |
> > |
> > |
> >
>

Friday, February 24, 2012

Database Recovery

Can not attach database,
Error message;
The file you've specified is not a valid SQL Server database file.
My costumer HDD some files Deleted mybe elektric prblem -Elektric
go,com,go,come- then windows not opened.
insert corrupt hdd Another computer, then recovering (recover my files
software)
Recover mdf and ldf files. but I can not not attach mdf. file,
I am recovery .mdf file http://www.officerecovery.com/mssql/ some table ok.
but my importand table is not ok.
if I can recover another recovery software , my database correct recover or
same.?
I am using RecoverMyFiles.
Pleace help me.
Thanks.inter
Do you have a last full backup of the database?
"inter" <halit-goktas.net> wrote in message
news:uYt$ae%23%23GHA.1220@.TK2MSFTNGP04.phx.gbl...
> Can not attach database,
> Error message;
> The file you've specified is not a valid SQL Server database file.
>
> My costumer HDD some files Deleted mybe elektric prblem -Elektric
> go,com,go,come- then windows not opened.
> insert corrupt hdd Another computer, then recovering (recover my files
> software)
> Recover mdf and ldf files. but I can not not attach mdf. file,
>
> I am recovery .mdf file http://www.officerecovery.com/mssql/ some table
> ok.
> but my importand table is not ok.
> if I can recover another recovery software , my database correct recover
> or
> same.?
> I am using RecoverMyFiles.
> Pleace help me.
> Thanks.
>|||As I indicated in my response to your earlier posting (10/27) about the same
issue:
That doesn't sound very good, and since you do NOT have a backup of the
database, it does it sound very hopeful to recover the 'lost' data.
You may wish to contact PSS and open a ticket. They 'may' be able to help
you.
See: http://support.microsoft.com/default.aspx?scid=fh;EN-US;offerprophone
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"inter" <halit-goktas.net> wrote in message
news:uYt$ae%23%23GHA.1220@.TK2MSFTNGP04.phx.gbl...
> Can not attach database,
> Error message;
> The file you've specified is not a valid SQL Server database file.
>
> My costumer HDD some files Deleted mybe elektric prblem -Elektric
> go,com,go,come- then windows not opened.
> insert corrupt hdd Another computer, then recovering (recover my files
> software)
> Recover mdf and ldf files. but I can not not attach mdf. file,
>
> I am recovery .mdf file http://www.officerecovery.com/mssql/ some table
> ok.
> but my importand table is not ok.
> if I can recover another recovery software , my database correct recover
> or
> same.?
> I am using RecoverMyFiles.
> Pleace help me.
> Thanks.
>|||Next time if you don't have UPS backup , Enable Torn Page Detection.
Thanks
Ajay
Arnie Rowland wrote:
> As I indicated in my response to your earlier posting (10/27) about the same
> issue:
> That doesn't sound very good, and since you do NOT have a backup of the
> database, it does it sound very hopeful to recover the 'lost' data.
> You may wish to contact PSS and open a ticket. They 'may' be able to help
> you.
> See: http://support.microsoft.com/default.aspx?scid=fh;EN-US;offerprophone
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to the
> top yourself.
> - H. Norman Schwarzkopf
>
> "inter" <halit-goktas.net> wrote in message
> news:uYt$ae%23%23GHA.1220@.TK2MSFTNGP04.phx.gbl...
> >
> > Can not attach database,
> > Error message;
> > The file you've specified is not a valid SQL Server database file.
> >
> >
> > My costumer HDD some files Deleted mybe elektric prblem -Elektric
> > go,com,go,come- then windows not opened.
> > insert corrupt hdd Another computer, then recovering (recover my files
> > software)
> > Recover mdf and ldf files. but I can not not attach mdf. file,
> >
> >
> > I am recovery .mdf file http://www.officerecovery.com/mssql/ some table
> > ok.
> > but my importand table is not ok.
> >
> > if I can recover another recovery software , my database correct recover
> > or
> > same.?
> > I am using RecoverMyFiles.
> >
> > Pleace help me.
> >
> > Thanks.
> >
> >|||Hi,
If your data is critical please contact Microsoft PSS as Arnie suggested...
Thanks
Hari
"inter" <halit-goktas.net> wrote in message
news:uYt$ae%23%23GHA.1220@.TK2MSFTNGP04.phx.gbl...
> Can not attach database,
> Error message;
> The file you've specified is not a valid SQL Server database file.
>
> My costumer HDD some files Deleted mybe elektric prblem -Elektric
> go,com,go,come- then windows not opened.
> insert corrupt hdd Another computer, then recovering (recover my files
> software)
> Recover mdf and ldf files. but I can not not attach mdf. file,
>
> I am recovery .mdf file http://www.officerecovery.com/mssql/ some table
> ok.
> but my importand table is not ok.
> if I can recover another recovery software , my database correct recover
> or
> same.?
> I am using RecoverMyFiles.
> Pleace help me.
> Thanks.
>

Sunday, February 19, 2012

Database problem

Hi,
I am trying to add a row to my database and although it does not give me an
error message, it is not adding it to my database. I am using C# and SQL
2005 Express editions.
When I look into my Database Explorer I do not see the row added. What are
the steps that have to be taken to create a database and then add rows to
it? Do I have to do anything in the Solution Explorer? I am using a Window
Console application as I do not need a form as I am trying to access the
database directly without a dataset. Here is my code below.
TIA
Roy
using System;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Text;
namespace testing
{
class Class1
{
// private System.Data.DataSet dataSet;
[STAThread]
static void Main(string[] args)
{
int lnSOBN = 900;
int lnBN1 = 188;
string strConnection = @."Data
Source=. \SQLEXPRESS;AttachDbFilename=|DataDirect
ory|\Database1.mdf;Integrate
d
Security=True;Connect Timeout=30;User Instance=True";
SqlConnection conn = new SqlConnection(strConnection);
string strInsert = "INSERT INTO tblDatabase1 (SOBN, BN1) VALUES (@.par0,
@.par1) ";
SqlCommand cmd = new SqlCommand(strInsert, conn);
SqlParameter parameter1 = new SqlParameter("@.par0", SqlDbType.Int, 32);
SqlParameter parameter2 = new SqlParameter("@.par1", SqlDbType.Int, 32);
parameter1.Value = lnSOBN;
parameter2.Value = lnBN1;
cmd.Parameters.Add(parameter1);
cmd.Parameters.Add(parameter2);
cmd.Connection.Open();
cmd.ExecuteNonQuery();
cmd.Connection.Close();
}
}
}
TIA
RoyHi Roy,

> I am trying to add a row to my database and although it does not give me
> an error message, it is not adding it to my database. I am using C# and
> SQL 2005 Express editions.
> When I look into my Database Explorer I do not see the row added.
After you insert the record, do you refresh the query that displays your
table results? From the Database Explorer, you locate the table in your
database, right click on it and select Show Table Data. When this opens up,
it shows a static view of the data, any records added to the table while
this view is open will not be reflected unless you re-run the underlying
query. You can do this by pressing the bold, red exclaimation mark in the
toolbar, or pressing CTRL+R.
Regards,
Jeff Papiez
jeff . papiez @. microsoft . com
SQL Server 2005 Upgrade Advisor Team
http://blogs.msdn.com/jpapiez
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.|||Hi Jeff,
I have tried that but it does not work? Do I have to do anything with the
Solution Explorer. It's pretty frustrating because I have tried so many
things and nothing seems to be working.
Any suggestions.
Thanks
Roy
"Jeff Papiez [MSFT]" <jpapiez@.online.microsoft.com> wrote in message
news:O9AeJ0T6FHA.1276@.TK2MSFTNGP09.phx.gbl...
> Hi Roy,
>
> After you insert the record, do you refresh the query that displays your
> table results? From the Database Explorer, you locate the table in your
> database, right click on it and select Show Table Data. When this opens
> up, it shows a static view of the data, any records added to the table
> while this view is open will not be reflected unless you re-run the
> underlying query. You can do this by pressing the bold, red exclaimation
> mark in the toolbar, or pressing CTRL+R.
>
> --
> Regards,
> Jeff Papiez
> jeff . papiez @. microsoft . com
> SQL Server 2005 Upgrade Advisor Team
> http://blogs.msdn.com/jpapiez
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm.
>|||Hi Roy,
No you shouldn't have to do anything with Solution Explorer, it should "just
work". If you write a query to select all results from your table, using the
same connection string, and write it out to the console, do you still see no
results? If no error is raised after executing the insert, the data is being
sent somewhere successfully.
I can feel your frustration... this has happened to me before where I was
expecting the data to show up in one database, but it was going to
another... oops :)
Jeff.
"Roy Gourgi" <royng@.videotron.ca> wrote in message
news:xA3ef.5204$wc.488038@.wagner.videotron.net...
> Hi Jeff,
> I have tried that but it does not work? Do I have to do anything with the
> Solution Explorer. It's pretty frustrating because I have tried so many
> things and nothing seems to be working.
> Any suggestions.
> Thanks
> Roy
> "Jeff Papiez [MSFT]" <jpapiez@.online.microsoft.com> wrote in message
> news:O9AeJ0T6FHA.1276@.TK2MSFTNGP09.phx.gbl...
>|||Hi Jeff,
I just want to make sure of something in the strConnection string that I
have.
Data Source = .\SQLEXPRESS is this not the name of the server?
AttachDbFilename = |DataDirectory|Database1.mdf what directory or database
does this point to.
Can I use something like AttachDbFilename = C:\MyDB\Database1.mdf instead?
string strConnection = @."Data
Source=. \SQLEXPRESS;AttachDbFilename=|DataDirect
ory|\Database1.mdf;Integrate
d
Security=True;Connect Timeout=30;User Instance=True";
How do I write a query to the console? I don't know how?
Thanks
Roy
"Jeff Papiez [MSFT]" <jpapiez@.online.microsoft.com> wrote in message
news:urY$3KU6FHA.2036@.TK2MSFTNGP14.phx.gbl...
> Hi Roy,
> No you shouldn't have to do anything with Solution Explorer, it should
> "just work". If you write a query to select all results from your table,
> using the same connection string, and write it out to the console, do you
> still see no results? If no error is raised after executing the insert,
> the data is being sent somewhere successfully.
> I can feel your frustration... this has happened to me before where I was
> expecting the data to show up in one database, but it was going to
> another... oops :)
> Jeff.
> "Roy Gourgi" <royng@.videotron.ca> wrote in message
> news:xA3ef.5204$wc.488038@.wagner.videotron.net...
>|||Hi Jeff,
I just noticed something. You might be right about it being written
somewhere else. When I go look into the directory where I have my
Database1.mdf I also see a sub-directory called bin\Debug where there is
another copy of my Database1.mdf which seems to change the date modified
when I run my program. On the other hand the other one does not change time.
How do I open or see the one in the bin\Debug directory?
Roy
"Roy Gourgi" <royng@.videotron.ca> wrote in message
news:ZO2ef.5200$wc.484253@.wagner.videotron.net...
> Hi,
> I am trying to add a row to my database and although it does not give me
> an error message, it is not adding it to my database. I am using C# and
> SQL 2005 Express editions.
> When I look into my Database Explorer I do not see the row added. What are
> the steps that have to be taken to create a database and then add rows to
> it? Do I have to do anything in the Solution Explorer? I am using a Window
> Console application as I do not need a form as I am trying to access the
> database directly without a dataset. Here is my code below.
> TIA
> Roy
> using System;
> using System.Data;
> using System.Data.Common;
> using System.Data.SqlClient;
> using System.Data.SqlTypes;
> using System.Text;
>
> namespace testing
> {
> class Class1
> {
> // private System.Data.DataSet dataSet;
> [STAThread]
>
> static void Main(string[] args)
> {
> int lnSOBN = 900;
> int lnBN1 = 188;
>
> string strConnection = @."Data
> Source=. \SQLEXPRESS;AttachDbFilename=|DataDirect
ory|\Database1.mdf;Integra
ted
> Security=True;Connect Timeout=30;User Instance=True";
> SqlConnection conn = new SqlConnection(strConnection);
> string strInsert = "INSERT INTO tblDatabase1 (SOBN, BN1) VALUES (@.par0,
> @.par1) ";
> SqlCommand cmd = new SqlCommand(strInsert, conn);
> SqlParameter parameter1 = new SqlParameter("@.par0", SqlDbType.Int, 32);
> SqlParameter parameter2 = new SqlParameter("@.par1", SqlDbType.Int, 32);
> parameter1.Value = lnSOBN;
> parameter2.Value = lnBN1;
> cmd.Parameters.Add(parameter1);
> cmd.Parameters.Add(parameter2);
> cmd.Connection.Open();
> cmd.ExecuteNonQuery();
> cmd.Connection.Close();
> }
> }
> }
> TIA
> Roy
>|||Finally it worked.:) I just changed my connection on the Database Explorer
to the other location on bin\Debug and it wrote the row. Funny though when I
run it a couple of times it just rewrites over the same record over and over
again without append any other records. So I only have 1 record at a time.
BTW why is it that VS creates 2 copies of my database?
Thanks
Roy
"Roy Gourgi" <royng@.videotron.ca> wrote in message
news:ZO2ef.5200$wc.484253@.wagner.videotron.net...
> Hi,
> I am trying to add a row to my database and although it does not give me
> an error message, it is not adding it to my database. I am using C# and
> SQL 2005 Express editions.
> When I look into my Database Explorer I do not see the row added. What are
> the steps that have to be taken to create a database and then add rows to
> it? Do I have to do anything in the Solution Explorer? I am using a Window
> Console application as I do not need a form as I am trying to access the
> database directly without a dataset. Here is my code below.
> TIA
> Roy
> using System;
> using System.Data;
> using System.Data.Common;
> using System.Data.SqlClient;
> using System.Data.SqlTypes;
> using System.Text;
>
> namespace testing
> {
> class Class1
> {
> // private System.Data.DataSet dataSet;
> [STAThread]
>
> static void Main(string[] args)
> {
> int lnSOBN = 900;
> int lnBN1 = 188;
>
> string strConnection = @."Data
> Source=. \SQLEXPRESS;AttachDbFilename=|DataDirect
ory|\Database1.mdf;Integra
ted
> Security=True;Connect Timeout=30;User Instance=True";
> SqlConnection conn = new SqlConnection(strConnection);
> string strInsert = "INSERT INTO tblDatabase1 (SOBN, BN1) VALUES (@.par0,
> @.par1) ";
> SqlCommand cmd = new SqlCommand(strInsert, conn);
> SqlParameter parameter1 = new SqlParameter("@.par0", SqlDbType.Int, 32);
> SqlParameter parameter2 = new SqlParameter("@.par1", SqlDbType.Int, 32);
> parameter1.Value = lnSOBN;
> parameter2.Value = lnBN1;
> cmd.Parameters.Add(parameter1);
> cmd.Parameters.Add(parameter2);
> cmd.Connection.Open();
> cmd.ExecuteNonQuery();
> cmd.Connection.Close();
> }
> }
> }
> TIA
> Roy
>|||Hi Jeff,
Resolved everything as I created a new solution and database and everything
now is ok. Somehow, it must have created a 2nd database and that is probably
why I had all the problems.
Thanks again
Roy
"Jeff Papiez [MSFT]" <jpapiez@.online.microsoft.com> wrote in message
news:urY$3KU6FHA.2036@.TK2MSFTNGP14.phx.gbl...
> Hi Roy,
> No you shouldn't have to do anything with Solution Explorer, it should
> "just work". If you write a query to select all results from your table,
> using the same connection string, and write it out to the console, do you
> still see no results? If no error is raised after executing the insert,
> the data is being sent somewhere successfully.
> I can feel your frustration... this has happened to me before where I was
> expecting the data to show up in one database, but it was going to
> another... oops :)
> Jeff.
> "Roy Gourgi" <royng@.videotron.ca> wrote in message
> news:xA3ef.5204$wc.488038@.wagner.videotron.net...
>|||Hi Roy,

> Finally it worked.:) I just changed my connection on the Database Explorer
> to the other location on bin\Debug and it wrote the row. Funny though when
> I run it a couple of times it just rewrites over the same record over and
> over again without append any other records. So I only have 1 record at a
> time.
> BTW why is it that VS creates 2 copies of my database?
I'm glad you've gotten it working, finally :)
With SQL Express we support this new feature where you can automatically
attach a database, as noted in the connection string you are using. When you
add a database to a project (Project -> Add New Item -> SQL Database) the
default option is to copy the database on every build to the output
directory, in your case the bin\debug directory. In addition, a new database
connection is added to the Database Explorer which points to the database in
your project directory. Anything you add to the database through the Data
Explorer will be added to the database file in your project folder. When you
build your project, a copy of the database overwrites the database files in
your build directory (bin\debug).
Are you yet? I am! :)
If this isn't the behavior you're after there are a few things you can do.
1. Add a new data connection. In the Database file name (new or existing)
text box, give the path to the new file as a path on your filesystem that's
outside the project, something like "C:\MSSQL\TestDB". You'll be prompted to
create the new database file. After it's done you can copy the connection
string from the properties grid for the new connection.
2. Create a new database on the server using sqlcmd. Assuming your Express
instance is SQLEXPRESS:
Start->Run: cmd.exe
In the console type:
sqlcmd -E -S.\SQLEXPRESS
1> create database TESTDB
2> go
The connection string to this database will look like the following:
Data Source=.\SQLEXPRESS;Initial Catalog=TESTDB;Integrated
Security=True;User Instance=True
3. Select the database in the Solution Explorer, press F4 to bring up the
Properties window.
Set the "Copy to Output Directory" = Do not copy
Then you can change your connection back to the path of your project
folder. Now, all changes you make to your database will be in the same file.
Regards,
Jeff Papiez
jeff . papiez @. microsoft . com
SQL Server 2005 Upgrade Advisor Team
http://blogs.msdn.com/jpapiez
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.|||Thanks Jeff,
I am a little bit , but there must be a good reason for it to make a
copy which I presently do not fully understand as I am a newby.
Roy
"Jeff Papiez [MSFT]" <jpapiez@.online.microsoft.com> wrote in message
news:uBoKBXV6FHA.252@.TK2MSFTNGP15.phx.gbl...
> Hi Roy,
>
> I'm glad you've gotten it working, finally :)
> With SQL Express we support this new feature where you can automatically
> attach a database, as noted in the connection string you are using. When
> you add a database to a project (Project -> Add New Item -> SQL Database)
> the default option is to copy the database on every build to the output
> directory, in your case the bin\debug directory. In addition, a new
> database connection is added to the Database Explorer which points to the
> database in your project directory. Anything you add to the database
> through the Data Explorer will be added to the database file in your
> project folder. When you build your project, a copy of the database
> overwrites the database files in your build directory (bin\debug).
> Are you yet? I am! :)
> If this isn't the behavior you're after there are a few things you can do.
> 1. Add a new data connection. In the Database file name (new or existing)
> text box, give the path to the new file as a path on your filesystem
> that's outside the project, something like "C:\MSSQL\TestDB". You'll be
> prompted to create the new database file. After it's done you can copy the
> connection string from the properties grid for the new connection.
> 2. Create a new database on the server using sqlcmd. Assuming your Express
> instance is SQLEXPRESS:
> Start->Run: cmd.exe
> In the console type:
> sqlcmd -E -S.\SQLEXPRESS
> 1> create database TESTDB
> 2> go
> The connection string to this database will look like the following:
> Data Source=.\SQLEXPRESS;Initial Catalog=TESTDB;Integrated
> Security=True;User Instance=True
> 3. Select the database in the Solution Explorer, press F4 to bring up the
> Properties window.
> Set the "Copy to Output Directory" = Do not copy
> Then you can change your connection back to the path of your project
> folder. Now, all changes you make to your database will be in the same
> file.
>
> --
> Regards,
> Jeff Papiez
> jeff . papiez @. microsoft . com
> SQL Server 2005 Upgrade Advisor Team
> http://blogs.msdn.com/jpapiez
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm.
>