Showing posts with label method. Show all posts
Showing posts with label method. Show all posts

Wednesday, March 7, 2012

Create Linked Report method

Does anyone have a sample of a CreateLinkedReport method they are using? I am using Reporting Services 2005 and Visual Basic 2005. I need the VB code and how I need to call it. I'd like to change one parameter, and then send it to select recipients using a specified schedule.

Thanks, Iris

Is there anything wrong with the BOL sample code?|||

I'll try that example.

Also, when I try to click Create Linked Report from a master report that I created, I get an internal error. In SS SP2, it shows that this problem was fixed. When I installed SP2 today, it did not fix the problem. I am using a Stored Procedure with one parameter of int value.

Any ideas?

Thanks, Iris

Tuesday, February 14, 2012

create corruption

Is there a way to create db corruption without deleting a row from
sysIndexes? That method still allows dbcc checkdb to return "CHECKDB found 0
allocation errors and 0 consistency errors in database bla" and I want it to
return an error.
TIA,
ChrisR
Ugh! I'm trying to get rid of it and you're trying to create it! ;-)
"ChrisR" <ChrisR@.discussions.microsoft.com> wrote in message
news:8CEFC956-B85C-4A1C-9AF4-D793C14FADB8@.microsoft.com...
> Is there a way to create db corruption without deleting a row from
> sysIndexes? That method still allows dbcc checkdb to return "CHECKDB found
> 0
> allocation errors and 0 consistency errors in database bla" and I want it
> to
> return an error.
> --
> TIA,
> ChrisR
|||Hi,
you could edit the .mdf file with a editor and enter some char's on the file.
I never done it but i think it could work : )
CC
"ChrisR" wrote:

> Is there a way to create db corruption without deleting a row from
> sysIndexes? That method still allows dbcc checkdb to return "CHECKDB found 0
> allocation errors and 0 consistency errors in database bla" and I want it to
> return an error.
> --
> TIA,
> ChrisR
|||That would leave it suspect, not corrupted. Thanks though.
TIA,
ChrisR
"CC" wrote:
[vbcol=seagreen]
> Hi,
> you could edit the .mdf file with a editor and enter some char's on the file.
> I never done it but i think it could work : )
> CC
> "ChrisR" wrote:
|||No - it would only leave it suspect if recovery runs across the page you
corrupted. Your best bet is to delete a row from sysindexes. Instead of the
script you posted in a previous thread, its far easier to create a single
non-clustered index, insert a few rows and then
delete * from sysindexes
where indid=2 and
id=object_id ('mytable')
You should get a variety of errors from CHECKDB.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"ChrisR" <ChrisR@.discussions.microsoft.com> wrote in message
news:A16120B3-C62D-4355-A402-5F858AFEA293@.microsoft.com...[vbcol=seagreen]
> That would leave it suspect, not corrupted. Thanks though.
> --
> TIA,
> ChrisR
>
> "CC" wrote:

create corruption

Is there a way to create db corruption without deleting a row from
sysIndexes? That method still allows dbcc checkdb to return "CHECKDB found 0
allocation errors and 0 consistency errors in database bla" and I want it to
return an error.
--
TIA,
ChrisRUgh! I'm trying to get rid of it and you're trying to create it! ;-)
"ChrisR" <ChrisR@.discussions.microsoft.com> wrote in message
news:8CEFC956-B85C-4A1C-9AF4-D793C14FADB8@.microsoft.com...
> Is there a way to create db corruption without deleting a row from
> sysIndexes? That method still allows dbcc checkdb to return "CHECKDB found
> 0
> allocation errors and 0 consistency errors in database bla" and I want it
> to
> return an error.
> --
> TIA,
> ChrisR|||Hi,
you could edit the .mdf file with a editor and enter some char's on the file
.
I never done it but i think it could work : )
CC
"ChrisR" wrote:

> Is there a way to create db corruption without deleting a row from
> sysIndexes? That method still allows dbcc checkdb to return "CHECKDB found
0
> allocation errors and 0 consistency errors in database bla" and I want it
to
> return an error.
> --
> TIA,
> ChrisR|||That would leave it suspect, not corrupted. Thanks though.
--
TIA,
ChrisR
"CC" wrote:
[vbcol=seagreen]
> Hi,
> you could edit the .mdf file with a editor and enter some char's on the fi
le.
> I never done it but i think it could work : )
> CC
> "ChrisR" wrote:
>|||No - it would only leave it suspect if recovery runs across the page you
corrupted. Your best bet is to delete a row from sysindexes. Instead of the
script you posted in a previous thread, its far easier to create a single
non-clustered index, insert a few rows and then
delete * from sysindexes
where indid=2 and
id=object_id ('mytable')
You should get a variety of errors from CHECKDB.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"ChrisR" <ChrisR@.discussions.microsoft.com> wrote in message
news:A16120B3-C62D-4355-A402-5F858AFEA293@.microsoft.com...[vbcol=seagreen]
> That would leave it suspect, not corrupted. Thanks though.
> --
> TIA,
> ChrisR
>
> "CC" wrote:
>

create corruption

Is there a way to create db corruption without deleting a row from
sysIndexes? That method still allows dbcc checkdb to return "CHECKDB found 0
allocation errors and 0 consistency errors in database bla" and I want it to
return an error.
--
TIA,
ChrisRUgh! I'm trying to get rid of it and you're trying to create it! ;-)
"ChrisR" <ChrisR@.discussions.microsoft.com> wrote in message
news:8CEFC956-B85C-4A1C-9AF4-D793C14FADB8@.microsoft.com...
> Is there a way to create db corruption without deleting a row from
> sysIndexes? That method still allows dbcc checkdb to return "CHECKDB found
> 0
> allocation errors and 0 consistency errors in database bla" and I want it
> to
> return an error.
> --
> TIA,
> ChrisR|||Hi,
you could edit the .mdf file with a editor and enter some char's on the file.
I never done it but i think it could work : )
CC
"ChrisR" wrote:
> Is there a way to create db corruption without deleting a row from
> sysIndexes? That method still allows dbcc checkdb to return "CHECKDB found 0
> allocation errors and 0 consistency errors in database bla" and I want it to
> return an error.
> --
> TIA,
> ChrisR|||That would leave it suspect, not corrupted. Thanks though.
--
TIA,
ChrisR
"CC" wrote:
> Hi,
> you could edit the .mdf file with a editor and enter some char's on the file.
> I never done it but i think it could work : )
> CC
> "ChrisR" wrote:
> > Is there a way to create db corruption without deleting a row from
> > sysIndexes? That method still allows dbcc checkdb to return "CHECKDB found 0
> > allocation errors and 0 consistency errors in database bla" and I want it to
> > return an error.
> > --
> > TIA,
> > ChrisR|||No - it would only leave it suspect if recovery runs across the page you
corrupted. Your best bet is to delete a row from sysindexes. Instead of the
script you posted in a previous thread, its far easier to create a single
non-clustered index, insert a few rows and then
delete * from sysindexes
where indid=2 and
id=object_id ('mytable')
You should get a variety of errors from CHECKDB.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"ChrisR" <ChrisR@.discussions.microsoft.com> wrote in message
news:A16120B3-C62D-4355-A402-5F858AFEA293@.microsoft.com...
> That would leave it suspect, not corrupted. Thanks though.
> --
> TIA,
> ChrisR
>
> "CC" wrote:
>> Hi,
>> you could edit the .mdf file with a editor and enter some char's on the
>> file.
>> I never done it but i think it could work : )
>> CC
>> "ChrisR" wrote:
>> > Is there a way to create db corruption without deleting a row from
>> > sysIndexes? That method still allows dbcc checkdb to return "CHECKDB
>> > found 0
>> > allocation errors and 0 consistency errors in database bla" and I want
>> > it to
>> > return an error.
>> > --
>> > TIA,
>> > ChrisR

Create copy of database and place on different server

All,
I am trying to create a copy of an existing database and place on a different sql server for testing purposes. Currently my method of doing this is to create a backup, then restore a database on my new sql server. But here is the problem I am running into. When I look in Enterprise manager I can see all of the stored procedures and tables and data just fine, which is how I would like it. But, when I open up Query Analyzer I am not able to run any queries because it says "invalid object name" error. I know that the object name is correct. I think that I am having a conflict between the users which were carried over from the source backup file and the users that are on my 2 new sql server. If anyone could help, I would really appreciate it. I am stuck at this point. I am guessing it is probably something simple I am just unaware that I need to do.

Thanks,
LinsLoHi,

Maybe you should try a detach

EXEC sp_detach_db 'your_db'

And then on the second server an attach:

EXEC sp_attach_db @.dbname = N'pubs',
@.filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',
@.filename2 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs_log.ldf'|||LinsLo,

The problem is probably being caused because the userids are not matching up in your system tables.

First make sure the usernames for the database exist on the server then for each user run the following sql script.

EXEC sp_change_users_login 'Update_One', '<USERNAME>', '<USERNAME>'

That will align the users in the database with the users on the server.

Hope this helps.|||My first guess would be that you need to use sp_change_users_login (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_ca-cz_8qzy.asp).

-PatP