Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Thursday, March 29, 2012

Changing connection credentials

Hi,
I would like to change the credentials that are used at run time by the
reportserver service to connect to the SQL Server instance.
Can anybody please help me?
Regards!!Cookie =EB=FA=E1:
> Hi,
> I would like to change the credentials that are used at run time by the
> reportserver service to connect to the SQL Server instance.
> Can anybody please help me?
> Regards!!
http://support.microsoft.com/?id=3D306158
Impersonate a Specific User in Code
To impersonate a specific user only when you run a particular section
of code, use the following code:
<%@. Page Language=3D"C#"%>
<%@. Import Namespace =3D "System.Web" %>
<%@. Import Namespace =3D "System.Web.Security" %>
<%@. Import Namespace =3D "System.Security.Principal" %>
<%@. Import Namespace =3D "System.Runtime.InteropServices" %>
<script runat=3Dserver>
public const int LOGON32_LOGON_INTERACTIVE =3D 2;
public const int LOGON32_PROVIDER_DEFAULT =3D 0;
WindowsImpersonationContext impersonationContext;
[DllImport("advapi32.dll")]
public static extern int LogonUserA(String lpszUserName,
String lpszDomain,
String lpszPassword,
int dwLogonType,
int dwLogonProvider,
ref IntPtr phToken);
[DllImport("advapi32.dll", CharSet=3DCharSet.Auto, SetLastError=3Dtrue)]
public static extern int DuplicateToken(IntPtr hToken,
int impersonationLevel,
ref IntPtr hNewToken);
[DllImport("advapi32.dll", CharSet=3DCharSet.Auto, SetLastError=3Dtrue)]
public static extern bool RevertToSelf();
[DllImport("kernel32.dll", CharSet=3DCharSet.Auto)]
public static extern bool CloseHandle(IntPtr handle);
public void Page_Load(Object s, EventArgs e)
{
if(impersonateValidUser("username", "domain", "password"))
{
//Insert your code that runs under the security context of a specific
user here.
undoImpersonation();
}
else
{
//Your impersonation failed. Therefore, include a fail-safe mechanism
here.
}
}
private bool impersonateValidUser(String userName, String domain,
String password)
{
WindowsIdentity tempWindowsIdentity;
IntPtr token =3D IntPtr.Zero;
IntPtr tokenDuplicate =3D IntPtr.Zero;
if(RevertToSelf())
{
if(LogonUserA(userName, domain, password, LOGON32_LOGON_INTERACTIVE,
LOGON32_PROVIDER_DEFAULT, ref token) !=3D 0)
{
if(DuplicateToken(token, 2, ref tokenDuplicate) !=3D 0)
{
tempWindowsIdentity =3D new WindowsIdentity(tokenDuplicate);
impersonationContext =3D tempWindowsIdentity.Impersonate();
if (impersonationContext !=3D null)
{
CloseHandle(token);
CloseHandle(tokenDuplicate);
return true;
}
}
}
}
if(token!=3D IntPtr.Zero)
CloseHandle(token);
if(tokenDuplicate!=3DIntPtr.Zero)
CloseHandle(tokenDuplicate);
return false;
}
private void undoImpersonation()
{
impersonationContext.Undo();
}
</script>

Tuesday, March 27, 2012

Changing Column Name on a table

Hi All,
I am trying to change column name on an existing table. I am using SQL
Server 7.

As the table is quite big, it is taking quite long time to do it.
By the way I could change the column name only through the Enterprize
Manager.

Is it possible to change the column name using SQL script?
Why the change of column name will depend on the size of the table?

Thanks for your answer.

-MoklesYou can change a column name using sp_rename.

EXEC sp_rename 'MyTable.OldColumnName', 'NewColumnName', 'COLUMN'

See the Books Online for more information.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"mokles" <mokles@.rogers.com> wrote in message
news:wIGdnaGM46YtX_jcRVn-oA@.rogers.com...
> Hi All,
> I am trying to change column name on an existing table. I am using SQL
> Server 7.
> As the table is quite big, it is taking quite long time to do it.
> By the way I could change the column name only through the Enterprize
> Manager.
> Is it possible to change the column name using SQL script?
> Why the change of column name will depend on the size of the table?
> Thanks for your answer.
> -Mokles|||Hi Mokles

Have you tried to rename the field using sp_rename.

Enterprise manager does the job using same kind of scripts but its not
intelligent enough I have observed in various scenarios that sometimes
it accomplishes simple tasks using long approach.

I wonder if there are any indexes on the table ?

Regards
Shehzad

"mokles" <mokles@.rogers.com> wrote in message news:<wIGdnaGM46YtX_jcRVn-oA@.rogers.com>...
> Hi All,
> I am trying to change column name on an existing table. I am using SQL
> Server 7.
> As the table is quite big, it is taking quite long time to do it.
> By the way I could change the column name only through the Enterprize
> Manager.
> Is it possible to change the column name using SQL script?
> Why the change of column name will depend on the size of the table?
> Thanks for your answer.
> -Mokles|||I could do it using Sp_Rename.
Enterprize Manager was using complicated method to do the simple task
Anyway thanks for the help

-Mokles

"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:6Qk9d.2605$Al3.1466@.newssvr30.news.prodigy.co m...
> You can change a column name using sp_rename.
> EXEC sp_rename 'MyTable.OldColumnName', 'NewColumnName', 'COLUMN'
> See the Books Online for more information.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "mokles" <mokles@.rogers.com> wrote in message
> news:wIGdnaGM46YtX_jcRVn-oA@.rogers.com...
> > Hi All,
> > I am trying to change column name on an existing table. I am using SQL
> > Server 7.
> > As the table is quite big, it is taking quite long time to do it.
> > By the way I could change the column name only through the Enterprize
> > Manager.
> > Is it possible to change the column name using SQL script?
> > Why the change of column name will depend on the size of the table?
> > Thanks for your answer.
> > -Mokles|||Today I tried to do it with sp_Rename and it worked well and fast.

Previously I was using profiler to see what the Enterprize Manager was
doing. And really it was using complicated method to change the column name.

Thanks all for the help

-Mokles

"Shehzad Shabbir" <shehzad@.internav.com> wrote in message
news:503e40d5.0410071952.643d25ee@.posting.google.c om...
> Hi Mokles
> Have you tried to rename the field using sp_rename.
> Enterprise manager does the job using same kind of scripts but its not
> intelligent enough I have observed in various scenarios that sometimes
> it accomplishes simple tasks using long approach.
> I wonder if there are any indexes on the table ?
> Regards
> Shehzad
>
> "mokles" <mokles@.rogers.com> wrote in message
news:<wIGdnaGM46YtX_jcRVn-oA@.rogers.com>...
> > Hi All,
> > I am trying to change column name on an existing table. I am using SQL
> > Server 7.
> > As the table is quite big, it is taking quite long time to do it.
> > By the way I could change the column name only through the Enterprize
> > Manager.
> > Is it possible to change the column name using SQL script?
> > Why the change of column name will depend on the size of the table?
> > Thanks for your answer.
> > -Mokles

Sunday, March 25, 2012

Changing Chart with dynamically

Hi,

I have a chart which gets generated dynamically for as many months as specified in the front end.But every time the width of the chart remains constant.How do i make it change as per the No: of months to be displayed?

One way of doing this is to apply an approach described in this related thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=369675&SiteID=1

-- Robert

Monday, March 19, 2012

changes log

I want to keep a simple table that logs each time an item in inventory is changed.

Here is the table I came up with thoe track this:

CHANGES_LOG
-------
ITEM_NAME
SERIAL_NUM
_DATE
USER_ID
CHANGES_MADE

I would like to capture the name of each field which is changed. I'm sure other people have implemented something like this before, can anyone please give me some advice on how to capture this, when and where?I have found it more helpful to log the specific field name, the old value and the new value, as opposed to a "CHANGES_MADE" column which would probably have a bunch of stuff jumbled together.

CHANGES_LOG
-------
ITEM_NAME
SERIAL_NUM
_DATE
USER_ID
FIELDNAME
OLD_VALUE
NEW_VALUE

Currently, we have a trigger doing the insert into the log table. This seemed to be the logical place to do it, since every change would be captured regardless of what method would be used to make the change.

However, we are considering moving the logging code into a stored procedure and then calling this stored procedure from the different stored procedures which update the inventory table. One of the reasons among others is the needed ability to capture the user ID.

Terri|||Thanks a lot for the response.

I am still wondering how specifically you determined which field was changed? How does the trigger get the values?

I have not used triggers much because in my classes (I am not working at a co-op), they always told me that triggers were buggy and undependable, therefore use stored procedures whenever possible.|||


if update(<columnname>)

tells you if a particular column has been modified..

HTH|||Wow I never knew you could do that, that is awesome!|||::I have not used triggers much because in my classes (I am not working at a co-op), they
::always told me that triggers were buggy and undependable, therefore use stored
::procedures whenever possible.

i have designed an inventory maanegment system at my work palce. we have 9-10 branch offices at various locations within 10 mi frm our main office. every time the branch offices make a sale, their inventory goes down (obviously)...i have used triggers to create purchase orders anytime their inventory goes down a certain level ( as set in the Re Order Level) and it automatically creates a purchase order in another table ( for the Re-Order Quantity)..so the manager (or admin) from the main branch can always know the xact inventory level at each branch offices and ship them the inventory they need..the branch offices need not even call the main office "hey we need some inventory"..'coz its already on the way.

all the triggers work perfectly in my case..
the disadv with triggers is tht they are not under your control..they are fired automatically..so you should be pretty careful with the code on when to fire them..
stored procs on the other hand, have to ( can) be called manually...they are not really a replacement for each other..each has its own situations..

HTH|||Okay - sorry about the late reply, I was out sick.

I have decided to use a trigger but I am still not understanding how to get all the data from the trigger such as . .

CHANGES_LOG
-------
ITEM_NAME
SERIAL_NUM
_DATE
USER_ID
FIELDNAME
OLD_VALUE
NEW_VALUE

I know how to get FIELDNAME using IF UPDATE as above and I can get _DATE using GETDATE() but how to I determine the rest of it from the trigger?
Can someone help?|||This is what I am suggesting:

CHANGES_LOG
-------
ITEM_NAME --> this should be the primary key --> inserted.item_name
SERIAL_NUM --> not sure what your intention is here
_DATE --> GETDATE()
USER_ID --> ay, there's the rub
FIELDNAME --> if the test for IF UPDATE('fieldname') is true, that's the fieldname
OLD_VALUE --> deleted.fieldname
NEW_VALUE --> inserted.fieldname

If you are looking for the User ID from your application's users credentials, you will not be able to get to this information. The best you can do is to have a USER_ID column in your table and make sure to update this with your calling stored procedure. You would then use inserted.USER_ID to capture the current USER_ID on the record, which may or may not be the user who made the update.

You can also use SUSER_SNAME(), which will give you the Windows authenticated user's name.

So, what I am saying is you might consider having an "SUSER" column as well as a "USER_ID" column. The SUSER column will contain Windows user name, and the USER_ID column will contain the USER_ID that was in the record at the time it was updated.

Terri|||OK that helped a lot but I am wondering. .

inserted.item_name gives you the item_name of the item which caused the trigger right? if the trigger therefore was called by UPDATE then you would use updated.item_name?

You brought up a good point, I probably don't need to store the serial num because I could look it up from the other table, with the primary key - unless that item was deleted. But I guess that is a whole other issue. I just know that the users want to be able to view the serial number of an item that was deleted or updated.

I am using windows authentication for my application anyway so wouldn't SUSER_SNAME() be what I need? I think it will. Because I was thinking that USER_ID would capture some kind of SQL user ID and that is not what I want, that does identify individuals.|||OK I think I have got it. Should this work?


CREATE TRIGGER ROUTERS_Trigger1
ON dbo.ROUTERS
FOR UPDATE
AS
DECLARE @.TEMP AS nvarchar(50)
IF UPDATE (ROUTER_NAME)
BEGIN
SET @.TEMP = 'ROUTER_NAME'
END
IF UPDATE (SERIAL_NUM)
BEGIN
SET @.TEMP = 'SERIAL_NUM'
END
IF UPDATE (MODEL)
BEGIN
SET @.TEMP = 'MODEL'
END
IF UPDATE (IOS_VER)
BEGIN
SET @.TEMP = 'IOS_VER'
END
IF UPDATE (IOS_BASED)
BEGIN
SET @.TEMP = 'IOS_BASED'
END

INSERT INTO CHANGES_LOG (ITEM_NAME, _DATE, [USER_ID], FIELDNAME, OLD_VALUE, NEW_VALUE)
VALUES (inserted.ITEM_NAME, GETDATE(), SUSER_SNAME(), @.TEMP, deleted.@.TEMP, inserted.@.TEMP)

Also what happens if several fields are changed? If there a row in the Changes_log for each one? Do I need to use a different trigger for logging INSERTS and UPDATES to Routers table?|||You should read up on triggers in Books Online. This should help clarify a few things for you.

In a trigger, the "deleted" table holds the values of the data as they were BEFORE the update happened. The "inserted" table holds the values of the data AFTER the updated. There is no "updated" table.

It sounds like SUSER_SNAME() will do the trick for you.

I am not certain of the purpose of your ITEM_NAME and SERIAL_NUM columns so I can't really comment on that. In our inventory management system, we do not physically delete inventory records; we mark them as "inactive". So we do not have the problem of disappearing items.

Terri|||When I try to use the code I posted above, I get an error for trying to insert the value inserter.ROUTER_NAME (which is the primary key of ROUTERS table) I am using visual studio and when I try to save the trigger it says:

ADO error: The Name 'ROUTER_NAME' is not permitted in this context. Only constants, expressions, or variables are allowed here. Column Names are not permitted.

Thanks!!|||you prbly might have to take those values into some variables...
ex:


select @.instemp=inserted.<colname>from inserted
select @.deltemp=deleted.<colname> from deleted

and use these variables in your insert stmt..

HTH|||Okay sorry I haven't been working on this lately. I was wrong, the SUSER_SNAME is not working for me because I am connecting using a SQL user_id and password and it always gives me that User ID, not the windows one. When I tryed to connected to SQL using windows auth. I think it only connects with one generic ASPNET user?!?

So I guess I will not be able to capture the user ID that way. . . .

Changeing default value of tempdb

Hi All
For one of our SQL server 2000 database tempdb size is origionally set to
"8KB"(That is default value). After monitoring it for some time, I think we
need to change the default value to "650 KB".
Can I change the default value while the server is online (so that on next
reboot it automatically changes) or I need to reboot the server.
In any case what is the best way and commands to do this?
Thanks
Hi db
Where are you getting this value from? Are you sure you don't mean MB?
In any case, you can change the tempdb startup size with the ALTER DATABASE
command, to change the size of the primary file. Look up ALTER DATABASE in
the Books Online, and read about the MODIFY FILE option for the details
HTH
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
http://sqlblog.com
"db" <db@.discussions.microsoft.com> wrote in message
news:4F42449A-8D85-4287-906A-5B90F3AA115A@.microsoft.com...
> Hi All
> For one of our SQL server 2000 database tempdb size is origionally set to
> "8KB"(That is default value). After monitoring it for some time, I think
> we
> need to change the default value to "650 KB".
> Can I change the default value while the server is online (so that on next
> reboot it automatically changes) or I need to reboot the server.
> In any case what is the best way and commands to do this?
> Thanks
> --
>
|||I got the values from Best practice analyzer tool results for sql server
2000. Also I am monitoring size of tempdb.mdf/ldf files on the disk. Few
months back tempdb shot up to few GB, but that may be a bad query or
something.
From your response it looks like I need not reboot the server?
Thanks .. go through books on line now.
"Kalen Delaney" wrote:

> Hi db
> Where are you getting this value from? Are you sure you don't mean MB?
> In any case, you can change the tempdb startup size with the ALTER DATABASE
> command, to change the size of the primary file. Look up ALTER DATABASE in
> the Books Online, and read about the MODIFY FILE option for the details
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.InsideSQLServer.com
> http://sqlblog.com
>
> "db" <db@.discussions.microsoft.com> wrote in message
> news:4F42449A-8D85-4287-906A-5B90F3AA115A@.microsoft.com...
>
>
|||> I got the values from Best practice analyzer tool results for sql server[vbcol=seagreen]
> 2000. Also I am monitoring size of tempdb.mdf/ldf files on the disk. Few
> months back tempdb shot up to few GB, but that may be a bad query or
> something.
> From your response it looks like I need not reboot the server?
> Thanks .. I will go through books on line for details.
> --
>
> "Kalen Delaney" wrote:
|||How did you get the value for YOUR tempdb from the BPA tool? How do you know
YOUR tempdb is 8KB?
650 KB is still way too small. Can you elaborate on how you got this value?
Whether or not you need to reboot your server depends on what you want to
accomplish. The default size of tempdb means the size it starts up with,
when you reboot. So if you change the size with ALTER DATABASE, it won't
take affect until you reboot. But if tempdb is large enough for right now,
maybe you don't need to reboot.
HTH
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
http://sqlblog.com
"db" <db@.discussions.microsoft.com> wrote in message
news:A7749815-A31F-453E-BC3F-2839977BA763@.microsoft.com...[vbcol=seagreen]
>I got the values from Best practice analyzer tool results for sql server
> 2000. Also I am monitoring size of tempdb.mdf/ldf files on the disk. Few
> months back tempdb shot up to few GB, but that may be a bad query or
> something.
> From your response it looks like I need not reboot the server?
> Thanks .. go through books on line now.
> --
>
> "Kalen Delaney" wrote:
|||My Typo. Tempdb.mdf file is 655 MB or 670,700 KB on disk. Tempdb is set to
autogrow and it grow from 8MB to 655MB. I do not want to reboot the server
now, but change the default value of tempdb(Whenever reboot happens it should
change) .
Can i change it from
sql enterprise manager --> database-->properties-->datafiles-->space
allocated (Change value here)
"Kalen Delaney" wrote:

> How did you get the value for YOUR tempdb from the BPA tool? How do you know
> YOUR tempdb is 8KB?
> 650 KB is still way too small. Can you elaborate on how you got this value?
> Whether or not you need to reboot your server depends on what you want to
> accomplish. The default size of tempdb means the size it starts up with,
> when you reboot. So if you change the size with ALTER DATABASE, it won't
> take affect until you reboot. But if tempdb is large enough for right now,
> maybe you don't need to reboot.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.InsideSQLServer.com
> http://sqlblog.com
>
> "db" <db@.discussions.microsoft.com> wrote in message
> news:A7749815-A31F-453E-BC3F-2839977BA763@.microsoft.com...
>
>

Changeing default value of tempdb

Hi All
For one of our SQL server 2000 database tempdb size is origionally set to
"8KB"(That is default value). After monitoring it for some time, I think we
need to change the default value to "650 KB".
Can I change the default value while the server is online (so that on next
reboot it automatically changes) or I need to reboot the server.
In any case what is the best way and commands to do this?
Thanks
--Hi db
Where are you getting this value from? Are you sure you don't mean MB?
In any case, you can change the tempdb startup size with the ALTER DATABASE
command, to change the size of the primary file. Look up ALTER DATABASE in
the Books Online, and read about the MODIFY FILE option for the details
--
HTH
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
http://sqlblog.com
"db" <db@.discussions.microsoft.com> wrote in message
news:4F42449A-8D85-4287-906A-5B90F3AA115A@.microsoft.com...
> Hi All
> For one of our SQL server 2000 database tempdb size is origionally set to
> "8KB"(That is default value). After monitoring it for some time, I think
> we
> need to change the default value to "650 KB".
> Can I change the default value while the server is online (so that on next
> reboot it automatically changes) or I need to reboot the server.
> In any case what is the best way and commands to do this?
> Thanks
> --
>|||I got the values from Best practice analyzer tool results for sql server
2000. Also I am monitoring size of tempdb.mdf/ldf files on the disk. Few
months back tempdb shot up to few GB, but that may be a bad query or
something.
From your response it looks like I need not reboot the server?
Thanks .. go through books on line now.
--
"Kalen Delaney" wrote:
> Hi db
> Where are you getting this value from? Are you sure you don't mean MB?
> In any case, you can change the tempdb startup size with the ALTER DATABASE
> command, to change the size of the primary file. Look up ALTER DATABASE in
> the Books Online, and read about the MODIFY FILE option for the details
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.InsideSQLServer.com
> http://sqlblog.com
>
> "db" <db@.discussions.microsoft.com> wrote in message
> news:4F42449A-8D85-4287-906A-5B90F3AA115A@.microsoft.com...
> > Hi All
> >
> > For one of our SQL server 2000 database tempdb size is origionally set to
> > "8KB"(That is default value). After monitoring it for some time, I think
> > we
> > need to change the default value to "650 KB".
> >
> > Can I change the default value while the server is online (so that on next
> > reboot it automatically changes) or I need to reboot the server.
> >
> > In any case what is the best way and commands to do this?
> >
> > Thanks
> > --
> >
>
>|||> I got the values from Best practice analyzer tool results for sql server
> 2000. Also I am monitoring size of tempdb.mdf/ldf files on the disk. Few
> months back tempdb shot up to few GB, but that may be a bad query or
> something.
> From your response it looks like I need not reboot the server?
> Thanks .. I will go through books on line for details.
> --
>
> "Kalen Delaney" wrote:
> > Hi db
> >
> > Where are you getting this value from? Are you sure you don't mean MB?
> >
> > In any case, you can change the tempdb startup size with the ALTER DATABASE
> > command, to change the size of the primary file. Look up ALTER DATABASE in
> > the Books Online, and read about the MODIFY FILE option for the details
> >
> > --
> > HTH
> > Kalen Delaney, SQL Server MVP
> > www.InsideSQLServer.com
> > http://sqlblog.com
> >
> >
> > "db" <db@.discussions.microsoft.com> wrote in message
> > news:4F42449A-8D85-4287-906A-5B90F3AA115A@.microsoft.com...
> > > Hi All
> > >
> > > For one of our SQL server 2000 database tempdb size is origionally set to
> > > "8KB"(That is default value). After monitoring it for some time, I think
> > > we
> > > need to change the default value to "650 KB".
> > >
> > > Can I change the default value while the server is online (so that on next
> > > reboot it automatically changes) or I need to reboot the server.
> > >
> > > In any case what is the best way and commands to do this?
> > >
> > > Thanks
> > > --
> > >
> >
> >
> >|||How did you get the value for YOUR tempdb from the BPA tool? How do you know
YOUR tempdb is 8KB?
650 KB is still way too small. Can you elaborate on how you got this value?
Whether or not you need to reboot your server depends on what you want to
accomplish. The default size of tempdb means the size it starts up with,
when you reboot. So if you change the size with ALTER DATABASE, it won't
take affect until you reboot. But if tempdb is large enough for right now,
maybe you don't need to reboot.
--
HTH
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
http://sqlblog.com
"db" <db@.discussions.microsoft.com> wrote in message
news:A7749815-A31F-453E-BC3F-2839977BA763@.microsoft.com...
>I got the values from Best practice analyzer tool results for sql server
> 2000. Also I am monitoring size of tempdb.mdf/ldf files on the disk. Few
> months back tempdb shot up to few GB, but that may be a bad query or
> something.
> From your response it looks like I need not reboot the server?
> Thanks .. go through books on line now.
> --
>
> "Kalen Delaney" wrote:
>> Hi db
>> Where are you getting this value from? Are you sure you don't mean MB?
>> In any case, you can change the tempdb startup size with the ALTER
>> DATABASE
>> command, to change the size of the primary file. Look up ALTER DATABASE
>> in
>> the Books Online, and read about the MODIFY FILE option for the details
>> --
>> HTH
>> Kalen Delaney, SQL Server MVP
>> www.InsideSQLServer.com
>> http://sqlblog.com
>>
>> "db" <db@.discussions.microsoft.com> wrote in message
>> news:4F42449A-8D85-4287-906A-5B90F3AA115A@.microsoft.com...
>> > Hi All
>> >
>> > For one of our SQL server 2000 database tempdb size is origionally set
>> > to
>> > "8KB"(That is default value). After monitoring it for some time, I
>> > think
>> > we
>> > need to change the default value to "650 KB".
>> >
>> > Can I change the default value while the server is online (so that on
>> > next
>> > reboot it automatically changes) or I need to reboot the server.
>> >
>> > In any case what is the best way and commands to do this?
>> >
>> > Thanks
>> > --
>> >
>>|||My Typo. Tempdb.mdf file is 655 MB or 670,700 KB on disk. Tempdb is set to
autogrow and it grow from 8MB to 655MB. I do not want to reboot the server
now, but change the default value of tempdb(Whenever reboot happens it should
change) .
Can i change it from
sql enterprise manager --> database-->properties-->datafiles-->space
allocated (Change value here)
--
"Kalen Delaney" wrote:
> How did you get the value for YOUR tempdb from the BPA tool? How do you know
> YOUR tempdb is 8KB?
> 650 KB is still way too small. Can you elaborate on how you got this value?
> Whether or not you need to reboot your server depends on what you want to
> accomplish. The default size of tempdb means the size it starts up with,
> when you reboot. So if you change the size with ALTER DATABASE, it won't
> take affect until you reboot. But if tempdb is large enough for right now,
> maybe you don't need to reboot.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.InsideSQLServer.com
> http://sqlblog.com
>
> "db" <db@.discussions.microsoft.com> wrote in message
> news:A7749815-A31F-453E-BC3F-2839977BA763@.microsoft.com...
> >I got the values from Best practice analyzer tool results for sql server
> > 2000. Also I am monitoring size of tempdb.mdf/ldf files on the disk. Few
> > months back tempdb shot up to few GB, but that may be a bad query or
> > something.
> >
> > From your response it looks like I need not reboot the server?
> >
> > Thanks .. go through books on line now.
> > --
> >
> >
> >
> > "Kalen Delaney" wrote:
> >
> >> Hi db
> >>
> >> Where are you getting this value from? Are you sure you don't mean MB?
> >>
> >> In any case, you can change the tempdb startup size with the ALTER
> >> DATABASE
> >> command, to change the size of the primary file. Look up ALTER DATABASE
> >> in
> >> the Books Online, and read about the MODIFY FILE option for the details
> >>
> >> --
> >> HTH
> >> Kalen Delaney, SQL Server MVP
> >> www.InsideSQLServer.com
> >> http://sqlblog.com
> >>
> >>
> >> "db" <db@.discussions.microsoft.com> wrote in message
> >> news:4F42449A-8D85-4287-906A-5B90F3AA115A@.microsoft.com...
> >> > Hi All
> >> >
> >> > For one of our SQL server 2000 database tempdb size is origionally set
> >> > to
> >> > "8KB"(That is default value). After monitoring it for some time, I
> >> > think
> >> > we
> >> > need to change the default value to "650 KB".
> >> >
> >> > Can I change the default value while the server is online (so that on
> >> > next
> >> > reboot it automatically changes) or I need to reboot the server.
> >> >
> >> > In any case what is the best way and commands to do this?
> >> >
> >> > Thanks
> >> > --
> >> >
> >>
> >>
> >>
>
>|||Yes, the change you do in EM will define the new size for tempdb for next startup.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"db" <db@.discussions.microsoft.com> wrote in message
news:936E7677-57D2-4720-A537-84083B502622@.microsoft.com...
> My Typo. Tempdb.mdf file is 655 MB or 670,700 KB on disk. Tempdb is set to
> autogrow and it grow from 8MB to 655MB. I do not want to reboot the server
> now, but change the default value of tempdb(Whenever reboot happens it should
> change) .
> Can i change it from
> sql enterprise manager --> database-->properties-->datafiles-->space
> allocated (Change value here)
> --
>
> "Kalen Delaney" wrote:
>> How did you get the value for YOUR tempdb from the BPA tool? How do you know
>> YOUR tempdb is 8KB?
>> 650 KB is still way too small. Can you elaborate on how you got this value?
>> Whether or not you need to reboot your server depends on what you want to
>> accomplish. The default size of tempdb means the size it starts up with,
>> when you reboot. So if you change the size with ALTER DATABASE, it won't
>> take affect until you reboot. But if tempdb is large enough for right now,
>> maybe you don't need to reboot.
>> --
>> HTH
>> Kalen Delaney, SQL Server MVP
>> www.InsideSQLServer.com
>> http://sqlblog.com
>>
>> "db" <db@.discussions.microsoft.com> wrote in message
>> news:A7749815-A31F-453E-BC3F-2839977BA763@.microsoft.com...
>> >I got the values from Best practice analyzer tool results for sql server
>> > 2000. Also I am monitoring size of tempdb.mdf/ldf files on the disk. Few
>> > months back tempdb shot up to few GB, but that may be a bad query or
>> > something.
>> >
>> > From your response it looks like I need not reboot the server?
>> >
>> > Thanks .. go through books on line now.
>> > --
>> >
>> >
>> >
>> > "Kalen Delaney" wrote:
>> >
>> >> Hi db
>> >>
>> >> Where are you getting this value from? Are you sure you don't mean MB?
>> >>
>> >> In any case, you can change the tempdb startup size with the ALTER
>> >> DATABASE
>> >> command, to change the size of the primary file. Look up ALTER DATABASE
>> >> in
>> >> the Books Online, and read about the MODIFY FILE option for the details
>> >>
>> >> --
>> >> HTH
>> >> Kalen Delaney, SQL Server MVP
>> >> www.InsideSQLServer.com
>> >> http://sqlblog.com
>> >>
>> >>
>> >> "db" <db@.discussions.microsoft.com> wrote in message
>> >> news:4F42449A-8D85-4287-906A-5B90F3AA115A@.microsoft.com...
>> >> > Hi All
>> >> >
>> >> > For one of our SQL server 2000 database tempdb size is origionally set
>> >> > to
>> >> > "8KB"(That is default value). After monitoring it for some time, I
>> >> > think
>> >> > we
>> >> > need to change the default value to "650 KB".
>> >> >
>> >> > Can I change the default value while the server is online (so that on
>> >> > next
>> >> > reboot it automatically changes) or I need to reboot the server.
>> >> >
>> >> > In any case what is the best way and commands to do this?
>> >> >
>> >> > Thanks
>> >> > --
>> >> >
>> >>
>> >>
>> >>
>>

Changeing default value of tempdb

Hi All
For one of our SQL server 2000 database tempdb size is origionally set to
"8KB"(That is default value). After monitoring it for some time, I think we
need to change the default value to "650 KB".
Can I change the default value while the server is online (so that on next
reboot it automatically changes) or I need to reboot the server.
In any case what is the best way and commands to do this?
Thanks
--Hi db
Where are you getting this value from? Are you sure you don't mean MB?
In any case, you can change the tempdb startup size with the ALTER DATABASE
command, to change the size of the primary file. Look up ALTER DATABASE in
the Books Online, and read about the MODIFY FILE option for the details
HTH
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
http://sqlblog.com
"db" <db@.discussions.microsoft.com> wrote in message
news:4F42449A-8D85-4287-906A-5B90F3AA115A@.microsoft.com...
> Hi All
> For one of our SQL server 2000 database tempdb size is origionally set to
> "8KB"(That is default value). After monitoring it for some time, I think
> we
> need to change the default value to "650 KB".
> Can I change the default value while the server is online (so that on next
> reboot it automatically changes) or I need to reboot the server.
> In any case what is the best way and commands to do this?
> Thanks
> --
>|||I got the values from Best practice analyzer tool results for sql server
2000. Also I am monitoring size of tempdb.mdf/ldf files on the disk. Few
months back tempdb shot up to few GB, but that may be a bad query or
something.
From your response it looks like I need not reboot the server?
Thanks .. go through books on line now.
--
"Kalen Delaney" wrote:

> Hi db
> Where are you getting this value from? Are you sure you don't mean MB?
> In any case, you can change the tempdb startup size with the ALTER DATABAS
E
> command, to change the size of the primary file. Look up ALTER DATABASE in
> the Books Online, and read about the MODIFY FILE option for the details
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.InsideSQLServer.com
> http://sqlblog.com
>
> "db" <db@.discussions.microsoft.com> wrote in message
> news:4F42449A-8D85-4287-906A-5B90F3AA115A@.microsoft.com...
>
>|||> I got the values from Best practice analyzer tool results for sql server[vbcol=seagreen]
> 2000. Also I am monitoring size of tempdb.mdf/ldf files on the disk. Few
> months back tempdb shot up to few GB, but that may be a bad query or
> something.
> From your response it looks like I need not reboot the server?
> Thanks .. I will go through books on line for details.
> --
>
> "Kalen Delaney" wrote:
>|||How did you get the value for YOUR tempdb from the BPA tool? How do you know
YOUR tempdb is 8KB?
650 KB is still way too small. Can you elaborate on how you got this value?
Whether or not you need to reboot your server depends on what you want to
accomplish. The default size of tempdb means the size it starts up with,
when you reboot. So if you change the size with ALTER DATABASE, it won't
take affect until you reboot. But if tempdb is large enough for right now,
maybe you don't need to reboot.
--
HTH
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
http://sqlblog.com
"db" <db@.discussions.microsoft.com> wrote in message
news:A7749815-A31F-453E-BC3F-2839977BA763@.microsoft.com...[vbcol=seagreen]
>I got the values from Best practice analyzer tool results for sql server
> 2000. Also I am monitoring size of tempdb.mdf/ldf files on the disk. Few
> months back tempdb shot up to few GB, but that may be a bad query or
> something.
> From your response it looks like I need not reboot the server?
> Thanks .. go through books on line now.
> --
>
> "Kalen Delaney" wrote:
>|||My Typo. Tempdb.mdf file is 655 MB or 670,700 KB on disk. Tempdb is set to
autogrow and it grow from 8MB to 655MB. I do not want to reboot the server
now, but change the default value of tempdb(Whenever reboot happens it shoul
d
change) .
Can i change it from
sql enterprise manager --> database-->properties-->datafiles-->space
allocated (Change value here)
--
"Kalen Delaney" wrote:

> How did you get the value for YOUR tempdb from the BPA tool? How do you kn
ow
> YOUR tempdb is 8KB?
> 650 KB is still way too small. Can you elaborate on how you got this value
?
> Whether or not you need to reboot your server depends on what you want to
> accomplish. The default size of tempdb means the size it starts up with,
> when you reboot. So if you change the size with ALTER DATABASE, it won't
> take affect until you reboot. But if tempdb is large enough for right now,
> maybe you don't need to reboot.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.InsideSQLServer.com
> http://sqlblog.com
>
> "db" <db@.discussions.microsoft.com> wrote in message
> news:A7749815-A31F-453E-BC3F-2839977BA763@.microsoft.com...
>
>|||Yes, the change you do in EM will define the new size for tempdb for next st
artup.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"db" <db@.discussions.microsoft.com> wrote in message
news:936E7677-57D2-4720-A537-84083B502622@.microsoft.com...[vbcol=seagreen]
> My Typo. Tempdb.mdf file is 655 MB or 670,700 KB on disk. Tempdb is set to
> autogrow and it grow from 8MB to 655MB. I do not want to reboot the server
> now, but change the default value of tempdb(Whenever reboot happens it sho
uld
> change) .
> Can i change it from
> sql enterprise manager --> database-->properties-->datafiles-->space
> allocated (Change value here)
> --
>
> "Kalen Delaney" wrote:
>

Changed fields

In our applications we have a table named ChgMstr (Change
Log) that logs changes made to each record. It includes
the Field Name, Date & Time, the user making the change,
and the Before and After values of the field.
I am trying to setup an Update trigger that will loop
through the Deleted and Inserted fields, find which fields
have changed, and then either INSERT directly into the
ChgMstr table or call a Stored Procedure to do it.
However, I cannot find a way (even with Dynamic SQL) to
build a SELECT string that can be EXECuted. When I do, I
get "Invalid Object" messages for both Deleted and
Inserted. It appears that once the EXEC statement is sent
that Deleted and Inserted go out of scope.
Anyone got any ideas. I can provide the contents of the
trigger, if needed.Bryan,
The inserted and deleted tables will not be available to a stored
procedure. You could copy their contents into a temporary table for use by
the stored procedure, but it seems to me unlikely that you need a stored
procedure just to insert into your ChgMstr table. Can you do something like
this:
insert into ChgMster
select N'ColumnA', getdate(), suser_sname(), d.ColumnA, i.ColumnA
from inserted i, deleted d
where i.primaryKey = d.primaryKey
union all
select N'ColumnB', getdate(), suser_sname(), d.ColumnB, i.ColumnB
from inserted i, deleted d
where i.primaryKey = d.primaryKey
This assumes that the primary key column is not modified. If it is, unless
you have another unique constraint on columns that don't change, the
question of what the original and final values of that column are is not
discernable from the inserted and deleted tables in some multi-row updates,
such as
update T set
pk = case when 1 then 11 when 4 then 12 when 8 then 13 end
from T
where pk in (1, 4, 8)
Then the inserted table will contain rows with pk 11, 12, and 13, and the
deleted table will contain rows with pk 1, 4, and 8, but there is no way to
say which of 1, 4, and 8 because which of 11, 12, 13 by looking at the
inserted and deleted tables.
SK
"Bryan A. Jackson" <bjackson@.focuscmc.com> wrote in message
news:ae5701c40cee$28616dc0$a001280a@.phx.gbl...
> In our applications we have a table named ChgMstr (Change
> Log) that logs changes made to each record. It includes
> the Field Name, Date & Time, the user making the change,
> and the Before and After values of the field.
> I am trying to setup an Update trigger that will loop
> through the Deleted and Inserted fields, find which fields
> have changed, and then either INSERT directly into the
> ChgMstr table or call a Stored Procedure to do it.
> However, I cannot find a way (even with Dynamic SQL) to
> build a SELECT string that can be EXECuted. When I do, I
> get "Invalid Object" messages for both Deleted and
> Inserted. It appears that once the EXEC statement is sent
> that Deleted and Inserted go out of scope.
> Anyone got any ideas. I can provide the contents of the
> trigger, if needed.|||1. Forgive my ignorance, but what does the 'N' in select
N'Column A' do?
2. Will I have to do a union for each field in the table?
I'm looking for a generic way to do this so the trigger
does not need to be changed each time fields are added or
deleted.
Thanks,
Bryan

>--Original Message--
>Bryan,
> The inserted and deleted tables will not be available
to a stored
>procedure. You could copy their contents into a
temporary table for use by
>the stored procedure, but it seems to me unlikely that
you need a stored
>procedure just to insert into your ChgMstr table. Can
you do something like
>this:
>insert into ChgMster
>select N'ColumnA', getdate(), suser_sname(), d.ColumnA,
i.ColumnA
>from inserted i, deleted d
>where i.primaryKey = d.primaryKey
>union all
>select N'ColumnB', getdate(), suser_sname(), d.ColumnB,
i.ColumnB
>from inserted i, deleted d
>where i.primaryKey = d.primaryKey
>This assumes that the primary key column is not
modified. If it is, unless
>you have another unique constraint on columns that don't
change, the
>question of what the original and final values of that
column are is not
>discernable from the inserted and deleted tables in some
multi-row updates,
>such as
>update T set
> pk = case when 1 then 11 when 4 then 12 when 8 then 13
end
>from T
>where pk in (1, 4, 8)
>Then the inserted table will contain rows with pk 11, 12,
and 13, and the
>deleted table will contain rows with pk 1, 4, and 8, but
there is no way to
>say which of 1, 4, and 8 because which of 11, 12, 13 by
looking at the
>inserted and deleted tables.
>SK
>"Bryan A. Jackson" <bjackson@.focuscmc.com> wrote in
message
>news:ae5701c40cee$28616dc0$a001280a@.phx.gbl...
(Change
fields
I
sent
>
>.
>|||Bryan,
The N just signifies that the string is Unicode. Object names in SQL
Server are in Unicode, but it won't hurt to leave this out if the name
only uses ASCII.
I generally don't think it's a great idea to write generic code that
doesn't "know" the table structure. You could generate the code for
triggers like this automatically with something like this:
select 'insert into ChgMster' oneLine, 0 ORDINAL_POSITION
union all
select 'select
'+q_column_name+',
'+' getdate(),
suser_sname(),
d.'+q_column_name+',
'+' i.'+q_column_name+'
from inserted i, deleted d
where i.primaryKey = d.primaryKey
and i.'+q_column_name+'<>d.'+q_column_name+
case when ORDINAL_POSITION = (
select max(ORDINAL_POSITION)
from Northwind.INFORMATION_SCHEMA.Columns
where TABLE_NAME = 'Orders'
) then '' else '
union all'
end, ORDINAL_POSITION
from (
select quotename(COLUMN_NAME) as q_column_name, ORDINAL_POSITION
FROM Northwind.INFORMATION_SCHEMA.Columns
where TABLE_NAME = 'Orders'
) C
order by ORDINAL_POSITION
There are also third-party products to do this kind of logging.
SK
Bryan A. Jackson wrote:
>1. Forgive my ignorance, but what does the 'N' in select
>N'Column A' do?
>2. Will I have to do a union for each field in the table?
>I'm looking for a generic way to do this so the trigger
>does not need to be changed each time fields are added or
>deleted.
>Thanks,
>Bryan
>
>
>to a stored
>
>temporary table for use by
>
>you need a stored
>
>you do something like
>
>i.ColumnA
>
>i.ColumnB
>
>modified. If it is, unless
>
>change, the
>
>column are is not
>
>multi-row updates,
>
>end
>
>and 13, and the
>
>there is no way to
>
>looking at the
>
>message
>
>(Change
>
>fields
>
>I
>
>sent
>

Sunday, March 11, 2012

CHANGED backup time, but still occuring

Hello. Have a strange one here. I'm backing up databases locally to a drive
on the server daily. I needed to change the time of the backup, and did
that, but it's still occuring at the old time.

I deleted the old job, and recreated it with the new time. I won't know
until tonight at 12:00 whether that worked or not.

Can someone tell me where it saves the maintenance schedules and how it
kicks it off? I'd like to take a look at it to see if it's still there.

I'm a little bit of a newbie on SQL server, so be gentle. :-)
--
If responding to me directly, please take out "REMOVE" from my e-mail
address.

Thanks!
Doug"Doug" <dgeiste@.hotmail.com> wrote in message news:<9q8qb.25315$8b4.5955@.newssvr31.news.prodigy.com>...
> Hello. Have a strange one here. I'm backing up databases locally to a drive
> on the server daily. I needed to change the time of the backup, and did
> that, but it's still occuring at the old time.
> I deleted the old job, and recreated it with the new time. I won't know
> until tonight at 12:00 whether that worked or not.
> Can someone tell me where it saves the maintenance schedules and how it
> kicks it off? I'd like to take a look at it to see if it's still there.
> I'm a little bit of a newbie on SQL server, so be gentle. :-)

Can you give some more information on exactly what you did (and which
version of SQL Server you're using)? It looks like you're using the
maintenance plan wizard - which databases did you choose to backup,
what time did you select for the backups, what time are they actually
running at, what happens if you schedule a BACKUP command in a
scheduled job instead of using the wizard etc. And is there anything
relevant in the SQL Server Agent log?

Simon|||I think I have it fixed, although I don't know the exact cause.

I used the Wizard to create the backup job for all databases. I decided to
break out the database that was having the problem into it's own job. Then,
I deleted the other (all) plan, and recreated it without including the
trouble database.

No problems last night. Who knows what will happen tonight, but I feel more
confident. Something must have become corrupt.

BTW, to answer the questions, this is SQL 2000 server. There was nothing in
the SQL log that would point to a problem.

Thanks!
Doug

"Simon Hayes" <sql@.hayes.ch> wrote in message
news:60cd0137.0311060000.3bb0b8cb@.posting.google.c om...
> "Doug" <dgeiste@.hotmail.com> wrote in message
news:<9q8qb.25315$8b4.5955@.newssvr31.news.prodigy.com>...
> > Hello. Have a strange one here. I'm backing up databases locally to a
drive
> > on the server daily. I needed to change the time of the backup, and did
> > that, but it's still occuring at the old time.
> > I deleted the old job, and recreated it with the new time. I won't know
> > until tonight at 12:00 whether that worked or not.
> > Can someone tell me where it saves the maintenance schedules and how it
> > kicks it off? I'd like to take a look at it to see if it's still there.
> > I'm a little bit of a newbie on SQL server, so be gentle. :-)
> Can you give some more information on exactly what you did (and which
> version of SQL Server you're using)? It looks like you're using the
> maintenance plan wizard - which databases did you choose to backup,
> what time did you select for the backups, what time are they actually
> running at, what happens if you schedule a BACKUP command in a
> scheduled job instead of using the wizard etc. And is there anything
> relevant in the SQL Server Agent log?
> Simon

Changed Administrator Password

Hi There!
I have changed the Administrator password on my Windows 2003 SBS server, and
now each time I reboot the server, the SQL Server Service fails to start.
I have to change the password back to the previous one, manually start the
service, and then change the password back to what I want it to be.
Does anyone know how to get round this?
TIA
Gareth Sharp
Hi Gareth
If the SQL Services are running on a specified account then you will need to
change the password for the service account too.
In case the SQL Services are running on the Local System account then there
should be no problem in the service starting up.
Thanks
Amer M J
MCP
"Gareth Sharp" wrote:

> Hi There!
> I have changed the Administrator password on my Windows 2003 SBS server, and
> now each time I reboot the server, the SQL Server Service fails to start.
> I have to change the password back to the previous one, manually start the
> service, and then change the password back to what I want it to be.
> Does anyone know how to get round this?
> TIA
> Gareth Sharp
>
>
|||Hello,
Go to the Administrative Tools/Services and find the MSSQLSERVER service.
Click for it's properties and check if the user that starts the service is
Administrator. Change the password for the new password there.
Eduardo Sicouret
American Call Center
"Gareth Sharp" <gs@.paxsoft.co.uk> escribi en el mensaje
news:doghmm$deo$1$8300dec7@.news.demon.co.uk...
> Hi There!
> I have changed the Administrator password on my Windows 2003 SBS server,
> and
> now each time I reboot the server, the SQL Server Service fails to start.
> I have to change the password back to the previous one, manually start the
> service, and then change the password back to what I want it to be.
> Does anyone know how to get round this?
> TIA
> Gareth Sharp
>
|||Hi Eduardo
Thanks for the help - I have made the change, and shall check it next time
the server is rebooted.
Does it matter if it is set to Local System account or Administrator? Could
I avoid the problem in the future by changing the option to Local System
account?
Thanks In Advance
Gareth
"Eduardo Sicouret" <esicouret@.americancallcenter.com> wrote in message
news:OavZ218BGHA.1676@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Hello,
> Go to the Administrative Tools/Services and find the MSSQLSERVER service.
> Click for it's properties and check if the user that starts the service is
> Administrator. Change the password for the new password there.
> Eduardo Sicouret
> American Call Center
> "Gareth Sharp" <gs@.paxsoft.co.uk> escribi en el mensaje
> news:doghmm$deo$1$8300dec7@.news.demon.co.uk...
start.[vbcol=seagreen]
the
>

Changed Administrator Password

Hi There!
I have changed the Administrator password on my Windows 2003 SBS server, and
now each time I reboot the server, the SQL Server Service fails to start.
I have to change the password back to the previous one, manually start the
service, and then change the password back to what I want it to be.
Does anyone know how to get round this?
TIA
Gareth SharpHi Gareth
If the SQL Services are running on a specified account then you will need to
change the password for the service account too.
In case the SQL Services are running on the Local System account then there
should be no problem in the service starting up.
Thanks
Amer M J
MCP
"Gareth Sharp" wrote:
> Hi There!
> I have changed the Administrator password on my Windows 2003 SBS server, and
> now each time I reboot the server, the SQL Server Service fails to start.
> I have to change the password back to the previous one, manually start the
> service, and then change the password back to what I want it to be.
> Does anyone know how to get round this?
> TIA
> Gareth Sharp
>
>|||Hello,
Go to the Administrative Tools/Services and find the MSSQLSERVER service.
Click for it's properties and check if the user that starts the service is
Administrator. Change the password for the new password there.
Eduardo Sicouret
American Call Center
"Gareth Sharp" <gs@.paxsoft.co.uk> escribió en el mensaje
news:doghmm$deo$1$8300dec7@.news.demon.co.uk...
> Hi There!
> I have changed the Administrator password on my Windows 2003 SBS server,
> and
> now each time I reboot the server, the SQL Server Service fails to start.
> I have to change the password back to the previous one, manually start the
> service, and then change the password back to what I want it to be.
> Does anyone know how to get round this?
> TIA
> Gareth Sharp
>|||Hi Eduardo
Thanks for the help - I have made the change, and shall check it next time
the server is rebooted.
Does it matter if it is set to Local System account or Administrator? Could
I avoid the problem in the future by changing the option to Local System
account?
Thanks In Advance
Gareth
"Eduardo Sicouret" <esicouret@.americancallcenter.com> wrote in message
news:OavZ218BGHA.1676@.TK2MSFTNGP09.phx.gbl...
> Hello,
> Go to the Administrative Tools/Services and find the MSSQLSERVER service.
> Click for it's properties and check if the user that starts the service is
> Administrator. Change the password for the new password there.
> Eduardo Sicouret
> American Call Center
> "Gareth Sharp" <gs@.paxsoft.co.uk> escribió en el mensaje
> news:doghmm$deo$1$8300dec7@.news.demon.co.uk...
> > Hi There!
> >
> > I have changed the Administrator password on my Windows 2003 SBS server,
> > and
> > now each time I reboot the server, the SQL Server Service fails to
start.
> >
> > I have to change the password back to the previous one, manually start
the
> > service, and then change the password back to what I want it to be.
> >
> > Does anyone know how to get round this?
> >
> > TIA
> >
> > Gareth Sharp
> >
> >
>

Changed Administrator Password

Hi There!
I have changed the Administrator password on my Windows 2003 SBS server, and
now each time I reboot the server, the SQL Server Service fails to start.
I have to change the password back to the previous one, manually start the
service, and then change the password back to what I want it to be.
Does anyone know how to get round this?
TIA
Gareth SharpHi Gareth
If the SQL Services are running on a specified account then you will need to
change the password for the service account too.
In case the SQL Services are running on the Local System account then there
should be no problem in the service starting up.
Thanks
Amer M J
MCP
"Gareth Sharp" wrote:

> Hi There!
> I have changed the Administrator password on my Windows 2003 SBS server, a
nd
> now each time I reboot the server, the SQL Server Service fails to start.
> I have to change the password back to the previous one, manually start the
> service, and then change the password back to what I want it to be.
> Does anyone know how to get round this?
> TIA
> Gareth Sharp
>
>|||Hello,
Go to the Administrative Tools/Services and find the MSSQLSERVER service.
Click for it's properties and check if the user that starts the service is
Administrator. Change the password for the new password there.
Eduardo Sicouret
American Call Center
"Gareth Sharp" <gs@.paxsoft.co.uk> escribi en el mensaje
news:doghmm$deo$1$8300dec7@.news.demon.co.uk...
> Hi There!
> I have changed the Administrator password on my Windows 2003 SBS server,
> and
> now each time I reboot the server, the SQL Server Service fails to start.
> I have to change the password back to the previous one, manually start the
> service, and then change the password back to what I want it to be.
> Does anyone know how to get round this?
> TIA
> Gareth Sharp
>|||Hi Eduardo
Thanks for the help - I have made the change, and shall check it next time
the server is rebooted.
Does it matter if it is set to Local System account or Administrator? Could
I avoid the problem in the future by changing the option to Local System
account?
Thanks In Advance
Gareth
"Eduardo Sicouret" <esicouret@.americancallcenter.com> wrote in message
news:OavZ218BGHA.1676@.TK2MSFTNGP09.phx.gbl...
> Hello,
> Go to the Administrative Tools/Services and find the MSSQLSERVER service.
> Click for it's properties and check if the user that starts the service is
> Administrator. Change the password for the new password there.
> Eduardo Sicouret
> American Call Center
> "Gareth Sharp" <gs@.paxsoft.co.uk> escribi en el mensaje
> news:doghmm$deo$1$8300dec7@.news.demon.co.uk...
start.[vbcol=seagreen]
the[vbcol=seagreen]
>

Thursday, March 8, 2012

Change TIME OUT on Qry?

Below is my error msg. I am trying to save updates made to a table in the designer. my connection time out is set to 0 but i am still getting this msg:

/*
Tuesday, March 28, 20066:32:46 PM
User:
Server: EVILONE
Database: DMS
Application:
*/

'Detail' table
- Unable to modify table.
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.Is the table in use? Could somebody have it open? Check the current processes.|||No the db is on my laptop and i am the only

Change the type of an expression container

Hi,

I use expressions to build the SQL query that is executed by the data flow.

Today, I ran into an issue. For the first time the SQL query has exceeded 4000 char so the expression cannot be validated and it is not possible to use it.

Is there a way to change the expression datatype to nvarchar(max) instead of the default nvarchar(4000) ?

Thanks,

Philippe

Philippe,

Unfortunately 4000 is the limit on the result of an expression.

-Jamie

|||

So i am back in the business of using multiple variables.

Too bad

|||Is there any way around the 4000 literal string masx issues. Its sad that the case because a table could contain many fields and that might cause the literal string to be more than 4000.

Change the server date and time

Hi,
can you tell me, how to change the server date and time using queries.
Please advise me.
rgds,
SouraThats not a recommended thing... in any scenario.
Why do you want to do that?
Thanks,
Sree
"SouRa" wrote:
> Hi,
> can you tell me, how to change the server date and time using queries.
> Please advise me.
> rgds,
> Soura

Change the server date and time

Hi,
can you tell me, how to change the server date and time using queries.
Please advise me.
rgds,
SouraThats not a recommended thing... in any scenario.
Why do you want to do that?
Thanks,
Sree
"SouRa" wrote:

> Hi,
> can you tell me, how to change the server date and time using queries.
> Please advise me.
> rgds,
> Soura

Change the server date and time

Hi,
can you tell me, how to change the server date and time using queries.
Please advise me.
rgds,
Soura
Thats not a recommended thing... in any scenario.
Why do you want to do that?
Thanks,
Sree
"SouRa" wrote:

> Hi,
> can you tell me, how to change the server date and time using queries.
> Please advise me.
> rgds,
> Soura

Friday, February 24, 2012

Change SQL Server Connection from Enterprise Manager

How can we change the login userid by SQL Server Enterprise Manager. I
login with my Windows userid but the last time I used a SQL Server account it
still uses that account when start SQL Server Enterprise Manager.
How do I change Enterpise Manager to use my windows userid.
Thanks,
Hi Joe,
In Enterprise Manager, right click on the registered server
that you want to change the login for. Select Edit SQL
Server Registration Properties. You can change the login
information from there.
-Sue
On Wed, 26 Jan 2005 13:03:09 -0800, Joe K. <Joe
K.@.discussions.microsoft.com> wrote:

>How can we change the login userid by SQL Server Enterprise Manager. I
>login with my Windows userid but the last time I used a SQL Server account it
>still uses that account when start SQL Server Enterprise Manager.
>How do I change Enterpise Manager to use my windows userid.
>Thanks,

Change Settings on an EM SQL Group Member

Using EM, I have a server group which includes 6 entries. I want to change
the settings on one of the entries (I want it to require a login each time I
access a DB). I don't see a way to do this. I even thought that I would just
delete that entry and recreate it but I cannot find a way to do that either?
How can I accomplish this?
Wayne
Right-click the SQL Server, "Edit Server Registration".
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Wayne Wengert" <wayneDONTWANTSPAM@.wengert.com> wrote in message
news:uBhIcptQFHA.248@.TK2MSFTNGP15.phx.gbl...
> Using EM, I have a server group which includes 6 entries. I want to change
> the settings on one of the entries (I want it to require a login each time I
> access a DB). I don't see a way to do this. I even thought that I would just
> delete that entry and recreate it but I cannot find a way to do that either?
> How can I accomplish this?
> Wayne
>
|||When I right click a server I see an hour glass cursor for about 15 seconds
and then - nothing?
Wayne
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23U1vkqyQFHA.2356@.TK2MSFTNGP14.phx.gbl...[vbcol=seagreen]
> Right-click the SQL Server, "Edit Server Registration".
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Wayne Wengert" <wayneDONTWANTSPAM@.wengert.com> wrote in message
> news:uBhIcptQFHA.248@.TK2MSFTNGP15.phx.gbl...
change[vbcol=seagreen]
time I[vbcol=seagreen]
just[vbcol=seagreen]
either?
>
|||Strange, I've never seen this. No error message, like "cannot fins server", or "cannot log in"?
Perhaps some DLL conflict with EM? Could be worth (re) applying SQL Server service pack (unless you
find something specific about this in KB).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Wayne Wengert" <wayneDONTWANTSPAM@.wengert.com> wrote in message
news:%23yDf%238zQFHA.1476@.TK2MSFTNGP09.phx.gbl...
> When I right click a server I see an hour glass cursor for about 15 seconds
> and then - nothing?
> Wayne
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:%23U1vkqyQFHA.2356@.TK2MSFTNGP14.phx.gbl...
> change
> time I
> just
> either?
>

Tuesday, February 14, 2012

Change Password in XP and Lose Servers in Enterprise

I have a frustrating situation but I have been unable to
find help elsewhere on this topic. Each time I change my
password at work on my Windows XP Professional machine I
lose all the servers that I had registered in SQL
Enterprise Manager. This is very frustrating because I
have to change my password every 45 days and I have over
20 servers registered. Any ideas on how to fix this to
not lose my registrations? Please help.
thanks,
allen...It happened few times to few developers at my company. After forced to
change the password, all registered servers were gone. However we haven't
seen this come back for about 8 - 10 months. Probably a windows update or
SQL update fixed it?
"Allen" <AMora@.tradestation.com> wrote in message
news:0d6a01c36e45$e5b48e40$a401280a@.phx.gbl...
> I have a frustrating situation but I have been unable to
> find help elsewhere on this topic. Each time I change my
> password at work on my Windows XP Professional machine I
> lose all the servers that I had registered in SQL
> Enterprise Manager. This is very frustrating because I
> have to change my password every 45 days and I have over
> 20 servers registered. Any ideas on how to fix this to
> not lose my registrations? Please help.
> thanks,
> allen...|||I've never lost any of my registrations this way. However, perhaps if you
use SQL authentication instead of Windows authentication for your
registration properties?
"Allen" <AMora@.tradestation.com> wrote in message
news:0d6a01c36e45$e5b48e40$a401280a@.phx.gbl...
> I have a frustrating situation but I have been unable to
> find help elsewhere on this topic. Each time I change my
> password at work on my Windows XP Professional machine I
> lose all the servers that I had registered in SQL
> Enterprise Manager. This is very frustrating because I
> have to change my password every 45 days and I have over
> 20 servers registered. Any ideas on how to fix this to
> not lose my registrations? Please help.
> thanks,
> allen...|||Allen,
Is this the issue?
FIX: Registered Remote Servers Disappear from SQL Enterprise Manager in
Windows XP When Non-Domain User Password is Changed
http://support.microsoft.com/default.aspx?scid=kb;en-us;323280
--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Allen" <AMora@.tradestation.com> wrote in message
news:0d6a01c36e45$e5b48e40$a401280a@.phx.gbl...
> I have a frustrating situation but I have been unable to
> find help elsewhere on this topic. Each time I change my
> password at work on my Windows XP Professional machine I
> lose all the servers that I had registered in SQL
> Enterprise Manager. This is very frustrating because I
> have to change my password every 45 days and I have over
> 20 servers registered. Any ideas on how to fix this to
> not lose my registrations? Please help.
> thanks,
> allen...|||btw, we are using SQL logins, not Windows ...
"Flicker" <hthan@.superioraccess.com> wrote in message
news:%23s3IRckbDHA.1600@.TK2MSFTNGP09.phx.gbl...
> It happened few times to few developers at my company. After forced to
> change the password, all registered servers were gone. However we haven't
> seen this come back for about 8 - 10 months. Probably a windows update or
> SQL update fixed it?
> "Allen" <AMora@.tradestation.com> wrote in message
> news:0d6a01c36e45$e5b48e40$a401280a@.phx.gbl...
> > I have a frustrating situation but I have been unable to
> > find help elsewhere on this topic. Each time I change my
> > password at work on my Windows XP Professional machine I
> > lose all the servers that I had registered in SQL
> > Enterprise Manager. This is very frustrating because I
> > have to change my password every 45 days and I have over
> > 20 servers registered. Any ideas on how to fix this to
> > not lose my registrations? Please help.
> >
> > thanks,
> > allen...
>