Showing posts with label setup. Show all posts
Showing posts with label setup. Show all posts

Monday, March 26, 2012

Properties

Why is it on some sql server 2000 machines - sp3a, running windows 2000,
all being similar in hardware setup, speed, memory, etc that it really
takes long to return a properties screen or simply right click to
disconnect? Curious, any ideas?
Thanks
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!"Dave Brooks" <dbrooks@.neca.org> wrote in message
news:uW9y8Jo6DHA.1636@.TK2MSFTNGP12.phx.gbl...
quote:

> Why is it on some sql server 2000 machines - sp3a, running windows 2000,
> all being similar in hardware setup, speed, memory, etc that it really
> takes long to return a properties screen or simply right click to
> disconnect? Curious, any ideas?
> Thanks
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!

If you're talking about slow access through Enterprise Manager, then one
cause could be that there are databases on the server which are set to
auto-close; another possibility is that you have ODBC tracing enabled.
Simon

Proper Way to Truncate Log After Performing Full Backup (SQL Server 2000)

Hello all - I have a SQL Server 2000 database setup using the Full Recovery Model. Each night, we backup the entire database, and as such would like to truncate the log at this time as well.

Is the best way to do this to also backup the Transaction Log, and then perform a DBCC SHRINKFILE command? It just seems like there should be an easier way...?

Thanks!

Let's back up a few steps here.

What are you gaining by shrinking the transaction log every night?

The transaction log is designed to continually reuse its space internally. Whenever you back up the transaction log, all virtual log files (logical areas within the physical log file) which are not involved in any current transaction are marked as "free" and can be reused.

So, one way to manage the growth of a transaction log is to vary the frequency of log backups. The more frequent the log backup, the less data needs to be stored in the log (and the less data is lost in the event of a disaster).

Once the log reaches a steady-state, it shouldn't grow unless some exceptional update happens.

When you continually shrink and grow the file, you end up with filesystem fragmentation, which isn't good for performance. Also, the log file growth itself takes time.

Wednesday, March 21, 2012

Project Server 2003 Setup Error 25624

Has anyone seen this one before?
I am using the db admin account and have all the rights necessary but it
keeps failing during setup. I have also located the WEBSPS.SQL and have that
working on a SQL 2005 server without error from a query analyzer that creates
the necessary functions... sprocs.. etc... Just does not want to go in from
the setup program and rolls back. Anyone have any ideas?
Thanks,
BillB
Yes...that's a common error installing project server when
the permissions aren't set correctly with SQL Server.
-Sue
On Sun, 9 Oct 2005 17:33:04 -0700, "billb"
<billb@.discussions.microsoft.com> wrote:

>Has anyone seen this one before?
>I am using the db admin account and have all the rights necessary but it
>keeps failing during setup. I have also located the WEBSPS.SQL and have that
>working on a SQL 2005 server without error from a query analyzer that creates
>the necessary functions... sprocs.. etc... Just does not want to go in from
>the setup program and rolls back. Anyone have any ideas?
>Thanks,
>BillB
|||Hi Sue,
Thanks for your response. What are the proper permissions for SQL
Server?
Thanks,
--Ben

Project Server 2003 Setup Error 25624

Has anyone seen this one before?
I am using the db admin account and have all the rights necessary but it
keeps failing during setup. I have also located the WEBSPS.SQL and have that
working on a SQL 2005 server without error from a query analyzer that creates
the necessary functions... sprocs.. etc... Just does not want to go in from
the setup program and rolls back. Anyone have any ideas?
Thanks,
BillBYes...that's a common error installing project server when
the permissions aren't set correctly with SQL Server.
-Sue
On Sun, 9 Oct 2005 17:33:04 -0700, "billb"
<billb@.discussions.microsoft.com> wrote:
>Has anyone seen this one before?
>I am using the db admin account and have all the rights necessary but it
>keeps failing during setup. I have also located the WEBSPS.SQL and have that
>working on a SQL 2005 server without error from a query analyzer that creates
>the necessary functions... sprocs.. etc... Just does not want to go in from
>the setup program and rolls back. Anyone have any ideas?
>Thanks,
>BillB|||Hi Sue,
Thanks for your response. What are the proper permissions for SQL
Server?
Thanks,
--Bensql

Project Server 2003 Setup Error 25624

Has anyone seen this one before?
I am using the db admin account and have all the rights necessary but it
keeps failing during setup. I have also located the WEBSPS.SQL and have that
working on a SQL 2005 server without error from a query analyzer that create
s
the necessary functions... sprocs.. etc... Just does not want to go in from
the setup program and rolls back. Anyone have any ideas?
Thanks,
BillBYes...that's a common error installing project server when
the permissions aren't set correctly with SQL Server.
-Sue
On Sun, 9 Oct 2005 17:33:04 -0700, "billb"
<billb@.discussions.microsoft.com> wrote:

>Has anyone seen this one before?
>I am using the db admin account and have all the rights necessary but it
>keeps failing during setup. I have also located the WEBSPS.SQL and have tha
t
>working on a SQL 2005 server without error from a query analyzer that creat
es
>the necessary functions... sprocs.. etc... Just does not want to go in from
>the setup program and rolls back. Anyone have any ideas?
>Thanks,
>BillB|||Hi Sue,
Thanks for your response. What are the proper permissions for SQL
Server?
Thanks,
--Ben

Tuesday, March 20, 2012

Progromatically choosing yesterday's date as a parameter.

I have a report setup against an analysis service cube. It runs fine. Users
choose a date from the parameter list and then it pulls out the data nicely.
I need to programatically have it select a parameter for yesterday's date.
Somebody suggested setting a default script for the parameter of
=DateTime.Now.AddDays(-1).ToString("MM/dd/yyyy") to choose yesterday's date.
The problem is that my mdx date is in the format [Dimension Name].[All
Time].[Quarter].[Month].[Day] and the calendar that is being used is in the
tax year. (i.e - today, where in the first quarter of 2006)
How can I convert the current date to the appropriate format?
Any help would be greatly appreciated.
Thanks,
MattI have done similar things in the past and I wrote a SQL query that gets the
current date then I use the datepart function to get the parts (i.e quarters)
If you want to reformat the way a part displays I put the datepart inside a
CASE statement.
Another approach is to turn it into a string and use the datepart to get
the parts you want. It may look something like this.....
SELECT 'Q' + CAST(DATEPART(qq, GETDATE()) AS varchar(255)) AS Quarter
There is probably a better way to do this but this is how I did it.
"Matt" wrote:
> I have a report setup against an analysis service cube. It runs fine. Users
> choose a date from the parameter list and then it pulls out the data nicely.
> I need to programatically have it select a parameter for yesterday's date.
> Somebody suggested setting a default script for the parameter of
> =DateTime.Now.AddDays(-1).ToString("MM/dd/yyyy") to choose yesterday's date.
> The problem is that my mdx date is in the format [Dimension Name].[All
> Time].[Quarter].[Month].[Day] and the calendar that is being used is in the
> tax year. (i.e - today, where in the first quarter of 2006)
> How can I convert the current date to the appropriate format?
> Any help would be greatly appreciated.
> Thanks,
> Matt

Monday, March 12, 2012

Programming SQL Express

Hey, i have an installer that places ms sql express onto a machine. thats is fine. i want to create a post setup application that runs after ms sql server is installed. what for example i want to do is be able to create a user and have the DB allow remote connections. i can provide instructions for a 'peon' to make the required post setup changes but i want to see if i can cover that with an application. thanks

Charles Rezsonya

Write this as T-SQl and then either write code that calls into the database and execute the script(call this code from your installer), or include a .sql file with the script as part of your installation and then call that through a call to sqlcmd to execute.

Either way I recomend having a copy of the script as part of your install so that if something goes wrong you can at least walk a user through running the script by hand.

|||Hi,

These things can be easily changed using the SMO namespace:

using Microsoft.SqlServer.Management.Smo.Wmi;

(....)

ManagedComputer comp = new ManagedComputer(".");

comp.ClientProtocols["tcp"].IsEnabled = true;
(...)

Remeber to restart the service after changing this.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

amazing. i will certainly be trying that monday. Thanks. Keep an eye on this post incase i have add'l questions?

tia

Charles R

|||Sure, everyone who signed in for alerts (its by default in the forums will get an IM Alert and additional the email alert ( depending on the configuration)

HTH, Jens K. Suessmeyer.

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

hey, anyway you can show me a script that would change the server to allow tcp remote connections? what application do i run to process the script?

|||ok. i'm not finding the dll to include the smo namespace using 'using' in the sql sdk directory. and when i go to the studio and go to projects -> add reference its not listed "microsoft.sqlserver.etc etc"....... where can i download this dll? any add'l source on connecting examples?|||actually i found it on one of my other servers i installed the sdk to. so i'm including it. next really is just to get it going now :)|||

damn, but i am having a problem. i am using visual studio 2003 and when i go to about it says my .net framework is 1.1. is that a problem for the following message?

a referance to 'c:\program file\microsoft sql server\90\sdk\microsoft.sqlserver.sqlenum.dll' could not be added. this is not a valid or COM component. only assemblies with extension 'dll' and com components can be referenced. please make sure that the file is accessible, and that it is a valid assembly or com component.

|||is it possible to do this with visual studio 2003?|||

I don't believe so.

SMO is a SQL 2005 and .NET Framework 2.0 technology. I think that VS 2003 is locked into NetFx1.1. (Any VS experts can feel free to correct me.) You have a couple alternatives:

Move up to VS 2005, you can get the VS Express Editions for free if you like. They have some reduced functionality.

Programming SQL Express

Hey, i have an installer that places ms sql express onto a machine. thats is fine. i want to create a post setup application that runs after ms sql server is installed. what for example i want to do is be able to create a user and have the DB allow remote connections. i can provide instructions for a 'peon' to make the required post setup changes but i want to see if i can cover that with an application. thanks

Charles Rezsonya

Write this as T-SQl and then either write code that calls into the database and execute the script(call this code from your installer), or include a .sql file with the script as part of your installation and then call that through a call to sqlcmd to execute.

Either way I recomend having a copy of the script as part of your install so that if something goes wrong you can at least walk a user through running the script by hand.

|||Hi,

These things can be easily changed using the SMO namespace:

using Microsoft.SqlServer.Management.Smo.Wmi;

(....)

ManagedComputer comp = new ManagedComputer(".");

comp.ClientProtocols["tcp"].IsEnabled = true;
(...)

Remeber to restart the service after changing this.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

amazing. i will certainly be trying that monday. Thanks. Keep an eye on this post incase i have add'l questions?

tia

Charles R

|||Sure, everyone who signed in for alerts (its by default in the forums will get an IM Alert and additional the email alert ( depending on the configuration)

HTH, Jens K. Suessmeyer.

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

hey, anyway you can show me a script that would change the server to allow tcp remote connections? what application do i run to process the script?

|||ok. i'm not finding the dll to include the smo namespace using 'using' in the sql sdk directory. and when i go to the studio and go to projects -> add reference its not listed "microsoft.sqlserver.etc etc"....... where can i download this dll? any add'l source on connecting examples?|||actually i found it on one of my other servers i installed the sdk to. so i'm including it. next really is just to get it going now :)|||

damn, but i am having a problem. i am using visual studio 2003 and when i go to about it says my .net framework is 1.1. is that a problem for the following message?

a referance to 'c:\program file\microsoft sql server\90\sdk\microsoft.sqlserver.sqlenum.dll' could not be added. this is not a valid or COM component. only assemblies with extension 'dll' and com components can be referenced. please make sure that the file is accessible, and that it is a valid assembly or com component.

|||is it possible to do this with visual studio 2003?|||

I don't believe so.

SMO is a SQL 2005 and .NET Framework 2.0 technology. I think that VS 2003 is locked into NetFx1.1. (Any VS experts can feel free to correct me.) You have a couple alternatives:

Move up to VS 2005, you can get the VS Express Editions for free if you like. They have some reduced functionality.

Programming continuous merge replication

Hello,
This projects needs to setup automatically a few MSDE subscribers to a main
Distributor/Publisher.
I am using the ActiveX SQL Merge object to set up the merge replication, but
there are 3 problems:
1) There is not a property to set Continuous mode
2) If I set the ExchangeType to upload, when I browse for the properties
using Enterprise Manager, the “ExchangeType 1” is not present in the Agent
step
3) (Project killer) Assume I manage to set Continuous… After running the
SqlMerge object, the status shows “initializing in progress” but it never
finishes and I have to start again the agent from Enterprise Manager… after
selecting Start (from Enterprise Manager) the synchronization runs as
expected… but I cannot start it by program.
Here are the properties and methods that I am calling after everything is
already registered and ready:
//set up the publisher
m_oSqlMerge.Publisher = m_sDistServerName;
m_oSqlMerge.PublisherSecurityMode =
SQLMERGXLib.SECURITY_TYPE.DB_AUTHENTICATION;
m_oSqlMerge.PublisherDatabase = m_sDbName;
m_oSqlMerge.PublisherPassword = m_sDistPassword;
m_oSqlMerge.PublisherLogin = "sa";
m_oSqlMerge.Publication = m_sDbName;
//set up the distributor
m_oSqlMerge.Distributor = m_sDistServerName;
m_oSqlMerge.DistributorSecurityMode =
SQLMERGXLib.SECURITY_TYPE.NT_AUTHENTICATION;
//set up the subscriber
m_oSqlMerge.Subscriber = oSub.ServerName;
m_oSqlMerge.SubscriberDatabase = oSub.DatabaseName;
m_oSqlMerge.SubscriberDatasourceType =
SQLMERGXLib.DATASOURCE_TYPE.SQL_SERVER;
m_oSqlMerge.SubscriberSecurityMode =
SQLMERGXLib.SECURITY_TYPE.DB_AUTHENTICATION;
m_oSqlMerge.SubscriberLogin = "sa";
m_oSqlMerge.SubscriberPassword = sPassword;
//set up the subscription
m_oSqlMerge.SubscriptionType = SQLMERGXLib.SUBSCRIPTION_TYPE.PULL;
m_oSqlMerge.SynchronizationType =
SQLMERGXLib.SYNCHRONIZATION_TYPE.AUTOMATIC;
m_oSqlMerge.ExchangeType = SQLMERGXLib.EXCHANGE_TYPE.UPLOAD;
ProgressValue = 0;
//Initialize
m_oSqlMerge.Initialize();
m_oSqlMerge.Run();
//m_oSqlMerge.Terminate(); //No need to terminate if continuous
When you create a subscription to a merge publication using Enterprise
Manager, a SQL Server Agent job is created that, when run, synchronizes the
subscription. This job is used whenever you synchronize the subscription from
Enterprise Manager. However, when you start the synchronization
programmatically this agent job is not used and the Merge Agent is started
with the properties you set for the object instance. This is why setting
m_oSqlMerge.ExchangeType = SQLMERGXLib.EXCHANGE_TYPE.UPLOAD doesn’t affect
what you see in Enterprise Manager (which is the agent job). There is no
continuous mode for the Merge Agent, however, you can easily use a timer
control or program a method that calls the Run method at regular intervals to
synchronize the subscription. You should do some inserts at the Subscriber
and run the Merge Agent using your code to see if they make it to the
Publisher. Handling the Status event is a good way to get all of the agent
status and messages. For a good example of how to implement the Status event,
see http://www.winnetmag.com/Article/Art...79/39079.html. (Note you
need to be on at least SP3.)
Best Wishes,
Glenn Gailey [MS]
SQL Server User Education
"This posting is provided "AS IS" with no warranties, and confers no rights"
"uk" wrote:

> Hello,
> This projects needs to setup automatically a few MSDE subscribers to a main
> Distributor/Publisher.
> I am using the ActiveX SQL Merge object to set up the merge replication, but
> there are 3 problems:
> 1) There is not a property to set Continuous mode
> 2) If I set the ExchangeType to upload, when I browse for the properties
> using Enterprise Manager, the “ExchangeType 1” is not present in the Agent
> step
> 3) (Project killer) Assume I manage to set Continuous… After running the
> SqlMerge object, the status shows “initializing in progress” but it never
> finishes and I have to start again the agent from Enterprise Manager… after
> selecting Start (from Enterprise Manager) the synchronization runs as
> expected… but I cannot start it by program.
> Here are the properties and methods that I am calling after everything is
> already registered and ready:
> //set up the publisher
> m_oSqlMerge.Publisher = m_sDistServerName;
> m_oSqlMerge.PublisherSecurityMode =
> SQLMERGXLib.SECURITY_TYPE.DB_AUTHENTICATION;
> m_oSqlMerge.PublisherDatabase = m_sDbName;
> m_oSqlMerge.PublisherPassword = m_sDistPassword;
> m_oSqlMerge.PublisherLogin = "sa";
> m_oSqlMerge.Publication = m_sDbName;
> //set up the distributor
> m_oSqlMerge.Distributor = m_sDistServerName;
> m_oSqlMerge.DistributorSecurityMode =
> SQLMERGXLib.SECURITY_TYPE.NT_AUTHENTICATION;
>
> //set up the subscriber
> m_oSqlMerge.Subscriber = oSub.ServerName;
> m_oSqlMerge.SubscriberDatabase = oSub.DatabaseName;
> m_oSqlMerge.SubscriberDatasourceType =
> SQLMERGXLib.DATASOURCE_TYPE.SQL_SERVER;
> m_oSqlMerge.SubscriberSecurityMode =
> SQLMERGXLib.SECURITY_TYPE.DB_AUTHENTICATION;
> m_oSqlMerge.SubscriberLogin = "sa";
> m_oSqlMerge.SubscriberPassword = sPassword;
> //set up the subscription
> m_oSqlMerge.SubscriptionType = SQLMERGXLib.SUBSCRIPTION_TYPE.PULL;
> m_oSqlMerge.SynchronizationType =
> SQLMERGXLib.SYNCHRONIZATION_TYPE.AUTOMATIC;
> m_oSqlMerge.ExchangeType = SQLMERGXLib.EXCHANGE_TYPE.UPLOAD;
> ProgressValue = 0;
> //Initialize
> m_oSqlMerge.Initialize();
> m_oSqlMerge.Run();
> //m_oSqlMerge.Terminate(); //No need to terminate if continuous
>

Programmer needed

Just wanted to see if any of you would be interested in helping me setup an
online database? I do not have SQL knowledge and need a Pro to help me with
a website project. If so let me know and I will get in contact with you.
Thanks,
Randy
Message posted via http://www.webservertalk.comGotta Problem ?
"Randy Quinn via webservertalk.com" <forum@.nospam.webservertalk.com> schrieb im
Newsbeitrag news:1714ee1e788844269f0cb77eb5226938@.SQ
webservertalk.com...
> Just wanted to see if any of you would be interested in helping me setup
> an
> online database? I do not have SQL knowledge and need a Pro to help me
> with
> a website project. If so let me know and I will get in contact with you.
> Thanks,
> Randy
> --
> Message posted via http://www.webservertalk.com