Showing posts with label object. Show all posts
Showing posts with label object. Show all posts

Tuesday, March 27, 2012

Changing the ReportViewer control size.

I have an aspx page that uses the ReportViewer control. The dimensions are
set at runtime.
private void Page_Load(object sender, System.EventArgs e)
{
reportViewer.ServerUrl = "http://localhost/reportserver";
reportViewer.ReportPath = "/Samples/Company Sales";
reportViewer.Width = 900;
reportViewer.Height = 580;
}
Is it possible to change the size of the control everytime the browser
window is resized?
TIA.You can set the size to a percent.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"TechnoSpyke" <technospyke@.yahoo.com> wrote in message
news:OqzqmWrEFHA.2572@.tk2msftngp13.phx.gbl...
>I have an aspx page that uses the ReportViewer control. The dimensions are
>set at runtime.
> private void Page_Load(object sender, System.EventArgs e)
> {
> reportViewer.ServerUrl = "http://localhost/reportserver";
> reportViewer.ReportPath = "/Samples/Company Sales";
> reportViewer.Width = 900;
> reportViewer.Height = 580;
> }
> Is it possible to change the size of the control everytime the browser
> window is resized?
> TIA.
>|||Thank you.
This worked, but first I had to modify the ReportViewer.dll since, by
default, it doesn't accept precentage for dimensions.
"Jeff A. Stucker" <jeff@.mobilize.net> wrote in message
news:ekIm4R5EFHA.3200@.TK2MSFTNGP10.phx.gbl...
> You can set the size to a percent.
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "TechnoSpyke" <technospyke@.yahoo.com> wrote in message
> news:OqzqmWrEFHA.2572@.tk2msftngp13.phx.gbl...
>>I have an aspx page that uses the ReportViewer control. The dimensions
>>are set at runtime.
>> private void Page_Load(object sender, System.EventArgs e)
>> {
>> reportViewer.ServerUrl = "http://localhost/reportserver";
>> reportViewer.ReportPath = "/Samples/Company Sales";
>> reportViewer.Width = 900;
>> reportViewer.Height = 580;
>> }
>> Is it possible to change the size of the control everytime the browser
>> window is resized?
>> TIA.
>|||Great, I'm glad you got it working. Sometimes I forget all the steps when I
did something, but just remember that it works!!
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"TechnoSpyke" <technospyke@.yahoo.com> wrote in message
news:eoca6W5EFHA.2600@.TK2MSFTNGP09.phx.gbl...
> Thank you.
> This worked, but first I had to modify the ReportViewer.dll since, by
> default, it doesn't accept precentage for dimensions.
>
> "Jeff A. Stucker" <jeff@.mobilize.net> wrote in message
> news:ekIm4R5EFHA.3200@.TK2MSFTNGP10.phx.gbl...
>> You can set the size to a percent.
>> --
>> Cheers,
>> '(' Jeff A. Stucker
>> \
>> Business Intelligence
>> www.criadvantage.com
>> ---
>> "TechnoSpyke" <technospyke@.yahoo.com> wrote in message
>> news:OqzqmWrEFHA.2572@.tk2msftngp13.phx.gbl...
>>I have an aspx page that uses the ReportViewer control. The dimensions
>>are set at runtime.
>> private void Page_Load(object sender, System.EventArgs e)
>> {
>> reportViewer.ServerUrl = "http://localhost/reportserver";
>> reportViewer.ReportPath = "/Samples/Company Sales";
>> reportViewer.Width = 900;
>> reportViewer.Height = 580;
>> }
>> Is it possible to change the size of the control everytime the browser
>> window is resized?
>> TIA.
>>
>

Changing the ownership of a object

Hi all,

I have a problem while executing a stored procedure. I have created a database called "cpd" and created some stored procedures. for all my stored procedure the owner is "CPDUSER". when ever i am executing any stored procedures i have to write the user name first else it is not working.

let's say i have a stored procedure called "cp_checklogin". it takes 2 parameters. to execute this i have to write

exec cpduser.cp_checklogin 'admin@.jk.com', 'admin'

but i don't want to write the user name there. and if without username "CPDUSER" i am trying to execute the stored procedure it is throwing me the error that "the stored procedure cp_checklogin is not exist in the database". can anybody suggest me. it's very urgent.

Thanks in advance

Krishna

The cp_checklogin stored procedure has been created in the cpduser schema. The user making the call likely has 'dbo' as their default schema.

To fix this, you can either recreate the stored procedure in the dbo schema or you can change the default schema for the user making the call (for help on this, see http://msdn2.microsoft.com/en-us/library/ms190387.aspx)

|||Another option would be if you use SQL 2000 (you did not mention that) to change the ownership of existing objects using sp_changeobjectowner.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Sunday, March 25, 2012

Changing the Double Click Default in Object Explorer

Is there a way so that when I click on a stored proc it would default to the
modify option? Or when I double click on a table it would just open a query
window and show all records?
It would be great to be able to override the current default nature, for I
rarely need to see the params of an sp, but I do need to quickly edit an sp.
Keep the + for property info, but give me editablility!
Sorry for the tirade, lots of features, but I wonder how many developers
they asked for feed back on workflow when they designed the interface.
The standard behavior for Double clicking in a treeview when there are sub
nodes is to expand the node. What you are asking can be done by simply
right clicking and choosing the appropriate option. For instance with
stored procedures you can right click and choose Modify to open a window
with the sp code ready for editing. For a table you can right click then
choose Open to see all the rows. Either way it is two clicks of the mouse
so I really don't see where it is worth complaining about. It's really worth
everyone's while to spends a few moments exploring all the features that
SSMS has to offer. I agree that some things may not be intuitive or even
ideal but it has a lot of functionality if you give it the chance.
Andrew J. Kelly SQL MVP
"Adam" <Adam@.discussions.microsoft.com> wrote in message
news:8505D340-5A31-4878-9F2E-6A3D03D29B0C@.microsoft.com...
> Is there a way so that when I click on a stored proc it would default to
> the
> modify option? Or when I double click on a table it would just open a
> query
> window and show all records?
> It would be great to be able to override the current default nature, for I
> rarely need to see the params of an sp, but I do need to quickly edit an
> sp.
> Keep the + for property info, but give me editablility!
> Sorry for the tirade, lots of features, but I wonder how many developers
> they asked for feed back on workflow when they designed the interface.
>
|||Not to get really into a back and forth, but when I double click in any type
of explorer...what I am doing is executing or actioning an item. I would
think that the parameters is only part of an sp...if I click on a folder in
Explorer, do I want to see part of the folder (parameters) or all the
contents (complete script) of a folder?
Just thoughts and yes I am more than willing to try something new.
"Andrew J. Kelly" wrote:

> The standard behavior for Double clicking in a treeview when there are sub
> nodes is to expand the node. What you are asking can be done by simply
> right clicking and choosing the appropriate option. For instance with
> stored procedures you can right click and choose Modify to open a window
> with the sp code ready for editing. For a table you can right click then
> choose Open to see all the rows. Either way it is two clicks of the mouse
> so I really don't see where it is worth complaining about. It's really worth
> everyone's while to spends a few moments exploring all the features that
> SSMS has to offer. I agree that some things may not be intuitive or even
> ideal but it has a lot of functionality if you give it the chance.
> --
> Andrew J. Kelly SQL MVP
>
> "Adam" <Adam@.discussions.microsoft.com> wrote in message
> news:8505D340-5A31-4878-9F2E-6A3D03D29B0C@.microsoft.com...
>
>

Wednesday, March 7, 2012

Changing owner of DB objects

I have a database where all objects within it and owned by a user not dbo.
Is there any way I can change all the object ownerships to dbo? I'm talking
thousands of objects so I'm thinking some form of script.
thanks
GavGav
SELECT 'EXEC sp_changeobjectowner '''+ROUTINE_NAME+''',''dbo'''
FROM INFORMATION_SCHEMA.ROUTINES
WHERE OBJECTPROPERTY(OBJECT_ID(ROUTINE_SCHEMA+
'.'+ROUTINE_NAME),
'IsMsShipped')=0
AND ROUTINE_SCHEMA != 'dbo'
"Gav" <gav@.nospam.com> wrote in message
news:455c2cce$0$696$88260bb3@.news.teranews.com...
>I have a database where all objects within it and owned by a user not dbo.
>Is there any way I can change all the object ownerships to dbo? I'm talking
>thousands of objects so I'm thinking some form of script.
> thanks
> Gav
>|||What version of SQL Server?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Gav" <gav@.nospam.com> wrote in message news:455c2cce$0$696$88260bb3@.news.teranews.com...[vb
col=seagreen]
>I have a database where all objects within it and owned by a user not dbo.
Is there any way I can
>change all the object ownerships to dbo? I'm talking thousands of objects s
o I'm thinking some form
>of script.
> thanks
> Gav
>[/vbcol]|||Sorry, forgot the obvious. :o) 2000 SP3a.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eVnJq0WCHHA.3604@.TK2MSFTNGP03.phx.gbl...
> What version of SQL Server?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Gav" <gav@.nospam.com> wrote in message
> news:455c2cce$0$696$88260bb3@.news.teranews.com...
>|||See Uri's post (sp_changeobjectowner).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Gav" <gav@.nospam.com> wrote in message news:455c42c8$0$709$88260bb3@.news.teranews.com...[vb
col=seagreen]
> Sorry, forgot the obvious. :o) 2000 SP3a.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:eVnJq0WCHHA.3604@.TK2MSFTNGP03.phx.gbl...
>[/vbcol]

Changing owner of DB objects

I have a database where all objects within it and owned by a user not dbo.
Is there any way I can change all the object ownerships to dbo? I'm talking
thousands of objects so I'm thinking some form of script.
thanks
Gav
Gav
SELECT 'EXEC sp_changeobjectowner '''+ROUTINE_NAME+''',''dbo'''
FROM INFORMATION_SCHEMA.ROUTINES
WHERE OBJECTPROPERTY(OBJECT_ID(ROUTINE_SCHEMA+'.'+ROUTIN E_NAME),
'IsMsShipped')=0
AND ROUTINE_SCHEMA != 'dbo'
"Gav" <gav@.nospam.com> wrote in message
news:455c2cce$0$696$88260bb3@.news.teranews.com...
>I have a database where all objects within it and owned by a user not dbo.
>Is there any way I can change all the object ownerships to dbo? I'm talking
>thousands of objects so I'm thinking some form of script.
> thanks
> Gav
>
|||Sorry, forgot the obvious. :o) 2000 SP3a.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eVnJq0WCHHA.3604@.TK2MSFTNGP03.phx.gbl...
> What version of SQL Server?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Gav" <gav@.nospam.com> wrote in message
> news:455c2cce$0$696$88260bb3@.news.teranews.com...
>

Changing owner of DB objects

I have a database where all objects within it and owned by a user not dbo.
Is there any way I can change all the object ownerships to dbo? I'm talking
thousands of objects so I'm thinking some form of script.
thanks
GavGav
SELECT 'EXEC sp_changeobjectowner '''+ROUTINE_NAME+''',''dbo'''
FROM INFORMATION_SCHEMA.ROUTINES
WHERE OBJECTPROPERTY(OBJECT_ID(ROUTINE_SCHEMA+'.'+ROUTINE_NAME),
'IsMsShipped')=0
AND ROUTINE_SCHEMA != 'dbo'
"Gav" <gav@.nospam.com> wrote in message
news:455c2cce$0$696$88260bb3@.news.teranews.com...
>I have a database where all objects within it and owned by a user not dbo.
>Is there any way I can change all the object ownerships to dbo? I'm talking
>thousands of objects so I'm thinking some form of script.
> thanks
> Gav
>|||What version of SQL Server?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Gav" <gav@.nospam.com> wrote in message news:455c2cce$0$696$88260bb3@.news.teranews.com...
>I have a database where all objects within it and owned by a user not dbo. Is there any way I can
>change all the object ownerships to dbo? I'm talking thousands of objects so I'm thinking some form
>of script.
> thanks
> Gav
>|||Sorry, forgot the obvious. :o) 2000 SP3a.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eVnJq0WCHHA.3604@.TK2MSFTNGP03.phx.gbl...
> What version of SQL Server?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Gav" <gav@.nospam.com> wrote in message
> news:455c2cce$0$696$88260bb3@.news.teranews.com...
>>I have a database where all objects within it and owned by a user not dbo.
>>Is there any way I can change all the object ownerships to dbo? I'm
>>talking thousands of objects so I'm thinking some form of script.
>> thanks
>> Gav
>|||See Uri's post (sp_changeobjectowner).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Gav" <gav@.nospam.com> wrote in message news:455c42c8$0$709$88260bb3@.news.teranews.com...
> Sorry, forgot the obvious. :o) 2000 SP3a.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:eVnJq0WCHHA.3604@.TK2MSFTNGP03.phx.gbl...
>> What version of SQL Server?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Gav" <gav@.nospam.com> wrote in message news:455c2cce$0$696$88260bb3@.news.teranews.com...
>>I have a database where all objects within it and owned by a user not dbo. Is there any way I can
>>change all the object ownerships to dbo? I'm talking thousands of objects so I'm thinking some
>>form of script.
>> thanks
>> Gav
>>
>

Saturday, February 25, 2012

Changing object ownership in SQL 6.5?

Help!
I've been using SQL 7.0 & 2K for the last four years but need to
change the ownership of some tables in a legacy database residing on
SQL 6.5 from (user) to dbo. I know you can use sp_ChangeObjectOwner
in 7/2K but what is it's equivalent in 6.5 please?
Regards
ALIThere is no in 6.5. You can of course try to look at the source code of
sp_changeobjectowner and try to do the same on a 6.5 install, but that is
not supported and is risky (there might be some architectural reason why
this ability wasn't introduced until 7.0).
I suggest you re-create the object.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"ALI" <ali.shah@.itnetplc.com> wrote in message
news:8487385c.0311110159.56b09753@.posting.google.com...
> Help!
> I've been using SQL 7.0 & 2K for the last four years but need to
> change the ownership of some tables in a legacy database residing on
> SQL 6.5 from (user) to dbo. I know you can use sp_ChangeObjectOwner
> in 7/2K but what is it's equivalent in 6.5 please?
> Regards
> ALI

Changing object ownership back to dbo

Hi:
I have a database where objects are owned by different users. I would like
to revert ownership of all objects to dbo. What is the best way to do this?
Thanks,
Charliesp_changeobjectowner
David Portas
SQL Server MVP
--
"Charlie@.CBFC" <charle1@.comcast.net> wrote in message
news:Oe9b3gfzFHA.1132@.TK2MSFTNGP10.phx.gbl...
> Hi:
> I have a database where objects are owned by different users. I would
> like
> to revert ownership of all objects to dbo. What is the best way to do
> this?
> Thanks,
> Charlie
>|||Hi,
Use the below script. Execute the script by replacing oldobjectowner and new
user. This query will give you script for changing the object.
Just cut and paste the output to a new query analyzer window and execute to
change the object owner.
set quoted_identifier off
select 'sp_changeobjectowner '+name+"'"+'newusername' +"'"+char(10)+'go'
from sysobjects where user_name(uid)='oldobjectowner'
set quoted_identifier on
Thanks
Hari
SQL Server MVP
"Charlie@.CBFC" <charle1@.comcast.net> wrote in message
news:Oe9b3gfzFHA.1132@.TK2MSFTNGP10.phx.gbl...
> Hi:
> I have a database where objects are owned by different users. I would
> like
> to revert ownership of all objects to dbo. What is the best way to do
> this?
> Thanks,
> Charlie
>

changing object owner syntax

Hi there,
We have a user name convention here that specifies users in the
following way:
jane.doe
john.smith

In order to change a database object I must specify the owner name along
with the object name. Does anyone know the proper syntax for doing this
with a user name that contains a period? When I put the user name
followed by the object name in quotes such as 'jane.doe.tb_test_table',
SQL Server can not find the object.
Any help is appreciated.
Kelly"Kelly Prendergast" <kelly.prendergast@.noaa.gov> wrote in message
news:403B9200.6882586F@.noaa.gov...
> Hi there,
> We have a user name convention here that specifies users in the
> following way:
> jane.doe
> john.smith
> In order to change a database object I must specify the owner name along
> with the object name. Does anyone know the proper syntax for doing this
> with a user name that contains a period? When I put the user name
> followed by the object name in quotes such as 'jane.doe.tb_test_table',
> SQL Server can not find the object.
> Any help is appreciated.
> Kelly

You will need to quote the owner name:

exec sp_changeobjectowner '[jane.doe].tb_test_table', 'dbo'

You may want to consider changing your naming convention - since the .
character delimits object name parts in MSSQL, it would probably be best to
avoid confusiong by not allowing it in user names. Although of course I
appreciate this may be beyond your control.

Simon

Changing Object Explorer Details Window

is it possible to change the columns that display in the Object Explorer
Details Window? I'd like to be able see some Extended Properties in this
window.
TIA
Dean
Nope...sorry but that's not an option.
-Sue
On Fri, 10 Aug 2007 09:51:26 -0400, "Dean"
<deanl144@.hotmail.com.nospam> wrote:

>is it possible to change the columns that display in the Object Explorer
>Details Window? I'd like to be able see some Extended Properties in this
>window.
>TIA
>Dean
>

Friday, February 24, 2012

Changing login for dbo object (SQL Server 2000)

I've got a SQL Server 2000 database (ASOQA) that has the dbo User linked to
my Windows-based domain login. This has been causing me problems when tryin
g to add permissions to my account; I get an error that I can't make any cha
nges to the dbo object.
The fix, as I understand it, is to change the dbo User to use the sa login a
nd add another administrative User for my Windows-based login. I note that
a companion database on the same server is setup that way and I have no prob
lems with assigning roles on that one. I was directed to use sp_change_user
s_login but that also produces errors stating that the dbo object is invalid
for the User parameter.
Basically, here's what I see now for users in Enterprise Manager on ASOQA:
Name Login Name
dbo noe\ranarnol *
dev dev
reportuser reportuser
(etc)
Here's how the other database is setup, and how I want ASOQA done:
Name Login Name
dbo sa *
dev dev
ranarnol noe\ranarnol *
reportuser reportuser
(etc)
noe\ranarnol is my usual login. Any ideas how I go about accomplishing this
?
Thanks,
Randall ArnoldIt sound like what you are looking for is sp_changedbowner.
In Query Analyzer, change your database context to the
database you are having problems with and execute:
sp_changedbowner 'sa'
-Sue
On Tue, 16 May 2006 11:27:25 -0500, "Randall Arnold"
<randall.nospam.arnold@.nospamnokia.com.> wrote:

>I've got a SQL Server 2000 database (ASOQA) that has the dbo User linked to
my Windows-based domain login. This has been causing me problems when tryi
ng to add permissions to my account; I get an error that I can't make any ch
anges to the dbo object.
>The fix, as I understand it, is to change the dbo User to use the sa login and add
another administrative User for my Windows-based login. I note that a companion dat
abase on the same server is setup that way and I have no problems with assigning rol
es
on that one. I was directed to use sp_change_users_login but that also produces errors stat
ing that the dbo object is invalid for the User parameter.
>Basically, here's what I see now for users in Enterprise Manager on ASOQA:
>Name Login Name
>dbo noe\ranarnol *
>dev dev
>reportuser reportuser
>(etc)
>Here's how the other database is setup, and how I want ASOQA done:
>Name Login Name
>dbo sa *
>dev dev
>ranarnol noe\ranarnol *
>reportuser reportuser
>(etc)
>noe\ranarnol is my usual login. Any ideas how I go about accomplishing thi
s?
>Thanks,
>Randall Arnold|||Thanks, Sue, I'll give it a shot!
Randall
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:jl9k62p4ipgkbppvhglaqlbkgsnpt745fo@.
4ax.com...
> It sound like what you are looking for is sp_changedbowner.
> In Query Analyzer, change your database context to the
> database you are having problems with and execute:
> sp_changedbowner 'sa'
> -Sue
> On Tue, 16 May 2006 11:27:25 -0500, "Randall Arnold"
> <randall.nospam.arnold@.nospamnokia.com.> wrote:
>
>|||Worked like an absolute charm! Exactly what I needed! Thanks again.
Randall
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:jl9k62p4ipgkbppvhglaqlbkgsnpt745fo@.
4ax.com...
> It sound like what you are looking for is sp_changedbowner.
> In Query Analyzer, change your database context to the
> database you are having problems with and execute:
> sp_changedbowner 'sa'
> -Sue
> On Tue, 16 May 2006 11:27:25 -0500, "Randall Arnold"
> <randall.nospam.arnold@.nospamnokia.com.> wrote:
>
>|||Your welcome Randall - thanks for posting back!
-Sue
On Wed, 17 May 2006 15:05:12 -0500, "Randall Arnold"
<randall.nospam.arnold@.nospamnokia.com.> wrote:

>Worked like an absolute charm! Exactly what I needed! Thanks again.
>Randall
>"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
> news:jl9k62p4ipgkbppvhglaqlbkgsnpt745fo@.
4ax.com...
>