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

Friday, March 30, 2012

How to control the loading of SqlDataSource?

I have an SqlDatSource that I have fully setup at design time, but I don't want it to open and load as soon as the page loads, instead I want to open it based on a condition.

How do you do that with a DataSource?

I know that I can simply remove the Select query, and then set it at run time, but I'm looking for something better, that allows me to have the Select query set at design time, in part because I have a lot of parameters.

Usually you have a control such as GridView or DetailsView that is connected to the SqlDataSource through its DataSourceId attribute. This will cause it to execute the query. If you leave the attribute empty the query will not be executed. From code you can set the DataSource and then call DataBind(). That will cause the SqlDataSource to execute:

GridView1.DataSource = SqlDataSource1;GridView1.DataBind();// Now the query is executed
|||

Within the SqlSataSource.Selecting event, you will have access to the Cancel property which you can set based on your conditions. If Cancel is set to True, then the Select event will not occur.

|||

while michielvoo's way is probably better, another way you can get the date to not display is to just set the GridView's Visible="false" initially, if you want the datasourceID property of the sqldatasource to be defined in the contol creation. Then, in your button_click event or whatever you do to get the data, you do:

VB:

GridView1.DataBind()
GridView1.Visible = True

C#:

GridView1.DataBind();
GridView1.Visible = True;

How to control SQL Server 2005 Express installed as a "prerequisite"


Suppose I check "SQL Server 2005 Express Edition" as one of the prerequisites for a custom app in a Windows Setup project.

From reading whatever docs I could get my hands on, it's still not clear to me how to control the installation of SQL Server Express with respect to things like instance name, service account, etc, etc.

In other words, this is stuff that's normally the domain of template.ini. However, there's no clear indication of where I should put template.ini so that the install of "prerequisite" SQL Server Express will see it and configure accordingly...

Thanks in advance to anyone who can help solve this...

Josh

Josh, template.ini is not used for configuration settings (as the .iss files were in SQL 2000). This file merely is used as documentation for creating silent installs by describing which flags are used in various situations.

As for another application installing SQL 2005 Express, I would assume that the application is controlling the install (instance name, accounts, etc) so that it can connect after install. If they are not exposing these install features during their install, they probably are using some default values for all installs.

Thanks,
Samuel Lester (MSFT)

|||

Samuel:

Yep, it looks like the parameters (at least, all the ones I tried) are recognized when supplied on the command line.

One parameter I haven't been able to find, though, is one that tells SQL Server Express Edition to use port 1433 instead of dynamic ports. I know about DISABLENETWORKPROTOCOLS (and it, too, works as expected), but it only activates TCP -- it doesn't affect the port-assignment scheme.

Thanks,
Josh

Monday, March 26, 2012

How to connect to my MSDE 2000 Rel A

Hi,

I only have Framework installed on my machine, and I also installed MSDE 2000 Rel. A, using the following command:
C:\MSDERelA\setup.exe SAPWD="myPass" INSTANCENAME="myXP"

I can see that the service for this app is running. Though, I could not connect to it using oSql command like the following:
osql -S(local)\myXP -E
or
osql -S(local)\myXP -Usa, and supply the password "myPass".

The message was:
[DBMSLPCN]SQL Server does not exist or access denied.
[DBMSLPCN]ConnectionOpen (Connect()).

Any response would be appreciated.



Subi_IHave you tried
osql -L
to verify the instance name?

If that doesn't help you may also want to check out this link|||Hi McMurdo,

Thanks. The command did help to find my database (my initial post was wrong in specifying the instance name).
And the link really helps for managing MSDE without UI tools.

Thanks,



Subi_I

How to connect to AdventureWorks database

I'm trying to connect to the AdventureWorks sample database, after just installing it from the SQL 2005 setup. I was expecting it to automatically appear in SQL Server Management Studio, but it's not there.

How do I get it to show up there?

-Alex

You will have to attach the databases first. they are just deplyoed to the file location specified in the instalaltion path.

HTH; Jens K. Suessmeyer.

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

You may not have installed them. If you go through SQL Server 2005's setup, you need to select the sample databases option.

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

|||

refer this KB http://msdn2.microsoft.com/en-us/library/aa992075(VS.80).aspx

Madhu

|||While installing the SQL 2005 setup, by default the sample databases option will be disabled. You have to explicitly enable this option to install the sample databases.

Monday, March 19, 2012

How to configure MSDTC for transaction processing in a setup

In this article http://download.microsoft.com/download/f/1/0/f10c4f60-630e-4153-bd53-c3010e4c513b/ReadmeSQLEXP2005.htm , it explains that you must fully enable the security settings to allow use of transaction processing for a SqlExpress database. Is there a way to set these option in a setup? Or is there another way to use transaction processing without setting these options?

Thanks

Dave T

I'm not aware of any way to control this using the SQL setup program. You could always write a wrapper that programmatically makes these changes to the MSDTC service security settings, but that's outside the scope of this forum. (And my knowledge!)

Mike

How to configure MSDTC for transaction processing in a setup

In this article http://download.microsoft.com/download/f/1/0/f10c4f60-630e-4153-bd53-c3010e4c513b/ReadmeSQLEXP2005.htm , it explains that you must fully enable the security settings to allow use of transaction processing for a SqlExpress database. Is there a way to set these option in a setup? Or is there another way to use transaction processing without setting these options?

Thanks

Dave T

I'm not aware of any way to control this using the SQL setup program. You could always write a wrapper that programmatically makes these changes to the MSDTC service security settings, but that's outside the scope of this forum. (And my knowledge!)

Mike

Monday, March 12, 2012

how to configure from local distributor to remote

Hi,
I already have a merge replication setup successfully.
However I now need to change the network from a central publisher to a
central publisher with remote distributor
See http://www.databasejournal.com/features/mssql/article.php/1458491 and
Ctrl+F for the words central publisher.
I tried to redo another publication but the wizard no longer asks me whether
I want my distributor to be on a remote machine.
Then I tried to follow this article
http://technet.microsoft.com/en-us/library/ms151192.aspx
and looked for a Configure distribution which I cannot find.
Then I tried this article
http://msdn2.microsoft.com/en-us/library/ms147363.aspx
, but realise that the value of installed in the result set is 1, so I am
not sure what I should do next. Furthermore I am unfamiliar with the T-SQL
syntax necessary to make the changes.
FYI, the result set from using the sp_get_distribution was
installed = 1
distribution server = machineName
distribution db installed = 1
is distribution publisher = 1
has remote distribution = 0
Please advise. I am running SQL server 2005 Trial edition on 2 separate
win2003 server with one of them already set up as a successful central
publisher.
If I really have no choice but to use T-SQL please give me more explicit
details. Thank you.
This is pretty much a one-off choice. To move to a remote distributor I'd
script out the publications, remove the subscriptionas and publications,
remove the distributor entirely, readd the distributor remotely then add the
publications again.
HTH,
Paul Ibison

Friday, February 24, 2012

How to cluster sql in a 2003 cluster

I have set up my 2003 cluster. I think everything works fine, but when i tried to setup sql in a cluster something went wrong. how am i supposed to setup sql in a cluster on a 2003 box?
Power Edge 2650
Windows 2003 Enterprise
Sql 2000
external scsi disk array.
For the most part setup on a Windows 2003 cluster is identical to setup on
a Windows 2000 cluster.
Things to watch out for:
SQL Server 2000 does not support mount points. So if your Windows 2003
cluster has mount points you will have to remove them.
SQL Server 2000 support for mounted volumes
http://support.microsoft.com/default.aspx?scid=kb;[LN];819546
SQL Server 2000 does not support Terminal SErver installed on a Windows
2003 cluster
SQL Server 2000 Cluster Does Not Install on Windows Server 2003-Based
Computers Where Terminal Services Is Installed
http://support.microsoft.com/default.aspx?scid=kb;[LN];301520
If you are installing a named instance then you will ahve to create an
alias on the Windows 2003 server where you are running setup from.
PRB: Installation of a Named Instance of SQL Server 2000 Virtual Server on
a Windows 2003-Based Cluster Fails
http://support.microsoft.com/default.aspx?scid=kb;[LN];815431
--Regards
Amit Kumar
This posting is provided "AS IS" with no warranties, and confers no rights.
"Please do not send e-mail directly to this alias. This alias is for
newsgroup purposes only."
"TomasG" <anonymous@.discussions.microsoft.com> wrote in message
news:45D66029-6798-4B34-AFA3-3EF825AF3DEB@.microsoft.com...
> I have set up my 2003 cluster. I think everything works fine, but when i
tried to setup sql in a cluster something went wrong. how am i supposed to
setup sql in a cluster on a 2003 box?
> Power Edge 2650
> Windows 2003 Enterprise
> Sql 2000
> external scsi disk array.