Showing posts with label local. Show all posts
Showing posts with label local. Show all posts

Sunday, March 25, 2012

can I export tables so that existing tables in destination database will be modified?

I'm working on an ASP.Net project where I want to test code on a local
machine using a local database as a back-end, and then export it to
the production machine where it uses the hosting provider's SQL Server
database on the back-end. Is there a way to export tables from one
SQL Server database to another in such a way that if a table already
exists in the destination database, it will be updated to reflect the
changes to the local table, without existing data in the destination
table being lost? e.g. suppose I change some tables in my local
database by adding new fields. Can I "export" these changes to the
destination database so that the new fields will be added to the
destination tables (and filled in with default values), without losing
data in the destination tables?

If I run the DTS Import/Export Wizard that comes with SQL Server and
choose "Copy table(s) and view(s) from the source database" and choose
the tables I want to copy, there is apparently no option *not* to copy
the data, and since I don't want to copy the data, that choice doesn't
work. If instead of "Copy table(s) and view(s) from the source
database", I choose "Copy objects and data between SQL Server
databases", then on the following options I can uncheck the "Copy
Data" box to prevent data being copied. But for the "Create
Destination Objects" choices, I have to uncheck "Drop destination
objects first" since I don't want to lose the existing data. But when
I uncheck that and try to do the copy, I get collisions between the
properties of the local table and the existing destination table,
e.g.:
"Table 'wbuser' already has a primary key defined on it."

Is there no way to do what I want using the DTS Import/Export Wizard?
Can it be done some other way?

-Bennett"Bennett Haselton" <bennett@.peacefire.org> wrote in message
news:e614455c.0411160123.294dfd10@.posting.google.c om...
> I'm working on an ASP.Net project where I want to test code on a local
> machine using a local database as a back-end, and then export it to
> the production machine where it uses the hosting provider's SQL Server
> database on the back-end. Is there a way to export tables from one
> SQL Server database to another in such a way that if a table already
> exists in the destination database, it will be updated to reflect the
> changes to the local table, without existing data in the destination
> table being lost? e.g. suppose I change some tables in my local
> database by adding new fields. Can I "export" these changes to the
> destination database so that the new fields will be added to the
> destination tables (and filled in with default values), without losing
> data in the destination tables?

In a word, no.

I'd suggest take the same version controlled scripts (you are of course
using version control, right? :-) you used to make the changes in Dev and
run those against the Prod server.

> If I run the DTS Import/Export Wizard that comes with SQL Server and
> choose "Copy table(s) and view(s) from the source database" and choose
> the tables I want to copy, there is apparently no option *not* to copy
> the data, and since I don't want to copy the data, that choice doesn't
> work. If instead of "Copy table(s) and view(s) from the source
> database", I choose "Copy objects and data between SQL Server
> databases", then on the following options I can uncheck the "Copy
> Data" box to prevent data being copied. But for the "Create
> Destination Objects" choices, I have to uncheck "Drop destination
> objects first" since I don't want to lose the existing data. But when
> I uncheck that and try to do the copy, I get collisions between the
> properties of the local table and the existing destination table,
> e.g.:
> "Table 'wbuser' already has a primary key defined on it."
> Is there no way to do what I want using the DTS Import/Export Wizard?
> Can it be done some other way?
> -Bennett|||"Greg D. Moore \(Strider\)" <mooregr_deleteth1s@.greenms.com> wrote in message news:<7Mnmd.16$1u.15@.twister.nyroc.rr.com>...
> "Bennett Haselton" <bennett@.peacefire.org> wrote in message
> news:e614455c.0411160123.294dfd10@.posting.google.c om...
> > I'm working on an ASP.Net project where I want to test code on a local
> > machine using a local database as a back-end, and then export it to
> > the production machine where it uses the hosting provider's SQL Server
> > database on the back-end. Is there a way to export tables from one
> > SQL Server database to another in such a way that if a table already
> > exists in the destination database, it will be updated to reflect the
> > changes to the local table, without existing data in the destination
> > table being lost? e.g. suppose I change some tables in my local
> > database by adding new fields. Can I "export" these changes to the
> > destination database so that the new fields will be added to the
> > destination tables (and filled in with default values), without losing
> > data in the destination tables?
> In a word, no.
> I'd suggest take the same version controlled scripts (you are of course
> using version control, right? :-) you used to make the changes in Dev and
> run those against the Prod server.

Uh, no... my "script" is that I move the mouse pointer over the
"wbuser" table in Server Explorer in VS .Net, right-click, pick
"Design Table", and add columns that way :)

So I guess I'll just have to remember to run that "script" against the
Prod database whenever I make any changes.

Still, I would have thought that what I was trying, would be a pretty
common thing for people to want to do... surprised it's not built-in.

-Bennett|||Bennett Haselton (bennett@.peacefire.org) writes:
> Uh, no... my "script" is that I move the mouse pointer over the
> "wbuser" table in Server Explorer in VS .Net, right-click, pick
> "Design Table", and add columns that way :)
> So I guess I'll just have to remember to run that "script" against the
> Prod database whenever I make any changes.
> Still, I would have thought that what I was trying, would be a pretty
> common thing for people to want to do... surprised it's not built-in.

There are third-party tools. Red Gate's SQL Compare is popular.

One reason that this is not built-in is that changes to tables is far
from always something that can be performed automatically. In our shop
we keep all table definitions under source control. To generate an update
script we have a tool that reads SourceSafe between two labels to load
all new and changed objects. For changed tables you get a script that
copies data from the old definition to the new, but this script is really
only a template. In many cases I need to change the script, because a
new column is supposed be initiated with some values derived from
other columns or tables. And there might be even wilder changes.

Point and click may be convenient, but for something which is to be
run several times needs to be automized to be sure that all are updates
are carried out the same way. Thus, you need a script.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Thursday, March 22, 2012

Can I Debug Remote SQL Server 2000 Stored Procedure in Visual Studio 2005

I can debug an SQL Server 2005 stored procedure in Visual Studio 2005 from a local database (e.g. AdventureWorks).

However, when I try to debug a stored procedure on a remote server running SQL Server 2000 the debug process is not accessible (i.e. I can choose 'Step Into Stored Procedure' and it seems to run but I cannot debug it).

Am I trying to do something that just can't be done? Is this a compatibility issue between Visual Studio 2005 and SQL Server 2000? Or am I missing something?

Thanks for any advice on this.

Richard

you can do this by using the server explorer (ctrl+alt+s)

in the server explorer right clcik the object in the server explorer

then click modify

|||

As far as I can see, Server Explorer in Visual Studio does not give me a 'Modify' option. It gives me a 'Step into Stored Procedure' option that does not seem work for remote SQL Server 2000 stored procedures.

The 'Modify' option is available in SQL Server Management Studio Object Explorer but provides no debugging.

Maybe I have something set up wrong?

|||

As far as I can see, Server Explorer in Visual Studio does not give me a 'Modify' option. It gives me a 'Step into Stored Procedure' option that does not seem work for remote SQL Server 2000 stored procedures.

The 'Modify' option is available in SQL Server Management Studio Object Explorer but provides no debugging.

Maybe I have something set up wrong?

|||

the modify option is available on the server explorer if you are

creating an ASP.net/web project.

if you are developing windows application project

use the open option instead for tables its

open table definition

|||

As far as I can see, Server Explorer in Visual Studio does not give me a 'Modify' option. It gives me a 'Step into Stored Procedure' option that does not seem work for remote SQL Server 2000 stored procedures.

The 'Modify' option is available in SQL Server Management Studio Object Explorer but provides no debugging.

Maybe I have something set up wrong?

|||

right click the SP. then click on OPEN on vs2005 server explorer.

Tuesday, March 20, 2012

Can I copy a local package

Hi
I'm looking for a way to copy a local package. I thought it would be fairly
straight forward with just a simple command, but that doesn't seems to be
the case. Does anyone of you know how it can be done - if it can?....
Regards
Steen
Hi,
In DTS window in enterprise manager, Save the DTS package as a Structured
Storage File.
After that you can copy package to the destination server.
- In DTS Designer, on the toolbar, click Save.
- In the Location list, click Structured Storage File.
- Complete the rest of the required fields.
You can later open them in another Server.
Thanks
Hari
MCDBA
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:Os3PalPWEHA.1888@.TK2MSFTNGP11.phx.gbl...
> Hi
> I'm looking for a way to copy a local package. I thought it would be
fairly
> straight forward with just a simple command, but that doesn't seems to be
> the case. Does anyone of you know how it can be done - if it can?....
> Regards
> Steen
>
|||Steen,
manually the simplest way is to open the package and save as a different
name, but to do this programatically is not straightforward - have a look at
this page for the posibilities available:
http://www.sqldts.com/default.aspx?204.
HTH,
Paul Ibison

Can I copy a local package

Hi
I'm looking for a way to copy a local package. I thought it would be fairly
straight forward with just a simple command, but that doesn't seems to be
the case. Does anyone of you know how it can be done - if it can?....
Regards
SteenHi,
In DTS window in enterprise manager, Save the DTS package as a Structured
Storage File.
After that you can copy package to the destination server.
- In DTS Designer, on the toolbar, click Save.
- In the Location list, click Structured Storage File.
- Complete the rest of the required fields.
You can later open them in another Server.
--
Thanks
Hari
MCDBA
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:Os3PalPWEHA.1888@.TK2MSFTNGP11.phx.gbl...
> Hi
> I'm looking for a way to copy a local package. I thought it would be
fairly
> straight forward with just a simple command, but that doesn't seems to be
> the case. Does anyone of you know how it can be done - if it can?....
> Regards
> Steen
>|||Steen,
manually the simplest way is to open the package and save as a different
name, but to do this programatically is not straightforward - have a look at
this page for the posibilities available:
http://www.sqldts.com/default.aspx?204.
HTH,
Paul Ibison

Can I copy a local package

Hi
I'm looking for a way to copy a local package. I thought it would be fairly
straight forward with just a simple command, but that doesn't seems to be
the case. Does anyone of you know how it can be done - if it can?....
Regards
SteenHi,
In DTS window in enterprise manager, Save the DTS package as a Structured
Storage File.
After that you can copy package to the destination server.
- In DTS Designer, on the toolbar, click Save.
- In the Location list, click Structured Storage File.
- Complete the rest of the required fields.
You can later open them in another Server.
Thanks
Hari
MCDBA
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:Os3PalPWEHA.1888@.TK2MSFTNGP11.phx.gbl...
> Hi
> I'm looking for a way to copy a local package. I thought it would be
fairly
> straight forward with just a simple command, but that doesn't seems to be
> the case. Does anyone of you know how it can be done - if it can?....
> Regards
> Steen
>|||Steen,
manually the simplest way is to open the package and save as a different
name, but to do this programatically is not straightforward - have a look at
this page for the posibilities available:
http://www.sqldts.com/default.aspx?204.
HTH,
Paul Ibisonsql

Can i connect to SQLExpress instance using (local)

Hello,

I am using the following connection string to connect to SQL Server 2005 Express Edition installed on my local PC.
string sqlstr = "Server=(local);Database=MyDB;User ID=sa;Password=sa;Trusted_Connection=False";

And it gives me the following error. The string works fine in computer with SQL Server 2000 instance but fails with 2005. The string also fails for "Server = localhost".
However the string works very fine if I use the name of Server 2005 i.e ./SQLExpress

===================================

Cannot connect to (local).

===================================

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)


Error Number: 2
Severity: 20
State: 0


Now the main problem is that, of course I could use a named instance, but since I am embedding the Connection String in a dll file so that any user can use it to connect it to the local instance of the SQL Server 2005 installed in his/her computer, I need to use "server = localhost". Doesn't SQL 2005 support this. If yes, where could i find option to enable it?

I have enabled every option available in surface area configuration for SQL Server 2005, but nothing seems to help out. I even use local as well as remote connections using both TCP/IP and named pipes.
Can nyone help me out?

By default SQL Server 2005 Express edition is installed as a named instance with name "SQLExpress". As a result, the connection string should specify the instance, e.g. ".\SQLExpress" or "(local)\SQLExpress" to distinguish it from a possible default instance of SQL Server that may be installed on the same machine. If you install SQL Express as a default instance then "." or "(local)" are the proper ways to specify in the connection string.|||Is there a way to convert the named instance to a default one apart from re-installation. I have only a single named instance on my computer.|||The only way to change the instance name is to re-install - uninstall and install as default instance.|||Thanks a lot, Peter. That solves it all.sql

Can I carry my existing DB users to a new server and restore??

Hi,

Quick question, I have about 20 users in my local server and database. We
are looking to restore that database to a new server in a new network and
still be able to retain the database users.

We have created all 20 logins in the new server (exact names) but when we
restore the database I do not see the users anymore!

Is there something we can do to preserve them or a script we can run to link
them again?

Thanks a bunch!!!

S"SD" <npspam@.nowhere.net> wrote in message
news:138249382eb68f5a6766a476adc3da38@.news.teranew s.com...
> Hi,
> Quick question, I have about 20 users in my local server and database. We
> are looking to restore that database to a new server in a new network and
> still be able to retain the database users.
> We have created all 20 logins in the new server (exact names) but when we
> restore the database I do not see the users anymore!

sp_change_users_login is probably what you need.

> Is there something we can do to preserve them or a script we can run to
link
> them again?
> Thanks a bunch!!!
> S
>|||"Greg D. Moore \(Strider\)" <mooregr_deleteth1s@.greenms.com> wrote in message news:<7Jtjc.122289$e17.75072@.twister.nyroc.rr.com>...
> "SD" <npspam@.nowhere.net> wrote in message
> news:138249382eb68f5a6766a476adc3da38@.news.teranew s.com...
> > Hi,
> > Quick question, I have about 20 users in my local server and database. We
> > are looking to restore that database to a new server in a new network and
> > still be able to retain the database users.
> > We have created all 20 logins in the new server (exact names) but when we
> > restore the database I do not see the users anymore!
> sp_change_users_login is probably what you need.
>
> > Is there something we can do to preserve them or a script we can run to
> link
> > them again?
> > Thanks a bunch!!!
> > S

You can run the following script to generate a create script for all
of your users. It will generate a create statement for each login
using the encrypted password and SID. Replace "MY_DB" in the script
with your database name, then run the script against your source
database. Copy the output of the script to your destination server and
run it. Then, when you restore your database, your users will
automatically be synched with their logins. Hope this helps!

Lisa

-----
--Description: Scripts logins for one db
--*****IMPORTANT replace MY_DB with the name of the database that
holds the users that you need scripted

-- Begin Script, Create sp_help_revlogin procedure --
USE master
GO
SET NOCOUNT ON
IF OBJECT_ID ('sp_hexadecimal') IS NOT NULL
DROP PROCEDURE sp_hexadecimal
GO
CREATE PROCEDURE sp_hexadecimal
@.binvalue varbinary(256),
@.hexvalue varchar(256) OUTPUT
AS
DECLARE @.charvalue varchar(256)
DECLARE @.i int
DECLARE @.length int
DECLARE @.hexstring char(16)
SELECT @.charvalue = '0x'
SELECT @.i = 1
SELECT @.length = DATALENGTH (@.binvalue)
SELECT @.hexstring = '0123456789ABCDEF'
WHILE (@.i <= @.length)
BEGIN
DECLARE @.tempint int
DECLARE @.firstint int
DECLARE @.secondint int
SELECT @.tempint = CONVERT(int, SUBSTRING(@.binvalue,@.i,1))
SELECT @.firstint = FLOOR(@.tempint/16)
SELECT @.secondint = @.tempint - (@.firstint*16)
SELECT @.charvalue = @.charvalue +
SUBSTRING(@.hexstring, @.firstint+1, 1) +
SUBSTRING(@.hexstring, @.secondint+1, 1)
SELECT @.i = @.i + 1
END
SELECT @.hexvalue = @.charvalue
GO

IF OBJECT_ID ('sp_help_revlogin') IS NOT NULL
DROP PROCEDURE sp_help_revlogin
GO
CREATE PROCEDURE sp_help_MY_DBLogins @.login_name sysname = NULL AS
DECLARE @.name sysname
DECLARE @.xstatus int
DECLARE @.binpwd varbinary (256)
DECLARE @.txtpwd sysname
DECLARE @.tmpstr varchar (256)
DECLARE @.SID_varbinary varbinary(85)
DECLARE @.SID_string varchar(256)

IF (@.login_name IS NULL)
DECLARE login_curs CURSOR FOR

SELECT a.sid, a.name, a.xstatus, a.password FROM
master..sysxlogins a
join MY_DB..sysusers MY_DB on a.sid = MY_DB.sid
WHERE a.srvid IS NULL AND a.name <> 'sa'

ELSE
DECLARE login_curs CURSOR FOR
SELECT a.sid, a.name, a.xstatus, a.password FROM
master..sysxlogins a
join MY_DB..sysusers MY_DB on a.sid = MY_DB.sid
WHERE a.srvid IS NULL AND a.name <> 'sa'

OPEN login_curs
FETCH NEXT FROM login_curs INTO @.SID_varbinary, @.name, @.xstatus,
@.binpwd
IF (@.@.fetch_status = -1)
BEGIN
--PRINT 'No login(s) found.'
CLOSE login_curs
DEALLOCATE login_curs
RETURN -1
END
PRINT ''
PRINT 'DECLARE @.pwd sysname'
WHILE (@.@.fetch_status <> -1)
BEGIN
IF (@.@.fetch_status <> -2)
BEGIN
PRINT ''
IF (@.xstatus & 4) = 4
BEGIN -- NT authenticated account/group
IF (@.xstatus & 1) = 1
BEGIN -- NT login is denied access
SET @.tmpstr = 'EXEC master..sp_denylogin ''' + @.name + ''''
PRINT @.tmpstr
END
ELSE BEGIN -- NT login has access
SET @.tmpstr = 'EXEC master..sp_grantlogin ''' + @.name + ''''
PRINT @.tmpstr
END
END
ELSE BEGIN -- SQL Server authentication
IF (@.binpwd IS NOT NULL)
BEGIN -- Non-null password
EXEC sp_hexadecimal @.binpwd, @.txtpwd OUT
IF (@.xstatus & 2048) = 2048
SET @.tmpstr = 'SET @.pwd = CONVERT (varchar(256), ' + @.txtpwd
+ ')'
ELSE
SET @.tmpstr = 'SET @.pwd = CONVERT (varbinary(256), ' +
@.txtpwd + ')'
PRINT @.tmpstr
EXEC sp_hexadecimal @.SID_varbinary,@.SID_string OUT
SET @.tmpstr = 'EXEC master..sp_addlogin ''' + @.name
+ ''', @.pwd, @.sid = ' + @.SID_string + ', @.encryptopt = '
END
ELSE BEGIN
-- Null password
EXEC sp_hexadecimal @.SID_varbinary,@.SID_string OUT
SET @.tmpstr = 'EXEC master..sp_addlogin ''' + @.name
+ ''', NULL, @.sid = ' + @.SID_string + ', @.encryptopt = '
END
IF (@.xstatus & 2048) = 2048
-- login upgraded from 6.5
SET @.tmpstr = @.tmpstr + '''skip_encryption_old'''
ELSE
SET @.tmpstr = @.tmpstr + '''skip_encryption'''
PRINT @.tmpstr
END
END
FETCH NEXT FROM login_curs INTO @.SID_varbinary, @.name, @.xstatus,
@.binpwd
END
CLOSE login_curs
DEALLOCATE login_curs
RETURN 0
GO
-- End Script --
--
EXEC master..sp_help_MY_DBLogins
--drop proc sp_help_MY_DBLogins

Sunday, March 11, 2012

Can I access sql 2000 from machine having sql2005

Dear All,

I am developing a network application in asp.net. The database is in local machine having sql 2005. But the user database is already existent. So I am accessing that database which is sql2000. does it give any problem while connecting from sql2005 machine to sql2000. If yes it is giving me error as follows:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)

connection string is :

"Data Source=192.168.1.16,1433;Network Library=DBMSSOCN;Initial Catalog=mycatalog;User ID=myuserid;Password=mypwd;"

Please correct me if I am wrong.

Thanks and Regards.

Fazal

This indicates that your TCP/IP was not enabled or your sql server was not listening on the appropriate port.

|||

Go to "Microsoft SQL Server 2005" in programm files => onfiguration Tools =>SQL Server Surface Area Configuration =>first option=>Remote Connections

and here allow remote connection = Use both TCP/IP and name pipes => OK

After that you must restart SQL Server 2005 in order to apply the modification and try againa

Popa IUlia

_____________________

MCP.MCAD.MCSD

Friday, February 24, 2012

Can a virtual server have local Windows users and groups?

Hi,
I have a scenario which works fine on a non-clustered SQL server, and I now
want to implement it on a clustered SQL server.
In a stand-alone, non-clustered environment:
- I have local Windows security groups on the machine; call the groups
MyGroup1, MyGroup2.
- I grant these groups login to the server, and access to the DB, as
follows: (later I add them to DB roles)
declare @.servername sysname
declare @.pos int
set @.servername = serverproperty('MachineName')
set @.pos = charindex(N'\', @.servername, 0)
if @.pos > 0
set @.servername = left(@.servername, @.pos-1)
use master
declare @.loginame sysname
set @.loginame = @.servername + '\MyGroup1'
if (not exists (select name from syslogins where name = @.loginame))
begin
exec sp_grantlogin @.loginame
end
exec sp_defaultdb @.loginame, MyDatabase
I'd like to do something similar on a clustered SQL server. But does a
cluster have a concept of local Windows groups, or must they be domain
groups?
How would I go about setting this up?
Thanks,
John.
I think I can answer this, since a cluster requires a domain account to
run - just make domain groups. Besides creating the local ones would be a
pain, think about failover.
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
"John [412075]" <John_dot_Knox_hyphen_Davies@.wonderware0com> wrote in
message news:OmdbtRLBFHA.3376@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I have a scenario which works fine on a non-clustered SQL server, and I
> now
> want to implement it on a clustered SQL server.
> In a stand-alone, non-clustered environment:
> - I have local Windows security groups on the machine; call the groups
> MyGroup1, MyGroup2.
> - I grant these groups login to the server, and access to the DB, as
> follows: (later I add them to DB roles)
> declare @.servername sysname
> declare @.pos int
> set @.servername = serverproperty('MachineName')
> set @.pos = charindex(N'\', @.servername, 0)
> if @.pos > 0
> set @.servername = left(@.servername, @.pos-1)
> use master
> declare @.loginame sysname
> set @.loginame = @.servername + '\MyGroup1'
> if (not exists (select name from syslogins where name = @.loginame))
> begin
> exec sp_grantlogin @.loginame
> end
> exec sp_defaultdb @.loginame, MyDatabase
>
> I'd like to do something similar on a clustered SQL server. But does a
> cluster have a concept of local Windows groups, or must they be domain
> groups?
> How would I go about setting this up?
> Thanks,
> John.
>

Sunday, February 19, 2012

Can a SQL Server Express talk with other SQL Server Express in the same network?

Hi

There is a service from SQL Server 2005 that "listens" to the network, if the network is down, all data gets saved within the local instance of the SQL server 2005. And when the network becomes available, the local instance of the sql server will automatically "feed" the local records to the central SQL server 2005.

What is that feature called?

It sounds like you're talking about Service Broker, but Service Broker doesn't support communication between two Express instances. Service Broker communication between SQL instances must include a paid edition somewhere in the message chain. I'm not aware of any other tools that support the type of communication you've describe.

Mike

|||

Mike,thanks for the information.

I will look into service broker

Thanks

Tuesday, February 14, 2012

Can 98SE read files from NTFS Drives?

I have been told by a local PC club technician that 98SE cannot read NTFS
drives in a network. Is this true? TIA, Jim.http://groups.google.co.uk/groups?h...news.dfncis.de

Simon|||"Jim Richards" wrote:

> I have been told by a local PC club technician that 98SE cannot read
> NTFS drives in a network. Is this true? TIA, Jim.

In addition to the excellent thread linked to in another message, please
allow me to clarify the situation.

Forgive me if you know all this, but perhaps someone else reading this
thread in the future won't. Also, lest this be seen as OT, I think there
are plenty of people that end up in situations managing SQL Server even
though they've never been trained on things like hardware and OS
operations... So, to make a long story, er, less long:

All (modern) OS's use layers of abstraction. A Windows computer has a
driver to talk to the physical disk drive via the bus it's connected to
(SCSI, ATA/IDE, SATA, etc). A file system driver sits "on top" of that to
organize the disk into a logical view. Without the file system driver, you
have to access the disk by "block": I've seen mainframe programs based
around this and *trust* me, it's ugly :) FAT32, NTFS, ext3, ReiserFS, et al
are file systems that allow you to view a physical disk as directories and
files. Without them, you couldn't load the system library
c:\windows\system32\user32.dll... You'd need to know to read blocks 345-392
to get that DLL (and that's vastly oversimplified).

This often confuses people because Windows allows you to map a drive to a
network share. However, that mapped drive is *not* sending commands
directly to the disk device on the server. The mapped drive is presented by
a driver that talks to the server over a network instead of directly to a
physical drive. Not only is this far better, but it's really the only
option... Can you imagine 100 client computers all trying to physically move
the drive heads around on your server?

Another way to think of it is that network file servers work like SQL
Server: you send a request and you get a response. You don't really care if
the server read your file from a single IDE drive formatted with FAT32, a
7TB RAID 1+0 disk array formatted with NTFS 5, or from a special interface
to thousands of trained orangutans with legal pads (which is how we run our
servers at my company ;).

The problem with Win9x is that there's no NTFS file system driver available
from Microsoft (although it wouldn't surprise me if someone on the Internet
had hacked one together). So Win9x can't talk to a physical drive formatted
with NTFS. But this doesn't matter on the network because the server is in
charge of the NTFS drive.

So, the PC tech is completely wrong. But...

There's a protocol known as iSCSI that allows you send SCSI bus commands
over TCP/IP. It allows you to use a network as the bus to a drive array.
If for some bizarre reason you managed to get a hold of an iSCSI driver for
a Windows 98 computer so that you could access a networked drive array,
you'd need a FAT16 or FAT32 partition on the array since the Win98 computer
would be sending physical commands to the array. But... that's mostly
theoretical: I can't imagine that happening unless your were a masochist,
had tons of cash, and then got drunk and decided to hire some systems
programmers to put together incredibly bizarre systems :)

Craig

Sunday, February 12, 2012

Can (LOCAL) be renamed?

Hi, I am running SQL Server Personal Edition on a Win2k Pro box, and I need
the server name in Enterprise Mgr toi be something other than (LOCAL), which
is default, can I rename it or do I have any option to reinstall it and give
it a name?
Will MSDE do as much if I need a nerwer product?
Thanks in advance!
Hello,
No need to re install. Go to query analyzer and execute SELECT @.@.SERVERNAME.
After that go to
enter prise manager and right click above local and unregister. After that
right click above the server and choose register and
in server name give the server name based on the out put of @.@.Servername.
Incase if the @.@.servername returns empty or NULL then use SP_ADDSERVER
'Servername','Local' to add a server.
After this you need to stop and start the sql server service.
Thanks
Hari
"totoro" <totoro@.discussions.microsoft.com> wrote in message
news:C6BF6C29-0460-48E0-80B5-E3E128EFF17D@.microsoft.com...
> Hi, I am running SQL Server Personal Edition on a Win2k Pro box, and I
> need
> the server name in Enterprise Mgr toi be something other than (LOCAL),
> which
> is default, can I rename it or do I have any option to reinstall it and
> give
> it a name?
> Will MSDE do as much if I need a nerwer product?
> Thanks in advance!