Showing posts with label default. Show all posts
Showing posts with label default. Show all posts

Friday, March 30, 2012

HELP!! Problem in database backup and restore!

Im trying to backup the databse by selecting the database source, backup type = full, name the backup set, and leave the rest as default. The backup seems to be successful.

The problem comes when I need to restore the backup database, I 've tried many times and a few different kinds of selection, all fails. I've selected the source for restore from device, that is the .bak file from backup folder and remains the rest of selection as default. Here is the error message I get:

System.Data.SqlClient.SqlError: The backup set holds a backup of the database other than the existing 'testing' database. (Microsoft.SqlServer.Express.Smo)

Anyone can help to solve this problem?!

Create new Database. In Restore window-> Options tab, check "Force restore over existing database". And then try to restore. This may work for you.

Santosh

|||

Thankz santosh...

the solution u had provided.... had successfully solved the problem mention above....but there are some database that still meets another problem during the database restore

here is the error occurs after that....

TITLE: Microsoft SQL Server Management Studio Express

Restore failed for Server 'COMP1\SQLEXPRESS'. (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476


ADDITIONAL INFORMATION:

System.Data.SqlClient.SqlError: The file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\JGSQL.mdf' cannot be overwritten. It is being used by database 'JGSQL'. (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&LinkId=20476


BUTTONS:

OK

|||

I've try to do the database restore using sql command as below:

RESTORE DATABASE testJG

FROM DISK = 'c:\Program Files\Microsoft SQL Server\MSSQL.3\MSSQL\Backup\JGsql.bak'

GO

But I get this error message.

Does this means that I need to restore the master database from systems database to the database testJG before I restore the backup database?

Msg 3102, Level 16, State 1, Line 1

RESTORE cannot process database 'testJG' because it is in use by this session. It is recommended that the master database be used when performing this operation.

Msg 3013, Level 16, State 1, Line 1

RESTORE DATABASE is terminating abnormally.

|||It was helpfull to me. Thanx! :)sql

HELP!! Problem in database backup and restore!

Im trying to backup the databse by selecting the database source, backup type = full, name the backup set, and leave the rest as default. The backup seems to be successful.

The problem comes when I need to restore the backup database, I 've tried many times and a few different kinds of selection, all fails. I've selected the source for restore from device, that is the .bak file from backup folder and remains the rest of selection as default. Here is the error message I get:

System.Data.SqlClient.SqlError: The backup set holds a backup of the database other than the existing 'testing' database. (Microsoft.SqlServer.Express.Smo)

Anyone can help to solve this problem?!

Create new Database. In Restore window-> Options tab, check "Force restore over existing database". And then try to restore. This may work for you.

Santosh

|||

Thankz santosh...

the solution u had provided.... had successfully solved the problem mention above....but there are some database that still meets another problem during the database restore

here is the error occurs after that....

TITLE: Microsoft SQL Server Management Studio Express

Restore failed for Server 'COMP1\SQLEXPRESS'. (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476


ADDITIONAL INFORMATION:

System.Data.SqlClient.SqlError: The file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\JGSQL.mdf' cannot be overwritten. It is being used by database 'JGSQL'. (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&LinkId=20476


BUTTONS:

OK

|||

I've try to do the database restore using sql command as below:

RESTORE DATABASE testJG

FROM DISK = 'c:\Program Files\Microsoft SQL Server\MSSQL.3\MSSQL\Backup\JGsql.bak'

GO

But I get this error message.

Does this means that I need to restore the master database from systems database to the database testJG before I restore the backup database?

Msg 3102, Level 16, State 1, Line 1

RESTORE cannot process database 'testJG' because it is in use by this session. It is recommended that the master database be used when performing this operation.

Msg 3013, Level 16, State 1, Line 1

RESTORE DATABASE is terminating abnormally.

|||It was helpfull to me. Thanx! :)

HELP!! i deleted services!

i have installed vs 2005 and sql server enterprise edition on an xp pro sp2 machine.but i could not connect to the mssqlexpress default database that it came with.in a moment of madness i deleted the mssqlserver services (3 of them).how do i reinstall them? i thought uninstalling the products and reinstalling them would help but it did not.

please help!

cheers OK, wait a minute. You installed the enterprise edition of the MSSQL Service on a XP prof ? This is not possible. What did you actually delete, where and what did you try to achieve ?

HTH, jens Suessmeyer.

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

yes it it is possible, the only thing is that you do not have access to all the functionality.i have solved the prob by uninstalling and installing the work edition.

thanks

|||Sorry to correct you, but installing SQL Server services won′t be available for enterprise edition, only the client tools.

Jens Suessmeyer.

http://www.sqlserver2005.de

Friday, March 23, 2012

HELP! Parameter default or provided value not valid???

Default value or value provided for the report parameter 'ParamaterName' is
not a valid value. (rsInvalidReportParameter)
I am getting this error when I am trying to run a deployed report. However,
this is driving me mad because in the report preview within VS.Net the report
works fine and i can choose the same parameter settings from within the dev
environment with no problems. I am populating this parameter with a dropdown
with valid values from a sproc (and this I've done a thousand times before).
I can not figure out why it is throwing this error, particularly since it
works perfectly fine in the preview pane. How could it be crappin out when I
deploy it?!?! I am going insane!
-isamuAre you sure it is exactly in the valid values list? The list is case
sensitive. Also, if you are using date / time functions you have to be
careful as they will need to be exact matches.
--
Brian Welcker
Group Program Manager
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"isamu" <isamu@.discussions.microsoft.com> wrote in message
news:D6B6D595-8748-4308-8EF2-2B7F846EB9B5@.microsoft.com...
> Default value or value provided for the report parameter 'ParamaterName'
> is
> not a valid value. (rsInvalidReportParameter)
> I am getting this error when I am trying to run a deployed report.
> However,
> this is driving me mad because in the report preview within VS.Net the
> report
> works fine and i can choose the same parameter settings from within the
> dev
> environment with no problems. I am populating this parameter with a
> dropdown
> with valid values from a sproc (and this I've done a thousand times
> before).
> I can not figure out why it is throwing this error, particularly since it
> works perfectly fine in the preview pane. How could it be crappin out
> when I
> deploy it?!?! I am going insane!
> -isamu|||Hi Brian,
I believe there must've been some buggy stuff going on. What I did to fix
it, on a whim, was change all my variable names in my stored procedure and in
my report, and voila, guess what? it worked. I don't know what could've
been causing it to act so strangely, but I'm just happy it got fixed. Wasted
a good 3 hours of time though.
"Brian Welcker [MSFT]" wrote:
> Are you sure it is exactly in the valid values list? The list is case
> sensitive. Also, if you are using date / time functions you have to be
> careful as they will need to be exact matches.
> --
> Brian Welcker
> Group Program Manager
> Microsoft SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "isamu" <isamu@.discussions.microsoft.com> wrote in message
> news:D6B6D595-8748-4308-8EF2-2B7F846EB9B5@.microsoft.com...
> > Default value or value provided for the report parameter 'ParamaterName'
> > is
> > not a valid value. (rsInvalidReportParameter)
> >
> > I am getting this error when I am trying to run a deployed report.
> > However,
> > this is driving me mad because in the report preview within VS.Net the
> > report
> > works fine and i can choose the same parameter settings from within the
> > dev
> > environment with no problems. I am populating this parameter with a
> > dropdown
> > with valid values from a sproc (and this I've done a thousand times
> > before).
> > I can not figure out why it is throwing this error, particularly since it
> > works perfectly fine in the preview pane. How could it be crappin out
> > when I
> > deploy it?!?! I am going insane!
> >
> > -isamu
>
>

Monday, March 19, 2012

Help! How do I set a function as a default?

Help
I want to set a user defined function as the default for a
column.
How do I do that?
I think you in advance,
HeidiTry:
alter table MyTable
add constraint MyDefault default (dbo.MyFunc (123)) for MyColumn
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
.
"Heidi" <anonymous@.discussions.microsoft.com> wrote in message
news:cd6601c4394d$7a0f3ae0$a101280a@.phx.gbl...
Help
I want to set a user defined function as the default for a
column.
How do I do that?
I think you in advance,
Heidi

Help! How do I set a function as a default?

Help
I want to set a user defined function as the default for a
column.
How do I do that?
I think you in advance,
HeidiTry:
alter table MyTable
add constraint MyDefault default (dbo.MyFunc (123)) for MyColumn
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
.
"Heidi" <anonymous@.discussions.microsoft.com> wrote in message
news:cd6601c4394d$7a0f3ae0$a101280a@.phx.gbl...
Help
I want to set a user defined function as the default for a
column.
How do I do that?
I think you in advance,
Heidi

Help! How do I set a function as a default?

Help
I want to set a user defined function as the default for a
column.
How do I do that?
I think you in advance,
Heidi
Try:
alter table MyTable
add constraint MyDefault default (dbo.MyFunc (123)) for MyColumn
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
..
"Heidi" <anonymous@.discussions.microsoft.com> wrote in message
news:cd6601c4394d$7a0f3ae0$a101280a@.phx.gbl...
Help
I want to set a user defined function as the default for a
column.
How do I do that?
I think you in advance,
Heidi

Monday, March 12, 2012

HELP! Default Date Parameters Expression in Reporting Services

How do I add a default date parameter to get this:

@.StartDate: Last Sunday

@.EndDate : Yesterday

So if I was to run this today I want the reports StartDate As Sunday, November 11, 2007

and

EndDate >>> Yesterday Thursday, November 15, 2007

Hi,

From your description, it seems that you want to add some parameters to filter the report, right?

If so, I suggest that you should associate a Query Parameter with a Report Parameter. Assume that you handle your querying works in a stored procedure, you can use getdate() method to get the current date, datediff() and dateadd() method to calculate the date. See the following code snippet (Just the idea, not the executable code.):

declare @.InputDay,@.StartDay,@.EndDay

-- @.EndDay=getdate()-1
case @.InputDay='Sun'
-- @.StartDay=getdate()-7
case @.InputDay='Mon'
-- @.StartDay=getdate()-1
case @.InputDay='Tue'
-- @.StartDay=getdate()-2
case @.InputDay='Wed'
-- @.StartDay=getdate()-3
case @.InputDay='Thu'
-- @.StartDay=getdate()-4
case @.InputDay='Fri'
-- @.StartDay=getdate()-5
case @.InputDay='Sat'
-- @.StartDay=getdate()-6

Thanks.

Wednesday, March 7, 2012

Help! - detached default database....

Hope someone can help me with this. I am new to SQL Server and am using the
express edition. I detached my 'Default' database and now I can not connect
to the server and do anything! Short of uninstalling it and and reinstalling
it - have any ideas on how I can 'reset'?
Terry
Hi Terry,
I do not use the Express Edition but I think this should work. Use any of
the command line utilities to connect and specify an alternate database like
master. Something like this
sqlcmd -U user -P password -d master
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"Terry" wrote:

> Hope someone can help me with this. I am new to SQL Server and am using the
> express edition. I detached my 'Default' database and now I can not connect
> to the server and do anything! Short of uninstalling it and and reinstalling
> it - have any ideas on how I can 'reset'?
> --
> Terry
|||Oops ... once connected user sp_defaultdb to change the default database of
your login like in
sp_defaultdb 'login', 'master'
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"Ben Nevarez" wrote:
[vbcol=seagreen]
> Hi Terry,
> I do not use the Express Edition but I think this should work. Use any of
> the command line utilities to connect and specify an alternate database like
> master. Something like this
> sqlcmd -U user -P password -d master
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
> "Terry" wrote:
|||Hello Terry,
When you state Default database, do you mean the master database and othere
system database?
If so, you need to reinstall the sql express to rebuild the database.
Hope this helps.
Sincerely,
Wei Lu
Microsoft Online Community 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.
|||Since Terry was able to detach the database I assumed it was a user database
(system databases can not be detached).
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"Wei Lu [MSFT]" wrote:

> Hello Terry,
> When you state Default database, do you mean the master database and othere
> system database?
> If so, you need to reinstall the sql express to rebuild the database.
> Hope this helps.
> Sincerely,
> Wei Lu
> Microsoft Online Community 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.
>
|||Thanks everyone!
It was not the master, it was one I developed and wanted to 'roll back'
to a backup I had made. And no, I couold not use the command line sqlcmd
utility to connect, and then make any change. SQL Management Express would
let me connect, but I could not do anything at all. I could not go to
security and and change the properties of my login. I could not re-attach
the DB - I was basically locked out of making any changes. The instance was
set up for 'Windows Authentication', so what I finally did was creat another
user (windows) on the system with Admin rights, logon to that account, log
into SQLME and change the default database for my original login. Took care
of the problem!
Thanks again for taking the time to try and give me some help - and Happy
Holidays!
Terry
"Wei Lu [MSFT]" wrote:

> Hello Terry,
> When you state Default database, do you mean the master database and othere
> system database?
> If so, you need to reinstall the sql express to rebuild the database.
> Hope this helps.
> Sincerely,
> Wei Lu
> Microsoft Online Community 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.
>

Help! - detached default database....

Hope someone can help me with this. I am new to SQL Server and am using the
express edition. I detached my 'Default' database and now I can not connect
to the server and do anything! Short of uninstalling it and and reinstallin
g
it - have any ideas on how I can 'reset'?
TerryHi Terry,
I do not use the Express Edition but I think this should work. Use any of
the command line utilities to connect and specify an alternate database like
master. Something like this
sqlcmd -U user -P password -d master
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"Terry" wrote:

> Hope someone can help me with this. I am new to SQL Server and am using t
he
> express edition. I detached my 'Default' database and now I can not conne
ct
> to the server and do anything! Short of uninstalling it and and reinstall
ing
> it - have any ideas on how I can 'reset'?
> --
> Terry|||Oops ... once connected user sp_defaultdb to change the default database of
your login like in
sp_defaultdb 'login', 'master'
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"Ben Nevarez" wrote:
[vbcol=seagreen]
> Hi Terry,
> I do not use the Express Edition but I think this should work. Use any of
> the command line utilities to connect and specify an alternate database li
ke
> master. Something like this
> sqlcmd -U user -P password -d master
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
> "Terry" wrote:
>|||Hello Terry,
When you state Default database, do you mean the master database and othere
system database?
If so, you need to reinstall the sql express to rebuild the database.
Hope this helps.
Sincerely,
Wei Lu
Microsoft Online Community 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.|||Since Terry was able to detach the database I assumed it was a user database
(system databases can not be detached).
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"Wei Lu [MSFT]" wrote:

> Hello Terry,
> When you state Default database, do you mean the master database and other
e
> system database?
> If so, you need to reinstall the sql express to rebuild the database.
> Hope this helps.
> Sincerely,
> Wei Lu
> Microsoft Online Community 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
.
>|||Thanks everyone!
It was not the master, it was one I developed and wanted to 'roll back'
to a backup I had made. And no, I couold not use the command line sqlcmd
utility to connect, and then make any change. SQL Management Express would
let me connect, but I could not do anything at all. I could not go to
security and and change the properties of my login. I could not re-attach
the DB - I was basically locked out of making any changes. The instance was
set up for 'Windows Authentication', so what I finally did was creat another
user (windows) on the system with Admin rights, logon to that account, log
into SQLME and change the default database for my original login. Took care
of the problem!
Thanks again for taking the time to try and give me some help - and Happy
Holidays!
--
Terry
"Wei Lu [MSFT]" wrote:

> Hello Terry,
> When you state Default database, do you mean the master database and other
e
> system database?
> If so, you need to reinstall the sql express to rebuild the database.
> Hope this helps.
> Sincerely,
> Wei Lu
> Microsoft Online Community 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
.
>