Showing posts with label edition. Show all posts
Showing posts with label edition. Show all posts

Friday, March 23, 2012

How to setup SQL auth. for SQLserver 2005 express?

Hi,

I can't seem to set up SQL server authentication for SQLserver 2005 Express edition..

I simply can't find the settings for that. I have Management Studio Express installed and I can see the SA user but I can't login using that user.. I know that there's supposed to be a setting for turning on SQL auth. but it's not like it used to be in Enterprise manager :) so I can't find it.. ;/ I couldn't find any documentation on how to do this so I thought I'll try here..

(I need SQL auth for my project :) - it must be done with that..)

Thanks in advance,

ZenX

Hi,

have a look in on my site in the Screencast section, there is a detailed Screencast for this which will show you the steps.

HTH, jens Suessmeyer.

http://www.sqlserver2005.de

How to setup SelectParameters programmatically?

Hi,

I am using Visual Web Developer 2005 Express Edition.

I am trying to SELECT three information fields from a table when the Page_Load take place (so I select the info on the fly). The refering page, sends the spesific record id as "Articleid", that looks typically like this: "http://localhost:1424/BelaBela/accom_Contents.aspx?Articleid=2". I need to extract the "Article=2" so that I can access record 2 (in this example).

How do I define the SelectParameters or QueryStingField on the fly so that I can define the WHERE part of my query (see code below). If I remove the WHERE portion, then it works, but it seem to return the very last record in the database, and if I include it, then I get an error "Must declare the scalar variable @.resortid". How do I programatically set it up so that @.resortid contains the value that is associated with "Articleid"?

My code is below.

Thank you for your advise!

Regards
Jan

/******************************************************************************** RETRIEVE INFORMATION FROM DATABASE*******************************************************************************/// specify the data sourcestring connContStr = ConfigurationManager.ConnectionStrings["tourism_connect1"].ConnectionString;SqlConnection myConn =new SqlConnection(connContStr);// define the command queryString query ="SELECT resortid, TourismGrading, resortHits FROM Resorts WHERE ([resortid] = @.resortid)";SqlCommand myCommand =new SqlCommand(query, myConn);// open the connection and instantiate a datareadermyConn.Open();SqlDataReader myReader = myCommand.ExecuteReader();// loop thru the readerwhile (myReader.Read()){ Label5.Text = myReader.GetInt32(0).ToString(); Label6.Text = myReader.GetInt32(1).ToString(); Label7.Text = myReader.GetInt32(2).ToString();}// close the reader and the connectionmyReader.Close();myConn.Close();

You can try the following, but you may need to change the resotid if it is an integer type.

SqlCommand myCommand =new SqlCommand(query, myConn);

myCommand.Parameters.Add("@.resortid"

,SqlDbType.NVarChar, 10).Value =Request.QueryString("resortid");|||
Something like this: 
String ArticleID;if (Request.QueryString["ArticleID"] !=null) ArticleID = Request.QueryString["ArticleID"];else// handle bad parameterSqlParameter param =new SqlParameter();param.ParameterName ="@.resortId";param.Value = ArticleID.ToInt32();myConn.Parameters.Add(param);
|||

Hi Limno and SGWellens,

Thanks for your help - I managed to get it working like a charm!

Regards

Jan

How to Setup Merge replication with sql express

I have a Windows Mobile aplication that uses merge replication to synchronize between sql compact and full sql Enterprise edition and It works great. Instantiating the SqlCeReplication object setting it's properties and calling Synchronize on it is pretty simple assuming everything is setup properly at the publisher.

For the life of me I can't figure out how to do this on the desktop (Programatically setup a subscription and create a database using objects in the System.Replication Namespace and hopefully call Synchronize on it).

Someone please point me in the right direction.

Thanks,


Patrick

See topic "Programming with Replication Management Objects", http://msdn2.microsoft.com/en-us/library/ms146869(SQL.90).aspx.

|||

Look at the MergeSynchronizationAgent class.

Here is some sample code in C#:

Code Snippet

_mergeAgent = newMergeSynchronizationAgent();

_mergeAgent.Publication = _publication;

_mergeAgent.Publisher = _publisher;

_mergeAgent.PublisherDatabase = _publisherDB;

_mergeAgent.PublisherSecurityMode = SecurityMode.Integrated;

_mergeAgent.Distributor = _distributor;

_mergeAgent.DistributorLogin = _distributorLogin;

_mergeAgent.DistributorPassword = _distributorPassword;

_mergeAgent.DistributorSecurityMode = SecurityMode.Standard;

_mergeAgent.Subscriber = _subscriber;

_mergeAgent.SubscriberDatabase = _subscriberDB;

_mergeAgent.SubscriberLogin = _subscriberLogin;

_mergeAgent.SubscriberPassword = _subscriberPassword;

_mergeAgent.SubscriberSecurityMode = SecurityMode.Standard;

_mergeAgent.SubscriptionType = SubscriptionOption.Pull;

_mergeAgent.LoginTimeout = _LoginTimeOut;

_mergeAgent.QueryTimeout = _QueryTimeOut;

_mergeAgent.Synchronize();

Hope this helps!

how to setup local SQL Server 2005 DB

I installed 2005 Developer edition on a local workstation in our lab. I can connect to a network SQL Server with it just fine. But I do not have a local instance of SQL Server on this workstation.

How do I create a local instance of SQL Server? (box is WinXPPro-SP3)

After accepting the defaults for this installation, I noticed that there were no "local" instances of SQL server available, whereby I could go out and create my own test databases locally or copy a few tables from a production server over to my local box for testing. I'm looking through the books online and do not see (maybe I missed it) the steps to creating a local instance for setting up a workstaiton as a 'test' environment.

Assistance is appreciated.

RLN

Bummer to find that no one responded to this problem because its the same exact problem I'm having except that I have Standard edition installed on XPPro SP2

Anyone have any ideas on how I can set this up?

Thanks

|||

Hi,

i do not understand what you are try to achieve here!!!

Local Instance of SQL Server !? you may try installing SQL 2005 Developer Edition / SQL 2005 Express Edition on your Workstation and then you may restore backup of your production database or you may detach db on prod server copy .mdf and .ldf files to your workstation and attach it on your work station to work as local/test environment and attach your prod db again so that prod server is also up for use.

is this you are looking for!?

Hemantgiri S. Goswami

|||

I'm in the same situation.

In S2K you could only do this with personal edition so I guess it could be the same here....Express edition maybe?

But if there's any help out there I too would welcome any advice.

Thanks,
Eamon
Ireland

|||Have you refer my reply !!!!

how to setup local SQL Server 2005 DB

I installed 2005 Developer edition on a local workstation in our lab. I can connect to a network SQL Server with it just fine. But I do not have a local instance of SQL Server on this workstation.

How do I create a local instance of SQL Server? (box is WinXPPro-SP3)

After accepting the defaults for this installation, I noticed that there were no "local" instances of SQL server available, whereby I could go out and create my own test databases locally or copy a few tables from a production server over to my local box for testing. I'm looking through the books online and do not see (maybe I missed it) the steps to creating a local instance for setting up a workstaiton as a 'test' environment.

Assistance is appreciated.

RLN

Bummer to find that no one responded to this problem because its the same exact problem I'm having except that I have Standard edition installed on XPPro SP2

Anyone have any ideas on how I can set this up?

Thanks

|||

Hi,

i do not understand what you are try to achieve here!!!

Local Instance of SQL Server !? you may try installing SQL 2005 Developer Edition / SQL 2005 Express Edition on your Workstation and then you may restore backup of your production database or you may detach db on prod server copy .mdf and .ldf files to your workstation and attach it on your work station to work as local/test environment and attach your prod db again so that prod server is also up for use.

is this you are looking for!?

Hemantgiri S. Goswami

|||

I'm in the same situation.

In S2K you could only do this with personal edition so I guess it could be the same here....Express edition maybe?

But if there's any help out there I too would welcome any advice.

Thanks,
Eamon
Ireland

|||Have you refer my reply !!!!

how to setup local SQL Server 2005 DB

I installed 2005 Developer edition on a local workstation in our lab. I can connect to a network SQL Server with it just fine. But I do not have a local instance of SQL Server on this workstation.

How do I create a local instance of SQL Server? (box is WinXPPro-SP3)

After accepting the defaults for this installation, I noticed that there were no "local" instances of SQL server available, whereby I could go out and create my own test databases locally or copy a few tables from a production server over to my local box for testing. I'm looking through the books online and do not see (maybe I missed it) the steps to creating a local instance for setting up a workstaiton as a 'test' environment.

Assistance is appreciated.

RLN

Bummer to find that no one responded to this problem because its the same exact problem I'm having except that I have Standard edition installed on XPPro SP2

Anyone have any ideas on how I can set this up?

Thanks

|||

Hi,

i do not understand what you are try to achieve here!!!

Local Instance of SQL Server !? you may try installing SQL 2005 Developer Edition / SQL 2005 Express Edition on your Workstation and then you may restore backup of your production database or you may detach db on prod server copy .mdf and .ldf files to your workstation and attach it on your work station to work as local/test environment and attach your prod db again so that prod server is also up for use.

is this you are looking for!?

Hemantgiri S. Goswami

|||

I'm in the same situation.

In S2K you could only do this with personal edition so I guess it could be the same here....Express edition maybe?

But if there's any help out there I too would welcome any advice.

Thanks,
Eamon
Ireland

|||Have you refer my reply !!!!sql

Monday, March 12, 2012

How to set SQL Server and VS default folder paths?

Ive just installed VS2005 Pro and SQL Server Developer edition.

Now I want to set the default paths for project, templates, settings. But I want for both VS and SQL files.

For example, right now the default folders for SQL Studio are:

.\My Documents\SQL Server Management Studio\Projects

.\My Documents\SQL Server Management Studio\Settings

.\My Documents\SQL Server Management Studio\Templates

.\My Documents\SQL Server Management Studio\Backup Files

... and so on.

For VS Studio:

.\My Documents\Visual Studio 2005\Projects

.\My Documents\Visual Studio 2005\Templates

.\My Documents\Visual Studio 2005\Code Snippets

... and so on.

I would like for all sub-folders(from SQL Server and VS) to be in one same folder(Development), for example:

.\My Documents\Development\Projects

.\My Documents\Development\Settings

.\My Documents\Development\Templates

.\My Documents\Development\Backup Files

.\My Documents\Development\Code Snippets

... and so on.

I have tried changing in each application′s options the default path for each one, pointing to each folder I listed above.

My problem is that both VS and SQL Server still keeps creating folders in the old locations, for example: ".\My Documents\SQL Server Management Studio\Projects". This example happens when I create a new query, and try to save it, it automatically creates that folder.

It only works for a few of them, like the settings folder. Ive managed to create a single folder for SQL and VS setting files.

Is there a way I can join both Application folders? I want to keep both projects files in one folder, both setting files in one folder, and so on...

I hope I explained well my situation.

Thanks!

In VS 2005 you can change default directories by going to Tools >> Options menu then selecting Projects and Solutions.

In SQL Management Studio I believe it opens your last known file path you opened.

Justin King
|||SQL Server Managemetn Studio does not retain your file location between sessions. As far as I can tell there is no way to change this and the MS help facility neither confirms nor denies this assumption.
|||

So its not possible to change that?

Ive changed all places in the registry (all the keys I think might change that)
Still it creates the folders. Are there other places I can change that?

Thanks for the help.