Friday, March 30, 2012
Print Layout feature showing black
that time whenever I try to use the "Print Layout" feature in
Reporting Services, it shows nothing but black. Does anyone know of a
fix for this?Here you go: http://support.microsoft.com/kb/935356/en-us
This is the new cumulative update that should fix your issue. You'll need
to follow the steps on the page to request the fix.
This is one of the bugs fixed:
50001105 After you apply SQL Server 2005 SP2, the Print Preview feature in
Reporting Services may show a solid black page.
--
Chris Alton, Microsoft Corp.
SQL Server Developer Support Engineer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
> From: cphite@.gmail.com
> Newsgroups: microsoft.public.sqlserver.reportingsvcs
> Subject: Print Layout feature showing black
> Date: Thu, 04 Oct 2007 13:17:24 -0700
> Today I received a Windows Update that included SQL 2005 SP2. Since
> that time whenever I try to use the "Print Layout" feature in
> Reporting Services, it shows nothing but black. Does anyone know of a
> fix for this?
>|||On Oct 4, 4:52 pm, cal...@.online.microsoft.com (Chris Alton [MSFT])
wrote:
> Here you go:http://support.microsoft.com/kb/935356/en-us
> This is the new cumulative update that should fix your issue. You'll need
> to follow the steps on the page to request the fix.
Thanks, Chris - that worked perfectly.|||Great. You wern't the only person I've seen that had that problem.
--
Chris Alton, Microsoft Corp.
SQL Server Developer Support Engineer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
> From: cphite@.gmail.com
> Newsgroups: microsoft.public.sqlserver.reportingsvcs
> Subject: Re: Print Layout feature showing black
> Date: Fri, 05 Oct 2007 07:56:08 -0700
> Organization: http://groups.google.com
> On Oct 4, 4:52 pm, cal...@.online.microsoft.com (Chris Alton [MSFT])
> wrote:
> > Here you go:http://support.microsoft.com/kb/935356/en-us
> >
> > This is the new cumulative update that should fix your issue. You'll
need
> > to follow the steps on the page to request the fix.
> Thanks, Chris - that worked perfectly.
>
Friday, March 23, 2012
Primary key violation on update
My update statement is like
update e
set e.EID = neid.New_EID
from EmpTable e
inner join NewEID neid on neid.Tech_SSN = e.SSN
and neid.New_EID not in (Select EID from EmpTable)
The problem is that the final (Select EID from EmpTable) is not
refreshed after each update so I end up trying to set the EID to an
existing EID (sometimes there are more than one EID with the same
SSN).
Ideas? Thanks.
-JohnPlease post your DDL + INSERT statements of sample data that are causing the
problem.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"John Baima" <john@.nospam.com> wrote in message
news:t7gqs15s3a72ddh2ipem4a80bq8osrng9r@.
4ax.com...
I am getting a primary key violation with an update.
My update statement is like
update e
set e.EID = neid.New_EID
from EmpTable e
inner join NewEID neid on neid.Tech_SSN = e.SSN
and neid.New_EID not in (Select EID from EmpTable)
The problem is that the final (Select EID from EmpTable) is not
refreshed after each update so I end up trying to set the EID to an
existing EID (sometimes there are more than one EID with the same
SSN).
Ideas? Thanks.
-John|||When you use JOIN with non-unique columns in a t-SQL UPDATE statement, you
could get that error. Please post your table structures & sample data along
with expected results for others to better understand and repro your
problem. For details, refer to: www.aspfaq.com/5006
Here is an untested attempt, based on the assumption that you have duplicate
EIDs for each SSN which in turn are duplicates as well:
UPDATE EmpTable
SET EID = ( SELECT MAX( neid.New_EID )
FROM NewEID neid
WHERE neid.Tech_SSN = EmpTable.SSN
AND NOT EXISTS ( SELECT *
FROM EmpTable emp
WHERE emp.EID = neid.New_EID ) )
WHERE EXISTS( SELECT *
FROM NewEID neid
WHERE neid.Tech_SSN = EmpTable.SSN ) ;
Do you have keys in all your tables? Keys are mandatory in all tables.
Without them, you are mostly left with unmanageable mess.
Anith|||"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote:
>Please post your DDL + INSERT statements of sample data that are causing th
e
>problem.
CREATE TABLE [EmpTable] (
[EID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[ssn] [char] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
CONSTRAINT [PK_EmpTable_1] PRIMARY KEY CLUSTERED
(
[EID]
) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE TABLE [NewEID] (
[Tech_SSN] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[Tech_EID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL
) ON [PRIMARY]
GO
Insert ('12345', '111111111) into EmpTable
Insert ('12346', '111111111) into EmpTable
Insert ('111111111', '123456') into NewEID
The first record in EmpTable can up updated, but when it hits the
second, the update fails.
-John|||What are the desired results of the UPDATE, i.e. what should the rows in
EmpTable look like after the update?
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"John Baima" <john@.nospam.com> wrote in message
news:9qhqs19sf1e2qi3nqc29mq0ud9p8terd1a@.
4ax.com...
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote:
>Please post your DDL + INSERT statements of sample data that are causing
>the
>problem.
CREATE TABLE [EmpTable] (
[EID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[ssn] [char] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
CONSTRAINT [PK_EmpTable_1] PRIMARY KEY CLUSTERED
(
[EID]
) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE TABLE [NewEID] (
[Tech_SSN] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[Tech_EID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL
) ON [PRIMARY]
GO
Insert ('12345', '111111111) into EmpTable
Insert ('12346', '111111111) into EmpTable
Insert ('111111111', '123456') into NewEID
The first record in EmpTable can up updated, but when it hits the
second, the update fails.
-John|||"Anith Sen" <anith@.bizdatasolutions.com> wrote:
>Do you have keys in all your tables? Keys are mandatory in all tables.
>Without them, you are mostly left with unmanageable mess.
I posted the DDL just after this post. Keys are not mandatory but what
I inherited is certainly a mess.
-John|||>>Do you have keys in all your tables? Keys are mandatory in all tables.
> I posted the DDL just after this post. Keys are not mandatory
I think he meant theoretically, not technically. What is a table without a
key? In most cases, a mess, by definition.|||John Baima <john@.nospam.com> wrote:
>I am getting a primary key violation with an update.
As I've looked at these tables for awhile, I think that I can solve
the problem by filtering out duplicates. Is there a general way of
finding duplicate records and then deleting just one? In this case, I
really don't care which record is deleted.
Thanks!
-John|||>> Is there a general way of finding duplicate records and then deleting
KBA ( support.microsoft.com ): 139444
Anith|||On Tue, 17 Jan 2006 19:15:06 GMT, John Baima wrote:
>I am getting a primary key violation with an update.
>My update statement is like
>update e
> set e.EID = neid.New_EID
>from EmpTable e
> inner join NewEID neid on neid.Tech_SSN = e.SSN
>and neid.New_EID not in (Select EID from EmpTable)
>The problem is that the final (Select EID from EmpTable) is not
>refreshed after each update
(snip)
Hi John,
"Each update"? There's only one update in this code!
Remember that SQL is a set-based language. That extends to the
interpretation of data modification statements as well. Rows are not
updated one by one, as you seem to think. The entire results of the
UPDATE statement are first built in a temp holding place; after that,
all affected rows are changed, all at the same time.
The actual implementation doesn't have to follow this to the letter, but
the results should be the same as if it does.
Hugo Kornelis, SQL Server MVP
Wednesday, March 21, 2012
primary key in datarow after update works in access not in sql server
a while back i had to do a project with an access database, one of the biggest problems i had back then was gettting the primary key
of a datarow you had just inserted into the database.
After a long set of trial and error i came up with the following:
- add the tablemappings of a table
- call the dataadapte.fillschema method
then after inserting a new row into the database the primary key gets filled in automatically!
now thing is
i was hoping to duplicate this in sql server
but it doesn't seem to work at all
so after i insert a row into my datatable
and update it
the row is in the database
but in vb the datarow primary key is not filled in!
anyone have an idea?
prefereabely one that does not resort to stored procedures with return parameters etc
thx a million in advance!Try the solution in this post to get started. Hope this helps.
http://forums.asp.net/967888/ShowPost.aspx
Monday, March 12, 2012
primary key
I need to update a table on a server from my PDA, so what I am doing is the
following:
I pull the table to the PDA via RDA Pull. Tracking is ON and the table has
an autoincrement primary key as well. All I want to do is add to this table
the data captured by my PDA (so I am not interested in any data coming from
the server thus I am using a filter to bring an effectively empty table..)
Then, I copy all the data from my local table to this newly pulled table ...
I do an INSERT INTO Table (col1, col2, ..) select col1, col2, ... FROM the
local PDA table.. My records get copied and now I am ready to send them via
a PUSH. The problem is of course that since my newly pulled table didn't
have any records to start with, its primary key starts to increment from
1... and when I do a PUSH there is a problem because such a primary key w/ a
value of 1 already exists on the table on the server side... so in order to
force it to count from where it should, I did the following:
Instead of pulling an empty table from the server, I pull the last record
in.. I just do this in my PULL call: select * from server-table where pkey =
(select max(pkey) from server-table).. where pkey is the primary key. This
will give me the last row (the highest value of the primary key). Then, I do
the copy from the local PDA table to this newly pulled table so its primary
key instead of incremeting from 1, it increments from where it should...
Then, I do a PUSH...
Is there a better approach for this kind of situation? Anyway, I have
problems with this approach because in the future I may have multiple PDAs
that want to send their local data to the server table and then it will be a
primary key mess..

I would be really grateful if you know of a better way or at least to
confirm that this is a reasonsable way of doing things,
Thanks!
you can try to manage identity columns in an RDA architecture, but as
you said, it gets very difficult across a large pool of mobile users. you'd
be better off using a GUID and the NewID() function as your primary
key on this table. then you don't have to worry about ranges and conflicts.
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com
"vvf" <novvfspam@.hotmail.com> wrote in message
news:e5gz%23chyFHA.720@.TK2MSFTNGP15.phx.gbl...
> Hi All,
> I need to update a table on a server from my PDA, so what I am doing is
> the
> following:
> I pull the table to the PDA via RDA Pull. Tracking is ON and the table has
> an autoincrement primary key as well. All I want to do is add to this
> table
> the data captured by my PDA (so I am not interested in any data coming
> from
> the server thus I am using a filter to bring an effectively empty table..)
> Then, I copy all the data from my local table to this newly pulled table
> ...
> I do an INSERT INTO Table (col1, col2, ..) select col1, col2, ... FROM the
> local PDA table.. My records get copied and now I am ready to send them
> via
> a PUSH. The problem is of course that since my newly pulled table didn't
> have any records to start with, its primary key starts to increment from
> 1... and when I do a PUSH there is a problem because such a primary key w/
> a
> value of 1 already exists on the table on the server side... so in order
> to
> force it to count from where it should, I did the following:
> Instead of pulling an empty table from the server, I pull the last record
> in.. I just do this in my PULL call: select * from server-table where pkey
> =
> (select max(pkey) from server-table).. where pkey is the primary key.
> This
> will give me the last row (the highest value of the primary key). Then, I
> do
> the copy from the local PDA table to this newly pulled table so its
> primary
> key instead of incremeting from 1, it increments from where it should...
> Then, I do a PUSH...
> Is there a better approach for this kind of situation? Anyway, I have
> problems with this approach because in the future I may have multiple PDAs
> that want to send their local data to the server table and then it will be
> a
> primary key mess..

> I would be really grateful if you know of a better way or at least to
> confirm that this is a reasonsable way of doing things,
> Thanks!
>
>
|||> you can try to manage identity columns in an RDA architecture, but as
> you said, it gets very difficult across a large pool of mobile users.
> you'd
> be better off using a GUID and the NewID() function as your primary
> key on this table. then you don't have to worry about ranges and
> conflicts.
The problem is that it is not to fun to maintain a databas where primary
keys are GUID.
select * from Customer
where CustId = 123A224D-916E-40DA-B159-6E1E399D4A50
Ola Ekelund
SoftConsult, SWEDEN
|||Hi,
"Darren Shaffer" <darrenshaffer@.discussions.microsoft.com> wrote in message
news:#eM6$viyFHA.2516@.TK2MSFTNGP12.phx.gbl...
> you can try to manage identity columns in an RDA architecture, but as
> you said, it gets very difficult across a large pool of mobile users.
you'd
> be better off using a GUID and the NewID() function as your primary
> key on this table. then you don't have to worry about ranges and
conflicts.
Thanks for the answer. Copying from the local PDA table to the newly pulled
table should be done via a stored procedure right? (to improve
performance)... that's just because I always have to do the INSERT INTO...
SELECT FROM.
The other question that I have is: Let's say I have two PDAs that are trying
to do a PUSH. The first PDA does the PUSH first, and thus SQL Server is busy
receiving the PUSH from the first PDA. Meanwhile, before this PUSH is over,
the second PDA is attempting a PULL and then a PUSH... would a second PUSH
be a problem because the SQL Server would be busy "processing" the first
PUSH from the first PDA? Or should it just spawn a different thread and
server the second PUSH as well even though the first PUSH has not completed
yet?
Thanks!
Friday, March 9, 2012
'PRIMARY' filegroup is full (yet another)
I am getting this error on the database msdb when trying to update a DTS
package.
When I look at msdb, it is set to automatically grow and autoshrink is off.
I changed the auto-grow on the MDF file to 10% but that didn't help.
I then tried changing the space allocated - on the Data Files tab in the
Properties menu after right-clicking the database in Enterprise Manager. As
soon as I hit "OK", the size changes back to the original (too small) value
and nothing has changed. What else could be wrong, and why can't I change
the size?
Thanks
Les
Try changing the size using ALTER DATABASE and see if you get any error message. Also see if you
have autoshrink turned on for the database.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Les Russell" <LesRussell@.discussions.microsoft.com> wrote in message
news:4D994768-4737-4CA9-9817-BFE42C083317@.microsoft.com...
> Hello,
> I am getting this error on the database msdb when trying to update a DTS
> package.
> When I look at msdb, it is set to automatically grow and autoshrink is off.
> I changed the auto-grow on the MDF file to 10% but that didn't help.
> I then tried changing the space allocated - on the Data Files tab in the
> Properties menu after right-clicking the database in Enterprise Manager. As
> soon as I hit "OK", the size changes back to the original (too small) value
> and nothing has changed. What else could be wrong, and why can't I change
> the size?
> Thanks
> Les
|||With an 'is it plugged in question' (because all your factors were within
SS)--is there enough room on the disk?
Joseph R.P. Maloney, CSP,CCP,CDP
"Tibor Karaszi" wrote:
> Try changing the size using ALTER DATABASE and see if you get any error message. Also see if you
> have autoshrink turned on for the database.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Les Russell" <LesRussell@.discussions.microsoft.com> wrote in message
> news:4D994768-4737-4CA9-9817-BFE42C083317@.microsoft.com...
>
|||Hello,
I used the ALTER DATABASE command and it increased the PHYSICAL size of the
file on disk. However it had no effect on the "Space Allocated (MS)" figure
and the database still refuses to expand. Autoshrink os OFF and always has
been.
I tried increasing the MAXSIZE - this also had no effect. This is extremely
frustrating - the server is basically ignoring my instructions. Could it be
a security issue? (although I am getting no warning or error messages). The
owner of the database is sa.
There is 50GB of space left on the disk - no problem there.
We are now stuck in a situation where we cannot modify our DTS packages.
Any help appreciated.
Les
"Tibor Karaszi" wrote:
> Try changing the size using ALTER DATABASE and see if you get any error message. Also see if you
> have autoshrink turned on for the database.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Les Russell" <LesRussell@.discussions.microsoft.com> wrote in message
> news:4D994768-4737-4CA9-9817-BFE42C083317@.microsoft.com...
>
|||I seemed to have got this to work by creating a second file to the PRIMARY
filegroup for the msdb database. However I would still be interested in any
theories as to why I couldn't get the single file to work.
I should mention we are having software RAID problems on this server - I
don't think they are a factor because I am getting no related error messages.
Les
"Les Russell" wrote:
[vbcol=seagreen]
> Hello,
> I used the ALTER DATABASE command and it increased the PHYSICAL size of the
> file on disk. However it had no effect on the "Space Allocated (MS)" figure
> and the database still refuses to expand. Autoshrink os OFF and always has
> been.
> I tried increasing the MAXSIZE - this also had no effect. This is extremely
> frustrating - the server is basically ignoring my instructions. Could it be
> a security issue? (although I am getting no warning or error messages). The
> owner of the database is sa.
> There is 50GB of space left on the disk - no problem there.
> We are now stuck in a situation where we cannot modify our DTS packages.
> Any help appreciated.
> Les
> "Tibor Karaszi" wrote:
'PRIMARY' filegroup is full (yet another)
I am getting this error on the database msdb when trying to update a DTS
package.
When I look at msdb, it is set to automatically grow and autoshrink is off.
I changed the auto-grow on the MDF file to 10% but that didn't help.
I then tried changing the space allocated - on the Data Files tab in the
Properties menu after right-clicking the database in Enterprise Manager. As
soon as I hit "OK", the size changes back to the original (too small) value
and nothing has changed. What else could be wrong, and why can't I change
the size'
Thanks
LesTry changing the size using ALTER DATABASE and see if you get any error mess
age. Also see if you
have autoshrink turned on for the database.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Les Russell" <LesRussell@.discussions.microsoft.com> wrote in message
news:4D994768-4737-4CA9-9817-BFE42C083317@.microsoft.com...
> Hello,
> I am getting this error on the database msdb when trying to update a DTS
> package.
> When I look at msdb, it is set to automatically grow and autoshrink is off
.
> I changed the auto-grow on the MDF file to 10% but that didn't help.
> I then tried changing the space allocated - on the Data Files tab in the
> Properties menu after right-clicking the database in Enterprise Manager.
As
> soon as I hit "OK", the size changes back to the original (too small) valu
e
> and nothing has changed. What else could be wrong, and why can't I change
> the size'
> Thanks
> Les|||With an 'is it plugged in question' (because all your factors were within
SS)--is there enough room on the disk?
--
Joseph R.P. Maloney, CSP,CCP,CDP
"Tibor Karaszi" wrote:
> Try changing the size using ALTER DATABASE and see if you get any error me
ssage. Also see if you
> have autoshrink turned on for the database.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Les Russell" <LesRussell@.discussions.microsoft.com> wrote in message
> news:4D994768-4737-4CA9-9817-BFE42C083317@.microsoft.com...
>|||Hello,
I used the ALTER DATABASE command and it increased the PHYSICAL size of the
file on disk. However it had no effect on the "Space Allocated (MS)" figure
and the database still refuses to expand. Autoshrink os OFF and always has
been.
I tried increasing the MAXSIZE - this also had no effect. This is extremely
frustrating - the server is basically ignoring my instructions. Could it be
a security issue? (although I am getting no warning or error messages). The
owner of the database is sa.
There is 50GB of space left on the disk - no problem there.
We are now stuck in a situation where we cannot modify our DTS packages.
Any help appreciated.
Les
"Tibor Karaszi" wrote:
> Try changing the size using ALTER DATABASE and see if you get any error me
ssage. Also see if you
> have autoshrink turned on for the database.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Les Russell" <LesRussell@.discussions.microsoft.com> wrote in message
> news:4D994768-4737-4CA9-9817-BFE42C083317@.microsoft.com...
>|||I seemed to have got this to work by creating a second file to the PRIMARY
filegroup for the msdb database. However I would still be interested in any
theories as to why I couldn't get the single file to work.
I should mention we are having software RAID problems on this server - I
don't think they are a factor because I am getting no related error messages
.
Les
"Les Russell" wrote:
[vbcol=seagreen]
> Hello,
> I used the ALTER DATABASE command and it increased the PHYSICAL size of th
e
> file on disk. However it had no effect on the "Space Allocated (MS)" figu
re
> and the database still refuses to expand. Autoshrink os OFF and always ha
s
> been.
> I tried increasing the MAXSIZE - this also had no effect. This is extreme
ly
> frustrating - the server is basically ignoring my instructions. Could it
be
> a security issue? (although I am getting no warning or error messages). T
he
> owner of the database is sa.
> There is 50GB of space left on the disk - no problem there.
> We are now stuck in a situation where we cannot modify our DTS packages.
> Any help appreciated.
> Les
> "Tibor Karaszi" wrote:
>
'PRIMARY' filegroup is full (yet another)
I am getting this error on the database msdb when trying to update a DTS
package.
When I look at msdb, it is set to automatically grow and autoshrink is off.
I changed the auto-grow on the MDF file to 10% but that didn't help.
I then tried changing the space allocated - on the Data Files tab in the
Properties menu after right-clicking the database in Enterprise Manager. As
soon as I hit "OK", the size changes back to the original (too small) value
and nothing has changed. What else could be wrong, and why can't I change
the size'
Thanks
LesTry changing the size using ALTER DATABASE and see if you get any error message. Also see if you
have autoshrink turned on for the database.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Les Russell" <LesRussell@.discussions.microsoft.com> wrote in message
news:4D994768-4737-4CA9-9817-BFE42C083317@.microsoft.com...
> Hello,
> I am getting this error on the database msdb when trying to update a DTS
> package.
> When I look at msdb, it is set to automatically grow and autoshrink is off.
> I changed the auto-grow on the MDF file to 10% but that didn't help.
> I then tried changing the space allocated - on the Data Files tab in the
> Properties menu after right-clicking the database in Enterprise Manager. As
> soon as I hit "OK", the size changes back to the original (too small) value
> and nothing has changed. What else could be wrong, and why can't I change
> the size'
> Thanks
> Les|||With an 'is it plugged in question' (because all your factors were within
SS)--is there enough room on the disk?
--
Joseph R.P. Maloney, CSP,CCP,CDP
"Tibor Karaszi" wrote:
> Try changing the size using ALTER DATABASE and see if you get any error message. Also see if you
> have autoshrink turned on for the database.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Les Russell" <LesRussell@.discussions.microsoft.com> wrote in message
> news:4D994768-4737-4CA9-9817-BFE42C083317@.microsoft.com...
> > Hello,
> >
> > I am getting this error on the database msdb when trying to update a DTS
> > package.
> >
> > When I look at msdb, it is set to automatically grow and autoshrink is off.
> > I changed the auto-grow on the MDF file to 10% but that didn't help.
> >
> > I then tried changing the space allocated - on the Data Files tab in the
> > Properties menu after right-clicking the database in Enterprise Manager. As
> > soon as I hit "OK", the size changes back to the original (too small) value
> > and nothing has changed. What else could be wrong, and why can't I change
> > the size'
> >
> > Thanks
> > Les
>|||Hello,
I used the ALTER DATABASE command and it increased the PHYSICAL size of the
file on disk. However it had no effect on the "Space Allocated (MS)" figure
and the database still refuses to expand. Autoshrink os OFF and always has
been.
I tried increasing the MAXSIZE - this also had no effect. This is extremely
frustrating - the server is basically ignoring my instructions. Could it be
a security issue? (although I am getting no warning or error messages). The
owner of the database is sa.
There is 50GB of space left on the disk - no problem there.
We are now stuck in a situation where we cannot modify our DTS packages.
Any help appreciated.
Les
"Tibor Karaszi" wrote:
> Try changing the size using ALTER DATABASE and see if you get any error message. Also see if you
> have autoshrink turned on for the database.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Les Russell" <LesRussell@.discussions.microsoft.com> wrote in message
> news:4D994768-4737-4CA9-9817-BFE42C083317@.microsoft.com...
> > Hello,
> >
> > I am getting this error on the database msdb when trying to update a DTS
> > package.
> >
> > When I look at msdb, it is set to automatically grow and autoshrink is off.
> > I changed the auto-grow on the MDF file to 10% but that didn't help.
> >
> > I then tried changing the space allocated - on the Data Files tab in the
> > Properties menu after right-clicking the database in Enterprise Manager. As
> > soon as I hit "OK", the size changes back to the original (too small) value
> > and nothing has changed. What else could be wrong, and why can't I change
> > the size'
> >
> > Thanks
> > Les
>|||I seemed to have got this to work by creating a second file to the PRIMARY
filegroup for the msdb database. However I would still be interested in any
theories as to why I couldn't get the single file to work.
I should mention we are having software RAID problems on this server - I
don't think they are a factor because I am getting no related error messages.
Les
"Les Russell" wrote:
> Hello,
> I used the ALTER DATABASE command and it increased the PHYSICAL size of the
> file on disk. However it had no effect on the "Space Allocated (MS)" figure
> and the database still refuses to expand. Autoshrink os OFF and always has
> been.
> I tried increasing the MAXSIZE - this also had no effect. This is extremely
> frustrating - the server is basically ignoring my instructions. Could it be
> a security issue? (although I am getting no warning or error messages). The
> owner of the database is sa.
> There is 50GB of space left on the disk - no problem there.
> We are now stuck in a situation where we cannot modify our DTS packages.
> Any help appreciated.
> Les
> "Tibor Karaszi" wrote:
> > Try changing the size using ALTER DATABASE and see if you get any error message. Also see if you
> > have autoshrink turned on for the database.
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> > Blog: http://solidqualitylearning.com/blogs/tibor/
> >
> >
> > "Les Russell" <LesRussell@.discussions.microsoft.com> wrote in message
> > news:4D994768-4737-4CA9-9817-BFE42C083317@.microsoft.com...
> > > Hello,
> > >
> > > I am getting this error on the database msdb when trying to update a DTS
> > > package.
> > >
> > > When I look at msdb, it is set to automatically grow and autoshrink is off.
> > > I changed the auto-grow on the MDF file to 10% but that didn't help.
> > >
> > > I then tried changing the space allocated - on the Data Files tab in the
> > > Properties menu after right-clicking the database in Enterprise Manager. As
> > > soon as I hit "OK", the size changes back to the original (too small) value
> > > and nothing has changed. What else could be wrong, and why can't I change
> > > the size'
> > >
> > > Thanks
> > > Les
> >
> >
Saturday, February 25, 2012
preventing update thru view
A view can actually update the data of a table.
Is there any way for me to create a read-only view ?
thks & rdgs
Hi
Yes, you can
As far as I know there are two ways to accomplish that
1) CREATE VIEW ... WITH VIEW_METADATA
2) CREATE TRIGGER ...INSTEAD OF UPDATE
"maxzsim" <anonymous@.discussions.microsoft.com> wrote in message
news:1b1c01c485b6$3856ef20$a301280a@.phx.gbl...
> Hi ,
> A view can actually update the data of a table.
> Is there any way for me to create a read-only view ?
> thks & rdgs
|||On Wed, 18 Aug 2004 23:31:54 -0700, maxzsim wrote:
>Hi ,
> A view can actually update the data of a table.
> Is there any way for me to create a read-only view ?
>thks & rdgs
Hi Maxzsim,
CREATE TRIGGER DontUpdate
ON MyView
INSTEAD OF INSERT, UPDATE, DELETE
AS
RAISERROR ('This view is read-only', 16, 1)
ROLLBACK TRANSACTION
go
Note: the rollback isn't even necessary, as this trigger is defined as an
"instead of" trigger. Without the rollback, the attempt to update the view
will be disregarded but the rest of the transaction will stick; with the
rollback, the complete transaction will be rolled back. To see this
difference, try the following code with both versions of the trigger:
BEGIN TRANSACTION
UPDATE SomeOtherTable
SET SomeThing = SomeThingElse
WHERE Whatever = WhatYouLike
UPDATE MyView
SET YouNameIt = YouGotIt
WHERE Foo = Bar
COMMIT TRANSACTION
SELECT SomeThing
FROM SomeOtherTable
WHERE Whatever = WhatYouLike
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
|||Hugo
If you have a big update transaction I would not use a trigger with
rollback.
Instead
create table t1 (col1 int,col2 int)
insert into t1 values (1,11)
insert into t1 values (8,10)
select * from t1
CREATE VIEW V1 WITH VIEW_METADATA
AS
SELECT
col1+0 AS col1,
col2+0 AS col2
FROM T1
select * from v1
--error
update v1 set col1=100 where col2=11
go
drop table t1
drop view v1
"Hugo Kornelis" <hugo@.pe_NO_rFact.in_SPAM_fo> wrote in message
news:5ll8i0tvdhfblupp7cbfoaakaqaj1jn4rb@.4ax.com...
> On Wed, 18 Aug 2004 23:31:54 -0700, maxzsim wrote:
>
> Hi Maxzsim,
> CREATE TRIGGER DontUpdate
> ON MyView
> INSTEAD OF INSERT, UPDATE, DELETE
> AS
> RAISERROR ('This view is read-only', 16, 1)
> ROLLBACK TRANSACTION
> go
> Note: the rollback isn't even necessary, as this trigger is defined as an
> "instead of" trigger. Without the rollback, the attempt to update the view
> will be disregarded but the rest of the transaction will stick; with the
> rollback, the complete transaction will be rolled back. To see this
> difference, try the following code with both versions of the trigger:
> BEGIN TRANSACTION
> UPDATE SomeOtherTable
> SET SomeThing = SomeThingElse
> WHERE Whatever = WhatYouLike
> UPDATE MyView
> SET YouNameIt = YouGotIt
> WHERE Foo = Bar
> COMMIT TRANSACTION
> SELECT SomeThing
> FROM SomeOtherTable
> WHERE Whatever = WhatYouLike
>
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
|||How about using permissions, to control access to this view. You can have a
view, and grant only SELECT permissions on that view to your users.
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"maxzsim" <anonymous@.discussions.microsoft.com> wrote in message
news:1b1c01c485b6$3856ef20$a301280a@.phx.gbl...
Hi ,
A view can actually update the data of a table.
Is there any way for me to create a read-only view ?
thks & rdgs
preventing update thru view
A view can actually update the data of a table.
Is there any way for me to create a read-only view ?
thks & rdgsHi
Yes, you can
As far as I know there are two ways to accomplish that
1) CREATE VIEW ... WITH VIEW_METADATA
2) CREATE TRIGGER ...INSTEAD OF UPDATE
"maxzsim" <anonymous@.discussions.microsoft.com> wrote in message
news:1b1c01c485b6$3856ef20$a301280a@.phx.gbl...
> Hi ,
> A view can actually update the data of a table.
> Is there any way for me to create a read-only view ?
> thks & rdgs|||On Wed, 18 Aug 2004 23:31:54 -0700, maxzsim wrote:
>Hi ,
> A view can actually update the data of a table.
> Is there any way for me to create a read-only view ?
>thks & rdgs
Hi Maxzsim,
CREATE TRIGGER DontUpdate
ON MyView
INSTEAD OF INSERT, UPDATE, DELETE
AS
RAISERROR ('This view is read-only', 16, 1)
ROLLBACK TRANSACTION
go
Note: the rollback isn't even necessary, as this trigger is defined as an
"instead of" trigger. Without the rollback, the attempt to update the view
will be disregarded but the rest of the transaction will stick; with the
rollback, the complete transaction will be rolled back. To see this
difference, try the following code with both versions of the trigger:
BEGIN TRANSACTION
UPDATE SomeOtherTable
SET SomeThing = SomeThingElse
WHERE Whatever = WhatYouLike
UPDATE MyView
SET YouNameIt = YouGotIt
WHERE Foo = Bar
COMMIT TRANSACTION
SELECT SomeThing
FROM SomeOtherTable
WHERE Whatever = WhatYouLike
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Hugo
If you have a big update transaction I would not use a trigger with
rollback.
Instead
create table t1 (col1 int,col2 int)
insert into t1 values (1,11)
insert into t1 values (8,10)
select * from t1
CREATE VIEW V1 WITH VIEW_METADATA
AS
SELECT
col1+0 AS col1,
col2+0 AS col2
FROM T1
select * from v1
--error
update v1 set col1=100 where col2=11
go
drop table t1
drop view v1
"Hugo Kornelis" <hugo@.pe_NO_rFact.in_SPAM_fo> wrote in message
news:5ll8i0tvdhfblupp7cbfoaakaqaj1jn4rb@.
4ax.com...
> On Wed, 18 Aug 2004 23:31:54 -0700, maxzsim wrote:
>
> Hi Maxzsim,
> CREATE TRIGGER DontUpdate
> ON MyView
> INSTEAD OF INSERT, UPDATE, DELETE
> AS
> RAISERROR ('This view is read-only', 16, 1)
> ROLLBACK TRANSACTION
> go
> Note: the rollback isn't even necessary, as this trigger is defined as an
> "instead of" trigger. Without the rollback, the attempt to update the view
> will be disregarded but the rest of the transaction will stick; with the
> rollback, the complete transaction will be rolled back. To see this
> difference, try the following code with both versions of the trigger:
> BEGIN TRANSACTION
> UPDATE SomeOtherTable
> SET SomeThing = SomeThingElse
> WHERE Whatever = WhatYouLike
> UPDATE MyView
> SET YouNameIt = YouGotIt
> WHERE Foo = Bar
> COMMIT TRANSACTION
> SELECT SomeThing
> FROM SomeOtherTable
> WHERE Whatever = WhatYouLike
>
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)|||How about using permissions, to control access to this view. You can have a
view, and grant only SELECT permissions on that view to your users.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"maxzsim" <anonymous@.discussions.microsoft.com> wrote in message
news:1b1c01c485b6$3856ef20$a301280a@.phx.gbl...
Hi ,
A view can actually update the data of a table.
Is there any way for me to create a read-only view ?
thks & rdgs
preventing update thru view
A view can actually update the data of a table.
Is there any way for me to create a read-only view ?
thks & rdgsHi
Yes, you can
As far as I know there are two ways to accomplish that
1) CREATE VIEW ... WITH VIEW_METADATA
2) CREATE TRIGGER ...INSTEAD OF UPDATE
"maxzsim" <anonymous@.discussions.microsoft.com> wrote in message
news:1b1c01c485b6$3856ef20$a301280a@.phx.gbl...
> Hi ,
> A view can actually update the data of a table.
> Is there any way for me to create a read-only view ?
> thks & rdgs|||On Wed, 18 Aug 2004 23:31:54 -0700, maxzsim wrote:
>Hi ,
> A view can actually update the data of a table.
> Is there any way for me to create a read-only view ?
>thks & rdgs
Hi Maxzsim,
CREATE TRIGGER DontUpdate
ON MyView
INSTEAD OF INSERT, UPDATE, DELETE
AS
RAISERROR ('This view is read-only', 16, 1)
ROLLBACK TRANSACTION
go
Note: the rollback isn't even necessary, as this trigger is defined as an
"instead of" trigger. Without the rollback, the attempt to update the view
will be disregarded but the rest of the transaction will stick; with the
rollback, the complete transaction will be rolled back. To see this
difference, try the following code with both versions of the trigger:
BEGIN TRANSACTION
UPDATE SomeOtherTable
SET SomeThing = SomeThingElse
WHERE Whatever = WhatYouLike
UPDATE MyView
SET YouNameIt = YouGotIt
WHERE Foo = Bar
COMMIT TRANSACTION
SELECT SomeThing
FROM SomeOtherTable
WHERE Whatever = WhatYouLike
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||>--Original Message--
>Hi ,
> A view can actually update the data of a table.
> Is there any way for me to create a read-only view ?
>thks & rdgs
>.
>|||Hugo
If you have a big update transaction I would not use a trigger with
rollback.
Instead
create table t1 (col1 int,col2 int)
insert into t1 values (1,11)
insert into t1 values (8,10)
select * from t1
CREATE VIEW V1 WITH VIEW_METADATA
AS
SELECT
col1+0 AS col1,
col2+0 AS col2
FROM T1
select * from v1
--error
update v1 set col1=100 where col2=11
go
drop table t1
drop view v1
"Hugo Kornelis" <hugo@.pe_NO_rFact.in_SPAM_fo> wrote in message
news:5ll8i0tvdhfblupp7cbfoaakaqaj1jn4rb@.4ax.com...
> On Wed, 18 Aug 2004 23:31:54 -0700, maxzsim wrote:
> >Hi ,
> >
> > A view can actually update the data of a table.
> >
> > Is there any way for me to create a read-only view ?
> >
> >thks & rdgs
> Hi Maxzsim,
> CREATE TRIGGER DontUpdate
> ON MyView
> INSTEAD OF INSERT, UPDATE, DELETE
> AS
> RAISERROR ('This view is read-only', 16, 1)
> ROLLBACK TRANSACTION
> go
> Note: the rollback isn't even necessary, as this trigger is defined as an
> "instead of" trigger. Without the rollback, the attempt to update the view
> will be disregarded but the rest of the transaction will stick; with the
> rollback, the complete transaction will be rolled back. To see this
> difference, try the following code with both versions of the trigger:
> BEGIN TRANSACTION
> UPDATE SomeOtherTable
> SET SomeThing = SomeThingElse
> WHERE Whatever = WhatYouLike
> UPDATE MyView
> SET YouNameIt = YouGotIt
> WHERE Foo = Bar
> COMMIT TRANSACTION
> SELECT SomeThing
> FROM SomeOtherTable
> WHERE Whatever = WhatYouLike
>
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)|||How about using permissions, to control access to this view. You can have a
view, and grant only SELECT permissions on that view to your users.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"maxzsim" <anonymous@.discussions.microsoft.com> wrote in message
news:1b1c01c485b6$3856ef20$a301280a@.phx.gbl...
Hi ,
A view can actually update the data of a table.
Is there any way for me to create a read-only view ?
thks & rdgs