Showing posts with label express. Show all posts
Showing posts with label express. Show all posts

Thursday, March 29, 2012

Changing the system (master) collation setting in SQL Server 2005 Express Edition

Does anyone know how to do the above without having to re-install SQL Server?

Cheers

Simon.

This is documented in the Books Online Topic located at ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/3242deef-6f5f-4051-a121-36b3b4da851d.htm or on MSDN at http://msdn2.microsoft.com/en-us/library/ms179254(en-US,SQL.90).aspx

Cheers,
Dan

Tuesday, March 27, 2012

Changing the Server Name

Hi Guys,

I am using a MS SQL Server 2005 express edition for storing the meta-files of a b2b application.

The SQL 2005 is installed localy. Now I must change my server (machine) name cause a internal application need this action.

What is the best practice to do this?

I've got 2 databases and a lot of tabeles within the installed sql server.

I am happy for all tutorials or instructions to handle this proposal nearyl perfectyl.

Many Regards

Check out http://msdn2.microsoft.com/en-us/library/ms143799.aspx

Mike

Changing the server collations SQL 2005 Express

How do you change the collation on the master and temp DB
Thanks
Anthony
Hello,
As far as I know you cant change the collation of system databases directly.
To do this you may need to rebuild the master database.
http://support.microsoft.com/?kbid=325335#7
Thanks
Hari
"Anthony" <Anthony@.discussions.microsoft.com> wrote in message
news:72FBD92B-A5E3-488D-8E60-56C6A36B48AA@.microsoft.com...
> How do you change the collation on the master and temp DB
> Thanks
> Anthony
|||Thanks for the reply.
but this is for sql 2005 not 2000. It is not done in the same way.
"Hari Prasad" wrote:

> Hello,
> As far as I know you cant change the collation of system databases directly.
> To do this you may need to rebuild the master database.
> http://support.microsoft.com/?kbid=325335#7
> Thanks
> Hari
>
> "Anthony" <Anthony@.discussions.microsoft.com> wrote in message
> news:72FBD92B-A5E3-488D-8E60-56C6A36B48AA@.microsoft.com...
>
>
sql

Changing the server collations SQL 2005 Express

How do you change the collation on the master and temp DB
Thanks
AnthonyHello,
As far as I know you cant change the collation of system databases directly.
To do this you may need to rebuild the master database.
http://support.microsoft.com/?kbid=325335#7
Thanks
Hari
"Anthony" <Anthony@.discussions.microsoft.com> wrote in message
news:72FBD92B-A5E3-488D-8E60-56C6A36B48AA@.microsoft.com...
> How do you change the collation on the master and temp DB
> Thanks
> Anthony|||Thanks for the reply.
but this is for sql 2005 not 2000. It is not done in the same way.
"Hari Prasad" wrote:
> Hello,
> As far as I know you cant change the collation of system databases directly.
> To do this you may need to rebuild the master database.
> http://support.microsoft.com/?kbid=325335#7
> Thanks
> Hari
>
> "Anthony" <Anthony@.discussions.microsoft.com> wrote in message
> news:72FBD92B-A5E3-488D-8E60-56C6A36B48AA@.microsoft.com...
> > How do you change the collation on the master and temp DB
> >
> > Thanks
> > Anthony
>
>

Changing the server collations SQL 2005 Express

How do you change the collation on the master and temp DB
Thanks
AnthonyHello,
As far as I know you cant change the collation of system databases directly.
To do this you may need to rebuild the master database.
http://support.microsoft.com/?kbid=325335#7
Thanks
Hari
"Anthony" <Anthony@.discussions.microsoft.com> wrote in message
news:72FBD92B-A5E3-488D-8E60-56C6A36B48AA@.microsoft.com...
> How do you change the collation on the master and temp DB
> Thanks
> Anthony|||Thanks for the reply.
but this is for sql 2005 not 2000. It is not done in the same way.
"Hari Prasad" wrote:

> Hello,
> As far as I know you cant change the collation of system databases directl
y.
> To do this you may need to rebuild the master database.
> http://support.microsoft.com/?kbid=325335#7
> Thanks
> Hari
>
> "Anthony" <Anthony@.discussions.microsoft.com> wrote in message
> news:72FBD92B-A5E3-488D-8E60-56C6A36B48AA@.microsoft.com...
>
>

Thursday, March 22, 2012

Changing TCP/IP IP addresses under Protocols for SQLExpress

SQL Server Configuraton Manager,

Protocols for sqlexpress,

TCP/IP

When I initially installed SQL Server 2005 Express, it automatically picked up all the IP addresses (60 of them) I had on the server, and filled them in under TCP/IP - IP adresses Tab.

I recently took those IPs off the server and replaced them with 30 new IP addresses. Is there a way to have SQL Server 2005 Express read the Network configuration on the server and take the old IPs off the TCP/IP - IP addresses tab and put the new one's there?

Thanks,

Bill

You have to reinstall your SQL Server to pick the new IP addresses. Are you listening on each IP address seperately or listening on IPALL? Those IPs does not matter if your server listens on IPALL.|||

Thanks a lot Xinwei, I reinstalled SQL Server and everything went fine.

Bill

Thursday, March 8, 2012

Changing Query behavior based on local vs. remote context?

Hello,
I'm not sure if this is the right ng for this question, but here goes...
I just installed a product that uses SQL Express. When I run queries
against the installed instance I get different behavior depending on if the
query is run from Management Studio locally or from SSMS running on a remote
machine. In both cases the user is a domain admin and the query is
identical. The local query returns 1000+ rows, the remote query returns
ZERO. If the query returns less than say 100 rows, there is no difference
between remote and local.
Has anyone else seen this or use use/implemented it themselves?
I'm curious; how this behavior is defined/implemented? Is it database or
instance specific? It seems to be instance-wide in my case but I'm not sure
yet. I've been digging around in SSMS but haven't found any settings or
properties that seem to apply to this, so any sugestions on where to look
would be appreciated.
Thanks!
KeithMy guess would be that there is a problem on the remote machine. Have you
tried a 2nd remote query?
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Keith" <keith@.alh.com> wrote in message
news:%23Ej27KC4HHA.1824@.TK2MSFTNGP04.phx.gbl...
> Hello,
> I'm not sure if this is the right ng for this question, but here goes...
> I just installed a product that uses SQL Express. When I run queries
> against the installed instance I get different behavior depending on if
> the query is run from Management Studio locally or from SSMS running on a
> remote machine. In both cases the user is a domain admin and the query is
> identical. The local query returns 1000+ rows, the remote query returns
> ZERO. If the query returns less than say 100 rows, there is no difference
> between remote and local.
> Has anyone else seen this or use use/implemented it themselves?
> I'm curious; how this behavior is defined/implemented? Is it database or
> instance specific? It seems to be instance-wide in my case but I'm not
> sure yet. I've been digging around in SSMS but haven't found any
> settings or properties that seem to apply to this, so any sugestions on
> where to look would be appreciated.
> Thanks!
> Keith
>|||Yes...a dozen or so actually. And I've tried them on different remote
machines as well with SSMS and SSMSe, in addition to using queries from the
query window and "Open Table/View" from the Object Explorer.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:OTMOdYC4HHA.2312@.TK2MSFTNGP06.phx.gbl...
> My guess would be that there is a problem on the remote machine. Have you
> tried a 2nd remote query?
> --
> Andrew J. Kelly SQL MVP
> Solid Quality Mentors
>
> "Keith" <keith@.alh.com> wrote in message
> news:%23Ej27KC4HHA.1824@.TK2MSFTNGP04.phx.gbl...
>|||Sounds like larger network packets are getting dropped. Some bridges that
do not do packet splitting can cause this.
Geoff N. Hiten
Senior SQL Infrastructure Consultant
Microsoft SQL Server MVP
"Keith" <keith@.alh.com> wrote in message
news:%23Ej27KC4HHA.1824@.TK2MSFTNGP04.phx.gbl...
> Hello,
> I'm not sure if this is the right ng for this question, but here goes...
> I just installed a product that uses SQL Express. When I run queries
> against the installed instance I get different behavior depending on if
> the query is run from Management Studio locally or from SSMS running on a
> remote machine. In both cases the user is a domain admin and the query is
> identical. The local query returns 1000+ rows, the remote query returns
> ZERO. If the query returns less than say 100 rows, there is no difference
> between remote and local.
> Has anyone else seen this or use use/implemented it themselves?
> I'm curious; how this behavior is defined/implemented? Is it database or
> instance specific? It seems to be instance-wide in my case but I'm not
> sure yet. I've been digging around in SSMS but haven't found any
> settings or properties that seem to apply to this, so any sugestions on
> where to look would be appreciated.
> Thanks!
> Keith
>|||OK then I would have to agree with Geoff in that it sounds like an issue
with the servers communications. If you can run this fine locally and all
other machines have issues it kind of narrows it down to that machine.
Check the event logs and see if there are errors on that server.
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Keith" <keith@.alh.com> wrote in message
news:e8xPg6C4HHA.5724@.TK2MSFTNGP05.phx.gbl...
> Yes...a dozen or so actually. And I've tried them on different remote
> machines as well with SSMS and SSMSe, in addition to using queries from
> the query window and "Open Table/View" from the Object Explorer.
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:OTMOdYC4HHA.2312@.TK2MSFTNGP06.phx.gbl...
>|||Geoff N. Hiten (SQLCraftsman@.gmail.com) writes:
> Sounds like larger network packets are getting dropped. Some bridges that
> do not do packet splitting can cause this.
Keith's description reminds me of a very weird error that a formed DSL
provider of mine had. I was mainly reading my after a holiday in SSH2
connection to a Unix account. And that worked fine. But then I got the
idea to look at some web site, but I could not access it. Tried another.
Did not work. A third one. Eventually I tried running lynx from the Unix
account. And that hung too! But I could open a new connection and read my
mail.
Finally I came around to put a very short text file on my web site, and
sure enough, this page did turn up in the browser. So I concluded they
had an error where split packets got lost, but as long as the packets
were small, things worked.
(The reason this provider is a former provider, is simply because I moved
to a new flat, and they could not deliver DSL there.)
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||"Geoff N. Hiten" <SQLCraftsman@.gmail.com> wrote in message
news:erXXwEE4HHA.5980@.TK2MSFTNGP04.phx.gbl...
> Sounds like larger network packets are getting dropped. Some bridges that
> do not do packet splitting can cause this.
I should add that this behavior does not happen running queries against any
other SQL Express, SQL 2005, SQL 2000, or MSDE instance - named or
otherwise, physical or virtual machine - anywhere on my network.
Only this particular instance behaves this way.|||"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:OeY8weE4HHA.3916@.TK2MSFTNGP02.phx.gbl...
> OK then I would have to agree with Geoff in that it sounds like an issue
> with the servers communications. If you can run this fine locally and all
> other machines have issues it kind of narrows it down to that machine.
Unless you install the product on another machine and get the same behavior,
which I have.

> Check the event logs and see if there are errors on that server.
The Event Viewer does not show any errors, nor does the error log in the
instance's data directory.
Considering that this behavior is present along with the installation of
this particular product, and that other named SQL and SQL Express instances
on the same machine do not demonstrate this behavior - even when returning
result sets orders of magnitude larger and on the same physical network -
I'm inclined to believe that this behavior is not machine specific but
rather localized to the named instance installed by this particular product.
Meaning, some configurable property of SQL Server.
I'm totally willing to believe that this is a bug in the product - a
misconfiguration of some kind - but it sounds like most folks don't think
that this type of (mis)configuration is even possible.
Oh, did I mention that this is a Microsoft product's install of SQL Express
;-)
k|||> Unless you install the product on another machine and get the same
> behavior, which I have.

> Considering that this behavior is present along with the installation of
> this particular product, and that other named SQL and SQL Express
> instances on the same machine do not demonstrate this behavior - even when
> returning result sets orders of magnitude larger and on the same physical
> network - I'm inclined to believe that this behavior is not machine
> specific but rather localized to the named instance installed by this
> particular product. Meaning, some configurable property of SQL Server.
Tidbits like these are always good to know. The answers we gave were based
on the info given. I would ping the makers of the product then and see if
they can provide a clue. Other than some ANSI settings at the connection or
database object level that may return different results I know of no
settings or configuration that would produce this behavior. Things like ANSI
PADDING, ANSI NULLS etc can affect how SQL Server treats the data for joins
and the Where clause which can produce different result sets. But none of
that is based on the size of the result set. I would check to see if the
connection settings are the same for both the local and remote SSMS. But
like I said that doesn't explain all the symptoms you mention.
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Keith" <keith@.alh.com> wrote in message
news:O%23h0HtF4HHA.484@.TK2MSFTNGP06.phx.gbl...
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:OeY8weE4HHA.3916@.TK2MSFTNGP02.phx.gbl...
> Unless you install the product on another machine and get the same
> behavior, which I have.
>
> The Event Viewer does not show any errors, nor does the error log in the
> instance's data directory.
> Considering that this behavior is present along with the installation of
> this particular product, and that other named SQL and SQL Express
> instances on the same machine do not demonstrate this behavior - even when
> returning result sets orders of magnitude larger and on the same physical
> network - I'm inclined to believe that this behavior is not machine
> specific but rather localized to the named instance installed by this
> particular product. Meaning, some configurable property of SQL Server.
> I'm totally willing to believe that this is a bug in the product - a
> misconfiguration of some kind - but it sounds like most folks don't think
> that this type of (mis)configuration is even possible.
> Oh, did I mention that this is a Microsoft product's install of SQL
> Express ;-)
> k
>
>|||I discovered this when I was a network admin/dba many years ago. We had a
business network and a process control network that had to be splittable for
political reasons. We had an ethernet bridge set up that we could unplug to
isolate the systems. I was setting up Replication (SQL 6.0/6.5, I think)
between two servers. The both had FDDI interfaces , but there was the
ethernet bridge between them. They negotiated large frame sizes since they
were both on FDDI, not considering that the equipment in the middle couldn't
pass that big a packet. Whatever genius designed the netotiation protocol
didn't bother to test and see if an actual large packet could make it
through. Drove me buggy troubleshooting it. Test queries worked. Ping
never failed. Drives mapped. Then replication would fail to sync. I
eventually found the issue and limited the packet size on the
publisher/distributor and never had another problem.
Geoff N. Hiten
Senior SQL Infrastructure Consultant
Microsoft SQL Server MVP
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns998F55155F70Yazorman@.127.0.0.1...
> Geoff N. Hiten (SQLCraftsman@.gmail.com) writes:
> Keith's description reminds me of a very weird error that a formed DSL
> provider of mine had. I was mainly reading my after a holiday in SSH2
> connection to a Unix account. And that worked fine. But then I got the
> idea to look at some web site, but I could not access it. Tried another.
> Did not work. A third one. Eventually I tried running lynx from the Unix
> account. And that hung too! But I could open a new connection and read my
> mail.
> Finally I came around to put a very short text file on my web site, and
> sure enough, this page did turn up in the browser. So I concluded they
> had an error where split packets got lost, but as long as the packets
> were small, things worked.
>
> (The reason this provider is a former provider, is simply because I moved
> to a new flat, and they could not deliver DSL there.)
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx

Saturday, February 25, 2012

Changing my database path in web.config

Hey guys,

I uploaded my website from VWD Express to ipower. My database did not work, which I have learned upon some research should have not been a shock to me, but most definetely was. When I contacted tech support they told my that my web.config files were pointing to my local paths. That I should change them and I should be fine. Elsewhere, in the knowledge base I found the strConnect that I am under the impression I need to use.

strConnect = "Provider=SQLOLEDB; Server=SQL-A1; UID=account_username; PWD=account_password; Database=user_db_name"
oSQLServer.Connect strServer,strLogin,strPwd

The problem is, I'm a complete newbie, learning as I go and I can't find anything on where or how I insert this into my web.config to correct my paths. IPower will not help with coding. I know my current connection string is in web.config in the appsettings, that's about as far as my knowledge goes.

So, could anyone show me how I go about putting this into my web.config? Examples are very helpful :]

On a side note, I've been reading that this is a common problem among newbies like myself. So, is changing these files actually going to work, or am I wasting my time? Also, before I get knee-deep into it, is the database-publishing kit put out by MS the way to go here?

Thanks for any and all replies, you guys are always awesome.

your HOST company should have either emailed you or given you information about your database access and login information. you basically change the Server, Username, and password values in your connection string in web.config to match this.

heres a good article about connection strings in web.config .

http://weblogs.asp.net/owscott/archive/2005/08/26/Using-connection-strings-from-web.config-in-ASP.NET-v2.0.aspx

|||

Ok

I know my account id, password, and I think that I can replace. I looked at the article you gave me but, what I'm still confused about is this (what I do have and what the examples in the article look like):

<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True"

providerName="System.Data.SqlClient" />

doesn't look anything like this: (what IPower shows me I need to connect my sql database)

strConnect = "Provider=SQLOLEDB; Server=SQL-A1; UID=account_username; PWD=account_password; Database=user_db_name"

oSQLServer.Connect strServer,strLogin,strPwd

Is this strConnect not what I really need? I have no idea what I'm supposed to be doingConfused

|||

the strConnect is the code you would use if it declare your connection in your code and NOT in the web.config file. So everytime you wanted to access the database you would put line of code. By placing the connection in the web.config if you change sqlservers you only need to change it in one location and not every time you make a call to the server. Here is what my web.config file looks like as far as a connection string (using your info above - not sure about the server name).

<connectionStrings>

<clear/>

<addname="MydbConnection"connectionString="Data Source=SQL-A1;Initial Catalog=user_db_name;User ID=account_username;Password=account_password;"providerName="System.Data.SqlClient"/>

</connectionStrings>

then add this code to your project to access the conenction.

Dim dbConnAs SqlConnection =New SqlConnection(ConnectionStrings("MydbConnection").ConnectionString)

then it would be like

dbconn.open()

|||

Thank you very much for trying to help.

strConnect is out the window.

I added the connection string in the web.config

grbourque:

then add this code to your project to access the conenction.

Dim dbConnAs SqlConnection =New SqlConnection(ConnectionStrings("MydbConnection").ConnectionString)

Where? I tried to put that in web.config as well and it didn't want to go there. I tried to put it in the code behind and that didn't work.

I'm sorry I sound like an idiot, I sure feel like one. I have more or less followed some type of tutorial to do everything I've done so far. I'm so frustrated right now that I can't get this to work I can't stand it.

I know your already being very specific and I should be able to pick it up from what you've already told me, but can you tell me where to put the other lines.

|||

Okay a couple things. When you placed the connection string in the web.config file did you keep the same name and only change the user info? If so then the name of that connection string will be MydbConnection. You can actually name it anything you want and have more than one connection if you like, just call up the connection you want by name. Second, I could be completely out to lunch but I do not like the server name they gave you. When I ping that name it comes back as not being able to find it. When I ping the hosted sql server that I am using it comes back with the IP address of that server. So that might be problem #1 and needs to be resolved prior to trying the rest.

Okay as far as the code goes. you would place that where you want to access the database.

private sub GetData()

Dim dbconn as sqlconnection = new sqlconnection(connectionstrings("MydbConnection").ConnectionString)
Dim dbReaderAs SqlDataReader
Dim dbQueryAs String ="SELECT * FROM Table"
Dim dbCommandAs New SqlCommand(dbQuery, dbConn)

dbConn.Open()
dbReader = dbCommand.ExecuteReader()

DO something here with reader

dbconn.close()

End Sub

|||

hi want to just use access db for smaple comments how to use server.mappath in web.config or in tire application classes thanks in advance

Changing MS SQL Server Express table properties

Hi,
I have a MS SQL Server Express database wich I upsized once from MSAccess. I can connect to it and get/insert data but I can't update thefield properties.
I've used Access 2003, Visual Studio .Net and SQL Server Web DataAdministrator, but I can't change the properties of existing tables. Icán add new tables and add their properties afterwards. Since I have alot of tables it would be too much work too recreate them all. So howcan I edit my existing tables?
Create new identical tables for each and do INSERT INTO and drop all the old tables so you have new SQL Server Express tables that you can modify. Hope this helps.

Friday, February 10, 2012

Changing data source programatically does not transfer data

I have created a SSIS package that transfer data from a Foxpro database to an instance of SQL Server 2005 Express. I used the wizard to create the package but I load and execute the package within a custom application that I have written in C#.

The way the custom application is intended to work is that the user can have the database in any location on the computer and all he has to do is specify the location then the application programatically changes the location of the source on the package that it has loaded and then execute it. When I initially run the package the first time (using the original path), it works fine and transfers the data. However, every subsequent time I run the application and specify a different path, the database on the SQL Server side gets created as expected but the data is not transfered!

Where am I going wrong? Do I need to save the package after I modify the source then reload and run it again or do i need to change something else in the Data Flow to make this work?

I think this may be the wrong approach. You can parameterize the package at execution time with the connection string of the source and destination. This is better, and easier, than modifying the package structure.

-Jamie

|||

That is exactly what I am doing Jamie. I am changing the Connection string property of the source connection. Still doesn't work. Check below the code snippet:

// Load the package

string sLPFPackage = @."C:\projects\CCS_DTS\CCS_DTS\LPFMigration.dtsx";

Microsoft.SqlServer.Dts.Runtime.Application app = new Microsoft.SqlServer.Dts.Runtime.Application();

Package oLPFPackage = app.LoadPackage(sLPFPackage, null);

oLPFPackage.UpdateObjects = true;

// Modify the source and target data locations

sDataSource = "Data Source=" + sLPFDataFolder + ";Provider=VFPOLEDB.1;Collating Sequence=MACHINE;";

ConnectionManager oDataConn = oLPFPackage.Connections["SourceConnectionOLEDB"];

DtsProperty prDataSource = oDataConn.Properties["ConnectionString"];

prDataSource.SetValue(oDataConn, sDataSource);

// Execute the package

oLPFPackage.Execute();

Any ideas?

|||

Actually that is exactly what I am suggesting you do NOT do. The package can be parameterized from the command-line when executed via dtexec.exe without actually changing the package itself. I don't know much about executing package from an application but I have no doubt that you will be able to do the same.

Explore the /SET option of dtexec.exe for more information: http://msdn2.microsoft.com/en-us/library/ms162810.aspx

-Jamie

|||Thanks jamie. Let me check it out. I will let you know if it helped.