Hello:
Is there a single, undocumented function in SQL Server 2000 or 2005 that
returns the first letter of each word in a sentence or group of words as
upper case and the remaining letters in lower case? We can do this with
custom programming using a combination of string functions but for our
purposes using string functions in combination is too slow with the huge dat
a
sets we deal with.
For Example:
We may receive a name in the following format: mr. john r. doe jr. within a
CSV file. Has Microsoft developed a new string function that will produce
Mr. John R. Doe Jr. by simply feeding the string "mr. john r. doe jr.” to
the
function?No, there is not an undocumented function that does this (or a documented
one for that matter).
Perhaps you should build your function using SQLCLR rather than T-SQL.
SQLCLR tends to outperform T-SQL quite a bit when it comes to string
manipulation.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Chandler Miller" <Chandler Miller@.discussions.microsoft.com> wrote in
message news:72DD96C2-0AFB-4AD2-AF7A-A3B5F6023C2E@.microsoft.com...
> Hello:
> Is there a single, undocumented function in SQL Server 2000 or 2005 that
> returns the first letter of each word in a sentence or group of words as
> upper case and the remaining letters in lower case? We can do this with
> custom programming using a combination of string functions but for our
> purposes using string functions in combination is too slow with the huge
> data
> sets we deal with.
> For Example:
> We may receive a name in the following format: mr. john r. doe jr. within
> a
> CSV file. Has Microsoft developed a new string function that will produce
> Mr. John R. Doe Jr. by simply feeding the string "mr. john r. doe jr." to
> the
> function?
>
>|||A function if there is one, which I highly doubt, would run through the same
steps you probalby are doing already. Can you split the data first, then
upper(data), then combine again ?
or better yet use dts package to import with query (steps of upper, trim,
etc.).
dts packs fly on large datasets.
"Chandler Miller" wrote:
> Hello:
> Is there a single, undocumented function in SQL Server 2000 or 2005 that
> returns the first letter of each word in a sentence or group of words as
> upper case and the remaining letters in lower case? We can do this with
> custom programming using a combination of string functions but for our
> purposes using string functions in combination is too slow with the huge d
ata
> sets we deal with.
> For Example:
> We may receive a name in the following format: mr. john r. doe jr. within
a
> CSV file. Has Microsoft developed a new string function that will produce
> Mr. John R. Doe Jr. by simply feeding the string "mr. john r. doe jr.” t
o the
> function?
>
>|||You could try the function here, though it wasn't produced by Microsoft:
http://www.aspfaq.com/2299
"Chandler Miller" <Chandler Miller@.discussions.microsoft.com> wrote in
message news:72DD96C2-0AFB-4AD2-AF7A-A3B5F6023C2E@.microsoft.com...
> Hello:
> Is there a single, undocumented function in SQL Server 2000 or 2005 that
> returns the first letter of each word in a sentence or group of words as
> upper case and the remaining letters in lower case? We can do this with
> custom programming using a combination of string functions but for our
> purposes using string functions in combination is too slow with the huge
> data
> sets we deal with.
> For Example:
> We may receive a name in the following format: mr. john r. doe jr. within
> a
> CSV file. Has Microsoft developed a new string function that will produce
> Mr. John R. Doe Jr. by simply feeding the string "mr. john r. doe jr.”
> to the
> function?
>
>
Showing posts with label single. Show all posts
Showing posts with label single. Show all posts
Friday, March 30, 2012
Wednesday, March 21, 2012
Is the re-start done?
Hi,
I was trying to restore a master database. This is what I did:
1. rebuild the master database and it was successful
2. restart server in single mode with
sqlservr.exe -c -m
and I got the following window:
************************************************** ********
2006-01-27 10:30:01.49 server Microsoft SQL Server 2000 - 8.00.2039 (Intel X
86)
May 3 2005 23:18:38
Copyright (c) 1988-2003 Microsoft Corporation
Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
2006-01-27 10:30:01.52 server Copyright (C) 1988-2002 Microsoft Corporation.
2006-01-27 10:30:01.52 server All rights reserved.
2006-01-27 10:30:01.52 server Server Process ID is 600.
2006-01-27 10:30:01.52 server Logging SQL Server messages in file 'e:\Microso
ft SQL Server\MSSQL\log\ERRORLOG'.
2006-01-27 10:30:01.54 server SQL Server is starting at priority class 'norma
l'(4 CPUs detected).
2006-01-27 10:30:01.71 server SQL Server configured for thread mode processin
g.
2006-01-27 10:30:01.74 server Using dynamic lock allocation. [2500] Lock Bloc
ks, [5000] Lock Owner Blocks.
2006-01-27 10:30:01.99 server Attempting to initialize Distributed Transactio
n Coordinator.
2006-01-27 10:30:04.04 spid3 Warning ******************
2006-01-27 10:30:04.04 spid3 SQL Server started in single user mode. Updates
allowed to system catalogs.
2006-01-27 10:30:04.04 spid3 Starting up database 'master'.
2006-01-27 10:30:04.29 server Using 'SSNETLIB.DLL' version '8.0.2039'.
2006-01-27 10:30:04.29 spid5 Starting up database 'model'.
2006-01-27 10:30:04.29 spid3 Server name is 'SQLTEST1'.
2006-01-27 10:30:04.31 spid7 Starting up database 'msdb'.
2006-01-27 10:30:04.31 spid8 Starting up database 'pubs'.
2006-01-27 10:30:04.31 spid9 Starting up database 'Northwind'.
2006-01-27 10:30:04.31 server SQL server listening on 10.10.4.17: 1433.
2006-01-27 10:30:04.33 server SQL server listening on 127.0.0.1: 1433.
2006-01-27 10:30:04.34 server SQL server listening on TCP, Shared Memory, Nam
ed Pipes.
2006-01-27 10:30:04.36 server SQL Server is ready for client connections
2006-01-27 10:30:04.67 spid5 Clearing tempdb database.
2006-01-27 10:30:05.54 spid5 Starting up database 'tempdb'.
2006-01-27 10:30:05.70 spid3 Recovery complete.
2006-01-27 10:30:05.70 spid3 SQL global counter collection task is created.
************************************************** **
Now an hour passed and the window is still there. The SSQL service manager on the toolbars still has a red icon but not green. My questions are how do I know the process is done? What is the next step after SQL global counter collection task? Where can I find more information?
Thanks a lot.
MarkMy recollection is from a desperate incident that occurred to me more than seven years ago when I had to restart a failed SQL Server instance. As I recall, when you run it from the command window like you've done, it stays in the state "forever". It is in essence, the SQL instance running (just on the console instead of as a service).
It's been a loooong time since I recovered a master database (note to self, something to practice soon). What I recall doing from before is getting it all started and then shutting the service down and then restarting again in "normal" mode.
Like I said, it's been a while.
Regards,
hmscott|||Once you see "Recovery Complete", you should be able to open a Query Analyzer or OSQL session with the server, in order to restore the master database. You are essentially looking at the errorlog in the command window, so the next entry will be the next error, warning, or information message that SQL Server sees fit to put in the errorlog.
Not sure what other information you would be after in this case. You can see if sqlservr is running in task manager, but you already know it is running at the command line.|||Thanks all. I understand now.|||I managed to restore the master database on a different server but I cannot modify the jobs I created before on the new server because the server name gets changed.
Should I change the server name in the master and msdb databases? Will sp_dropserver old_server_name and sp_addserver new_server_name work?
Thanks a lot.|||I managed to restore the master database on a different server but I cannot modify the jobs I created before on the new server because the server name gets changed.
Should I change the server name in the master and msdb databases? Will sp_dropserver old_server_name and sp_addserver new_server_name work?
Thanks a lot.
I had a similar problem once before. Be sure to run sp_dropserver and sp_addserver. However, I think I ultimately had to go into the msdb database and open the sysjobs table and manually edit the "originating server" field to the new server name.
If I recall correctly, that did the trick.
Regards,
hmscott|||I ended up using update sysjobs table like this:
update sysjobs set originating_server = new_server
and the jobs are working now.
I also notice that several other system tables have the old server name, should I change them as well?
Thanks.|||Not if they cause no problems. This is what is can be referred to as "poking the bear" in the SQL Server world.
The master database is never too happy about being restored to a server of a different name. It can be done, but it should be avoided for these sorts of reasons. Is this for a hardware upgrade?|||No, I am practising the database disaster recovery. The master database recovery is one Scenario.
I was trying to restore a master database. This is what I did:
1. rebuild the master database and it was successful
2. restart server in single mode with
sqlservr.exe -c -m
and I got the following window:
************************************************** ********
2006-01-27 10:30:01.49 server Microsoft SQL Server 2000 - 8.00.2039 (Intel X
86)
May 3 2005 23:18:38
Copyright (c) 1988-2003 Microsoft Corporation
Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
2006-01-27 10:30:01.52 server Copyright (C) 1988-2002 Microsoft Corporation.
2006-01-27 10:30:01.52 server All rights reserved.
2006-01-27 10:30:01.52 server Server Process ID is 600.
2006-01-27 10:30:01.52 server Logging SQL Server messages in file 'e:\Microso
ft SQL Server\MSSQL\log\ERRORLOG'.
2006-01-27 10:30:01.54 server SQL Server is starting at priority class 'norma
l'(4 CPUs detected).
2006-01-27 10:30:01.71 server SQL Server configured for thread mode processin
g.
2006-01-27 10:30:01.74 server Using dynamic lock allocation. [2500] Lock Bloc
ks, [5000] Lock Owner Blocks.
2006-01-27 10:30:01.99 server Attempting to initialize Distributed Transactio
n Coordinator.
2006-01-27 10:30:04.04 spid3 Warning ******************
2006-01-27 10:30:04.04 spid3 SQL Server started in single user mode. Updates
allowed to system catalogs.
2006-01-27 10:30:04.04 spid3 Starting up database 'master'.
2006-01-27 10:30:04.29 server Using 'SSNETLIB.DLL' version '8.0.2039'.
2006-01-27 10:30:04.29 spid5 Starting up database 'model'.
2006-01-27 10:30:04.29 spid3 Server name is 'SQLTEST1'.
2006-01-27 10:30:04.31 spid7 Starting up database 'msdb'.
2006-01-27 10:30:04.31 spid8 Starting up database 'pubs'.
2006-01-27 10:30:04.31 spid9 Starting up database 'Northwind'.
2006-01-27 10:30:04.31 server SQL server listening on 10.10.4.17: 1433.
2006-01-27 10:30:04.33 server SQL server listening on 127.0.0.1: 1433.
2006-01-27 10:30:04.34 server SQL server listening on TCP, Shared Memory, Nam
ed Pipes.
2006-01-27 10:30:04.36 server SQL Server is ready for client connections
2006-01-27 10:30:04.67 spid5 Clearing tempdb database.
2006-01-27 10:30:05.54 spid5 Starting up database 'tempdb'.
2006-01-27 10:30:05.70 spid3 Recovery complete.
2006-01-27 10:30:05.70 spid3 SQL global counter collection task is created.
************************************************** **
Now an hour passed and the window is still there. The SSQL service manager on the toolbars still has a red icon but not green. My questions are how do I know the process is done? What is the next step after SQL global counter collection task? Where can I find more information?
Thanks a lot.
MarkMy recollection is from a desperate incident that occurred to me more than seven years ago when I had to restart a failed SQL Server instance. As I recall, when you run it from the command window like you've done, it stays in the state "forever". It is in essence, the SQL instance running (just on the console instead of as a service).
It's been a loooong time since I recovered a master database (note to self, something to practice soon). What I recall doing from before is getting it all started and then shutting the service down and then restarting again in "normal" mode.
Like I said, it's been a while.
Regards,
hmscott|||Once you see "Recovery Complete", you should be able to open a Query Analyzer or OSQL session with the server, in order to restore the master database. You are essentially looking at the errorlog in the command window, so the next entry will be the next error, warning, or information message that SQL Server sees fit to put in the errorlog.
Not sure what other information you would be after in this case. You can see if sqlservr is running in task manager, but you already know it is running at the command line.|||Thanks all. I understand now.|||I managed to restore the master database on a different server but I cannot modify the jobs I created before on the new server because the server name gets changed.
Should I change the server name in the master and msdb databases? Will sp_dropserver old_server_name and sp_addserver new_server_name work?
Thanks a lot.|||I managed to restore the master database on a different server but I cannot modify the jobs I created before on the new server because the server name gets changed.
Should I change the server name in the master and msdb databases? Will sp_dropserver old_server_name and sp_addserver new_server_name work?
Thanks a lot.
I had a similar problem once before. Be sure to run sp_dropserver and sp_addserver. However, I think I ultimately had to go into the msdb database and open the sysjobs table and manually edit the "originating server" field to the new server name.
If I recall correctly, that did the trick.
Regards,
hmscott|||I ended up using update sysjobs table like this:
update sysjobs set originating_server = new_server
and the jobs are working now.
I also notice that several other system tables have the old server name, should I change them as well?
Thanks.|||Not if they cause no problems. This is what is can be referred to as "poking the bear" in the SQL Server world.
The master database is never too happy about being restored to a server of a different name. It can be done, but it should be avoided for these sorts of reasons. Is this for a hardware upgrade?|||No, I am practising the database disaster recovery. The master database recovery is one Scenario.
Monday, March 19, 2012
Is SqlTransaction overhead ?
hi,
Is it over head to use SqlTransaction(begin, commit, rollback) for a single transaction.
am not using application block or enterprise library.
only a single insert statement.
Yes, SQL Transactions are an overhead to SQL Server whether you are writing a single query or a batch of queries, but on the other side you are rest assured that in case of any errors you can always rollback the transaction and on successful execution only you will commit transaction.
Have a look at Trasactions in SQL BOL.
Hope this will help.
hi
i dont think that using the sqlTransaction causes any overhead ...
regards,
Labels:
application,
block,
commit,
database,
enterprise,
head,
library,
microsoft,
mysql,
oracle,
overhead,
rollback,
server,
single,
sql,
sqltransaction,
transaction
Friday, March 9, 2012
Is SQL Express 2005 by default a single connection db?
Is SQL Express 2005 by default a single connection db?
Background:
I wrote a simple .bat file which executes the following sqlcmd call:
"sqlcmd -S BLUEBOX\SQLEXPRESS -d C:\App_Data\ASPNETDB.MDF -U
MyUserCount -P MyUserPassword -Q "Exec SendMessage" -o C:\Vocalico
\SendMailQuePump\Undelievered.txt"
the above command works fine, as long as no other application is
accessing the db.
Also, using VS2005 I wrote a simple web based calendar scheduling
application which I am testing by launching it via Visual Studio 2005
(using the built in ASP.Net Development Server), the web application
seems to work correctly as well.
The Problem Found:
When I run the VS2005 web application the sqlcmd fails to login (note
that the web application and the sqlcmd access the same db (C:\App_Data
\ASPNETDB.MDF)). The following is the error I get form SQL 2005
Express when running the sqlcmd while the web application is running:
Msg 5120, Level 16, State 101, Server BLUEBOX\SQLEXPRESS, Line 1
Unable to open the physical file "C:\App_Data\aspnetdb.mdf". Operating
system error 32: "32(The process cannot access the file because it is
being used by another process.)".
Msg 5120, Level 16, State 101, Server BLUEBOX\SQLEXPRESS, Line 1
Unable to open the physical file "C:\App_Data\aspnetdb_log.ldf".
Operating system error 32: "32(The process cannot access the file
because it is being used by another process.)".
File activation failure. The physical file name "C:\App_Data
\aspnetdb_log.ldf" may be incorrect.
Msg 4060, Level 11, State 1, Server BLUEBOX\SQLEXPRESS, Line 1
Cannot open database "C:\App_Data\ASPNETDB.MDF" requested by the
login. The login failed.
Msg 18456, Level 14, State 1, Server BLUEBOX\SQLEXPRESS, Line 1
Login failed for user 'MyUserCount'.
Questions:
Shouldn't SQL 2005 Express allow more than one user to connect and
authenticate to the db by default? Are there any settings I need to
modify in Visual Studio 2005 or SQL Express 2005 in order to allow my
web app and the sqlcmd command to co-exist and execute without
interfering with each other?
My Setup:
VS 2005
XP Professional SP2
SQL 2005 Express
web.config connection string looks like this:
<add name="ASPNETDBConnectionString" connectionString="Data Source=.
\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated
Security=SSPI;User Instance=True" providerName="System.Data.SqlClient"/
>
I have been going around in circles on this issue, any help would be
greatly appreciated!
Sincerely,
-ralphI think there might be some confusion to what the database concept is. For the "real" SQL server, we
create the database and to use it, se specify the database name in the USE command, or the database
name in the connection string or for the -d option for sqlcmd. But you use the physical name of the
mdf file in your sqlcmd call.
My guess is that sqlcmd does either some form of special attach (read about sp_attach_db for the
concept of attach) and it becomes in some form of single user mode. Or that sqlcmd even handles the
instance as a user-instance (a concept only available for Express, which I haven't played with but
which you should be able to find some info if you Google).
So, what I would do is to attach the database (sp_attach_db) and then specify the database name (not
file name) in sqlcmd and your connection string.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"RGF" <Raf.Figueroa@.gmail.com> wrote in message
news:dcdeef9a-382d-47dd-9829-b491eb48df6a@.e4g2000hsg.googlegroups.com...
> Is SQL Express 2005 by default a single connection db?
> Background:
> I wrote a simple .bat file which executes the following sqlcmd call:
> "sqlcmd -S BLUEBOX\SQLEXPRESS -d C:\App_Data\ASPNETDB.MDF -U
> MyUserCount -P MyUserPassword -Q "Exec SendMessage" -o C:\Vocalico
> \SendMailQuePump\Undelievered.txt"
> the above command works fine, as long as no other application is
> accessing the db.
> Also, using VS2005 I wrote a simple web based calendar scheduling
> application which I am testing by launching it via Visual Studio 2005
> (using the built in ASP.Net Development Server), the web application
> seems to work correctly as well.
> The Problem Found:
> When I run the VS2005 web application the sqlcmd fails to login (note
> that the web application and the sqlcmd access the same db (C:\App_Data
> \ASPNETDB.MDF)). The following is the error I get form SQL 2005
> Express when running the sqlcmd while the web application is running:
> Msg 5120, Level 16, State 101, Server BLUEBOX\SQLEXPRESS, Line 1
> Unable to open the physical file "C:\App_Data\aspnetdb.mdf". Operating
> system error 32: "32(The process cannot access the file because it is
> being used by another process.)".
> Msg 5120, Level 16, State 101, Server BLUEBOX\SQLEXPRESS, Line 1
> Unable to open the physical file "C:\App_Data\aspnetdb_log.ldf".
> Operating system error 32: "32(The process cannot access the file
> because it is being used by another process.)".
> File activation failure. The physical file name "C:\App_Data
> \aspnetdb_log.ldf" may be incorrect.
> Msg 4060, Level 11, State 1, Server BLUEBOX\SQLEXPRESS, Line 1
> Cannot open database "C:\App_Data\ASPNETDB.MDF" requested by the
> login. The login failed.
> Msg 18456, Level 14, State 1, Server BLUEBOX\SQLEXPRESS, Line 1
> Login failed for user 'MyUserCount'.
> Questions:
> Shouldn't SQL 2005 Express allow more than one user to connect and
> authenticate to the db by default? Are there any settings I need to
> modify in Visual Studio 2005 or SQL Express 2005 in order to allow my
> web app and the sqlcmd command to co-exist and execute without
> interfering with each other?
> My Setup:
> VS 2005
> XP Professional SP2
> SQL 2005 Express
> web.config connection string looks like this:
> <add name="ASPNETDBConnectionString" connectionString="Data Source=.
> \SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated
> Security=SSPI;User Instance=True" providerName="System.Data.SqlClient"/
> I have been going around in circles on this issue, any help would be
> greatly appreciated!
> Sincerely,
> -ralph
>
>
>
Background:
I wrote a simple .bat file which executes the following sqlcmd call:
"sqlcmd -S BLUEBOX\SQLEXPRESS -d C:\App_Data\ASPNETDB.MDF -U
MyUserCount -P MyUserPassword -Q "Exec SendMessage" -o C:\Vocalico
\SendMailQuePump\Undelievered.txt"
the above command works fine, as long as no other application is
accessing the db.
Also, using VS2005 I wrote a simple web based calendar scheduling
application which I am testing by launching it via Visual Studio 2005
(using the built in ASP.Net Development Server), the web application
seems to work correctly as well.
The Problem Found:
When I run the VS2005 web application the sqlcmd fails to login (note
that the web application and the sqlcmd access the same db (C:\App_Data
\ASPNETDB.MDF)). The following is the error I get form SQL 2005
Express when running the sqlcmd while the web application is running:
Msg 5120, Level 16, State 101, Server BLUEBOX\SQLEXPRESS, Line 1
Unable to open the physical file "C:\App_Data\aspnetdb.mdf". Operating
system error 32: "32(The process cannot access the file because it is
being used by another process.)".
Msg 5120, Level 16, State 101, Server BLUEBOX\SQLEXPRESS, Line 1
Unable to open the physical file "C:\App_Data\aspnetdb_log.ldf".
Operating system error 32: "32(The process cannot access the file
because it is being used by another process.)".
File activation failure. The physical file name "C:\App_Data
\aspnetdb_log.ldf" may be incorrect.
Msg 4060, Level 11, State 1, Server BLUEBOX\SQLEXPRESS, Line 1
Cannot open database "C:\App_Data\ASPNETDB.MDF" requested by the
login. The login failed.
Msg 18456, Level 14, State 1, Server BLUEBOX\SQLEXPRESS, Line 1
Login failed for user 'MyUserCount'.
Questions:
Shouldn't SQL 2005 Express allow more than one user to connect and
authenticate to the db by default? Are there any settings I need to
modify in Visual Studio 2005 or SQL Express 2005 in order to allow my
web app and the sqlcmd command to co-exist and execute without
interfering with each other?
My Setup:
VS 2005
XP Professional SP2
SQL 2005 Express
web.config connection string looks like this:
<add name="ASPNETDBConnectionString" connectionString="Data Source=.
\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated
Security=SSPI;User Instance=True" providerName="System.Data.SqlClient"/
>
I have been going around in circles on this issue, any help would be
greatly appreciated!
Sincerely,
-ralphI think there might be some confusion to what the database concept is. For the "real" SQL server, we
create the database and to use it, se specify the database name in the USE command, or the database
name in the connection string or for the -d option for sqlcmd. But you use the physical name of the
mdf file in your sqlcmd call.
My guess is that sqlcmd does either some form of special attach (read about sp_attach_db for the
concept of attach) and it becomes in some form of single user mode. Or that sqlcmd even handles the
instance as a user-instance (a concept only available for Express, which I haven't played with but
which you should be able to find some info if you Google).
So, what I would do is to attach the database (sp_attach_db) and then specify the database name (not
file name) in sqlcmd and your connection string.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"RGF" <Raf.Figueroa@.gmail.com> wrote in message
news:dcdeef9a-382d-47dd-9829-b491eb48df6a@.e4g2000hsg.googlegroups.com...
> Is SQL Express 2005 by default a single connection db?
> Background:
> I wrote a simple .bat file which executes the following sqlcmd call:
> "sqlcmd -S BLUEBOX\SQLEXPRESS -d C:\App_Data\ASPNETDB.MDF -U
> MyUserCount -P MyUserPassword -Q "Exec SendMessage" -o C:\Vocalico
> \SendMailQuePump\Undelievered.txt"
> the above command works fine, as long as no other application is
> accessing the db.
> Also, using VS2005 I wrote a simple web based calendar scheduling
> application which I am testing by launching it via Visual Studio 2005
> (using the built in ASP.Net Development Server), the web application
> seems to work correctly as well.
> The Problem Found:
> When I run the VS2005 web application the sqlcmd fails to login (note
> that the web application and the sqlcmd access the same db (C:\App_Data
> \ASPNETDB.MDF)). The following is the error I get form SQL 2005
> Express when running the sqlcmd while the web application is running:
> Msg 5120, Level 16, State 101, Server BLUEBOX\SQLEXPRESS, Line 1
> Unable to open the physical file "C:\App_Data\aspnetdb.mdf". Operating
> system error 32: "32(The process cannot access the file because it is
> being used by another process.)".
> Msg 5120, Level 16, State 101, Server BLUEBOX\SQLEXPRESS, Line 1
> Unable to open the physical file "C:\App_Data\aspnetdb_log.ldf".
> Operating system error 32: "32(The process cannot access the file
> because it is being used by another process.)".
> File activation failure. The physical file name "C:\App_Data
> \aspnetdb_log.ldf" may be incorrect.
> Msg 4060, Level 11, State 1, Server BLUEBOX\SQLEXPRESS, Line 1
> Cannot open database "C:\App_Data\ASPNETDB.MDF" requested by the
> login. The login failed.
> Msg 18456, Level 14, State 1, Server BLUEBOX\SQLEXPRESS, Line 1
> Login failed for user 'MyUserCount'.
> Questions:
> Shouldn't SQL 2005 Express allow more than one user to connect and
> authenticate to the db by default? Are there any settings I need to
> modify in Visual Studio 2005 or SQL Express 2005 in order to allow my
> web app and the sqlcmd command to co-exist and execute without
> interfering with each other?
> My Setup:
> VS 2005
> XP Professional SP2
> SQL 2005 Express
> web.config connection string looks like this:
> <add name="ASPNETDBConnectionString" connectionString="Data Source=.
> \SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated
> Security=SSPI;User Instance=True" providerName="System.Data.SqlClient"/
> I have been going around in circles on this issue, any help would be
> greatly appreciated!
> Sincerely,
> -ralph
>
>
>
Is SQL Express 2005 by default a single connection db?
Is SQL Express 2005 by default a single connection db?
Background:
I wrote a simple .bat file which executes the following sqlcmd call:
"sqlcmd -S BLUEBOX\SQLEXPRESS -d C:\App_Data\ASPNETDB.MDF -U
MyUserCount -P MyUserPassword -Q "Exec SendMessage" -o C:\Vocalico
\SendMailQuePump\Undelievered.txt"
the above command works fine, as long as no other application is
accessing the db.
Also, using VS2005 I wrote a simple web based calendar scheduling
application which I am testing by launching it via Visual Studio 2005
(using the built in ASP.Net Development Server), the web application
seems to work correctly as well.
The Problem Found:
When I run the VS2005 web application the sqlcmd fails to login (note
that the web application and the sqlcmd access the same db (C:\App_Data
\ASPNETDB.MDF)). The following is the error I get form SQL 2005
Express when running the sqlcmd while the web application is running:
Msg 5120, Level 16, State 101, Server BLUEBOX\SQLEXPRESS, Line 1
Unable to open the physical file "C:\App_Data\aspnetdb.mdf". Operating
system error 32: "32(The process cannot access the file because it is
being used by another process.)".
Msg 5120, Level 16, State 101, Server BLUEBOX\SQLEXPRESS, Line 1
Unable to open the physical file "C:\App_Data\aspnetdb_log.ldf".
Operating system error 32: "32(The process cannot access the file
because it is being used by another process.)".
File activation failure. The physical file name "C:\App_Data
\aspnetdb_log.ldf" may be incorrect.
Msg 4060, Level 11, State 1, Server BLUEBOX\SQLEXPRESS, Line 1
Cannot open database "C:\App_Data\ASPNETDB.MDF" requested by the
login. The login failed.
Msg 18456, Level 14, State 1, Server BLUEBOX\SQLEXPRESS, Line 1
Login failed for user 'MyUserCount'.
Questions:
Shouldn't SQL 2005 Express allow more than one user to connect and
authenticate to the db by default? Are there any settings I need to
modify in Visual Studio 2005 or SQL Express 2005 in order to allow my
web app and the sqlcmd command to co-exist and execute without
interfering with each other?
My Setup:
VS 2005
XP Professional SP2
SQL 2005 Express
web.config connection string looks like this:
<add name="ASPNETDBConnectionString" connectionString="Data Source=.
\SQLEXPRESS;AttachDbFilename=|DataDirect
ory|\ASPNETDB.MDF;Integrated
Security=SSPI;User Instance=True" providerName="System.Data.SqlClient"/
>
I have been going around in circles on this issue, any help would be
greatly appreciated!
Sincerely,
-ralphI think there might be some confusion to what the database concept is. For t
he "real" SQL server, we
create the database and to use it, se specify the database name in the USE c
ommand, or the database
name in the connection string or for the -d option for sqlcmd. But you use t
he physical name of the
mdf file in your sqlcmd call.
My guess is that sqlcmd does either some form of special attach (read about
sp_attach_db for the
concept of attach) and it becomes in some form of single user mode. Or that
sqlcmd even handles the
instance as a user-instance (a concept only available for Express, which I h
aven't played with but
which you should be able to find some info if you Google).
So, what I would do is to attach the database (sp_attach_db) and then specif
y the database name (not
file name) in sqlcmd and your connection string.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"RGF" <Raf.Figueroa@.gmail.com> wrote in message
news:dcdeef9a-382d-47dd-9829-b491eb48df6a@.e4g2000hsg.googlegroups.com...
> Is SQL Express 2005 by default a single connection db?
> Background:
> I wrote a simple .bat file which executes the following sqlcmd call:
> "sqlcmd -S BLUEBOX\SQLEXPRESS -d C:\App_Data\ASPNETDB.MDF -U
> MyUserCount -P MyUserPassword -Q "Exec SendMessage" -o C:\Vocalico
> \SendMailQuePump\Undelievered.txt"
> the above command works fine, as long as no other application is
> accessing the db.
> Also, using VS2005 I wrote a simple web based calendar scheduling
> application which I am testing by launching it via Visual Studio 2005
> (using the built in ASP.Net Development Server), the web application
> seems to work correctly as well.
> The Problem Found:
> When I run the VS2005 web application the sqlcmd fails to login (note
> that the web application and the sqlcmd access the same db (C:\App_Data
> \ASPNETDB.MDF)). The following is the error I get form SQL 2005
> Express when running the sqlcmd while the web application is running:
> Msg 5120, Level 16, State 101, Server BLUEBOX\SQLEXPRESS, Line 1
> Unable to open the physical file "C:\App_Data\aspnetdb.mdf". Operating
> system error 32: "32(The process cannot access the file because it is
> being used by another process.)".
> Msg 5120, Level 16, State 101, Server BLUEBOX\SQLEXPRESS, Line 1
> Unable to open the physical file "C:\App_Data\aspnetdb_log.ldf".
> Operating system error 32: "32(The process cannot access the file
> because it is being used by another process.)".
> File activation failure. The physical file name "C:\App_Data
> \aspnetdb_log.ldf" may be incorrect.
> Msg 4060, Level 11, State 1, Server BLUEBOX\SQLEXPRESS, Line 1
> Cannot open database "C:\App_Data\ASPNETDB.MDF" requested by the
> login. The login failed.
> Msg 18456, Level 14, State 1, Server BLUEBOX\SQLEXPRESS, Line 1
> Login failed for user 'MyUserCount'.
> Questions:
> Shouldn't SQL 2005 Express allow more than one user to connect and
> authenticate to the db by default? Are there any settings I need to
> modify in Visual Studio 2005 or SQL Express 2005 in order to allow my
> web app and the sqlcmd command to co-exist and execute without
> interfering with each other?
> My Setup:
> VS 2005
> XP Professional SP2
> SQL 2005 Express
> web.config connection string looks like this:
> <add name="ASPNETDBConnectionString" connectionString="Data Source=.
> \SQLEXPRESS;AttachDbFilename=|DataDirect
ory|\ASPNETDB.MDF;Integrated
> Security=SSPI;User Instance=True" providerName="System.Data.SqlClient"/
> I have been going around in circles on this issue, any help would be
> greatly appreciated!
> Sincerely,
> -ralph
>
>
>
Background:
I wrote a simple .bat file which executes the following sqlcmd call:
"sqlcmd -S BLUEBOX\SQLEXPRESS -d C:\App_Data\ASPNETDB.MDF -U
MyUserCount -P MyUserPassword -Q "Exec SendMessage" -o C:\Vocalico
\SendMailQuePump\Undelievered.txt"
the above command works fine, as long as no other application is
accessing the db.
Also, using VS2005 I wrote a simple web based calendar scheduling
application which I am testing by launching it via Visual Studio 2005
(using the built in ASP.Net Development Server), the web application
seems to work correctly as well.
The Problem Found:
When I run the VS2005 web application the sqlcmd fails to login (note
that the web application and the sqlcmd access the same db (C:\App_Data
\ASPNETDB.MDF)). The following is the error I get form SQL 2005
Express when running the sqlcmd while the web application is running:
Msg 5120, Level 16, State 101, Server BLUEBOX\SQLEXPRESS, Line 1
Unable to open the physical file "C:\App_Data\aspnetdb.mdf". Operating
system error 32: "32(The process cannot access the file because it is
being used by another process.)".
Msg 5120, Level 16, State 101, Server BLUEBOX\SQLEXPRESS, Line 1
Unable to open the physical file "C:\App_Data\aspnetdb_log.ldf".
Operating system error 32: "32(The process cannot access the file
because it is being used by another process.)".
File activation failure. The physical file name "C:\App_Data
\aspnetdb_log.ldf" may be incorrect.
Msg 4060, Level 11, State 1, Server BLUEBOX\SQLEXPRESS, Line 1
Cannot open database "C:\App_Data\ASPNETDB.MDF" requested by the
login. The login failed.
Msg 18456, Level 14, State 1, Server BLUEBOX\SQLEXPRESS, Line 1
Login failed for user 'MyUserCount'.
Questions:
Shouldn't SQL 2005 Express allow more than one user to connect and
authenticate to the db by default? Are there any settings I need to
modify in Visual Studio 2005 or SQL Express 2005 in order to allow my
web app and the sqlcmd command to co-exist and execute without
interfering with each other?
My Setup:
VS 2005
XP Professional SP2
SQL 2005 Express
web.config connection string looks like this:
<add name="ASPNETDBConnectionString" connectionString="Data Source=.
\SQLEXPRESS;AttachDbFilename=|DataDirect
ory|\ASPNETDB.MDF;Integrated
Security=SSPI;User Instance=True" providerName="System.Data.SqlClient"/
>
I have been going around in circles on this issue, any help would be
greatly appreciated!
Sincerely,
-ralphI think there might be some confusion to what the database concept is. For t
he "real" SQL server, we
create the database and to use it, se specify the database name in the USE c
ommand, or the database
name in the connection string or for the -d option for sqlcmd. But you use t
he physical name of the
mdf file in your sqlcmd call.
My guess is that sqlcmd does either some form of special attach (read about
sp_attach_db for the
concept of attach) and it becomes in some form of single user mode. Or that
sqlcmd even handles the
instance as a user-instance (a concept only available for Express, which I h
aven't played with but
which you should be able to find some info if you Google).
So, what I would do is to attach the database (sp_attach_db) and then specif
y the database name (not
file name) in sqlcmd and your connection string.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"RGF" <Raf.Figueroa@.gmail.com> wrote in message
news:dcdeef9a-382d-47dd-9829-b491eb48df6a@.e4g2000hsg.googlegroups.com...
> Is SQL Express 2005 by default a single connection db?
> Background:
> I wrote a simple .bat file which executes the following sqlcmd call:
> "sqlcmd -S BLUEBOX\SQLEXPRESS -d C:\App_Data\ASPNETDB.MDF -U
> MyUserCount -P MyUserPassword -Q "Exec SendMessage" -o C:\Vocalico
> \SendMailQuePump\Undelievered.txt"
> the above command works fine, as long as no other application is
> accessing the db.
> Also, using VS2005 I wrote a simple web based calendar scheduling
> application which I am testing by launching it via Visual Studio 2005
> (using the built in ASP.Net Development Server), the web application
> seems to work correctly as well.
> The Problem Found:
> When I run the VS2005 web application the sqlcmd fails to login (note
> that the web application and the sqlcmd access the same db (C:\App_Data
> \ASPNETDB.MDF)). The following is the error I get form SQL 2005
> Express when running the sqlcmd while the web application is running:
> Msg 5120, Level 16, State 101, Server BLUEBOX\SQLEXPRESS, Line 1
> Unable to open the physical file "C:\App_Data\aspnetdb.mdf". Operating
> system error 32: "32(The process cannot access the file because it is
> being used by another process.)".
> Msg 5120, Level 16, State 101, Server BLUEBOX\SQLEXPRESS, Line 1
> Unable to open the physical file "C:\App_Data\aspnetdb_log.ldf".
> Operating system error 32: "32(The process cannot access the file
> because it is being used by another process.)".
> File activation failure. The physical file name "C:\App_Data
> \aspnetdb_log.ldf" may be incorrect.
> Msg 4060, Level 11, State 1, Server BLUEBOX\SQLEXPRESS, Line 1
> Cannot open database "C:\App_Data\ASPNETDB.MDF" requested by the
> login. The login failed.
> Msg 18456, Level 14, State 1, Server BLUEBOX\SQLEXPRESS, Line 1
> Login failed for user 'MyUserCount'.
> Questions:
> Shouldn't SQL 2005 Express allow more than one user to connect and
> authenticate to the db by default? Are there any settings I need to
> modify in Visual Studio 2005 or SQL Express 2005 in order to allow my
> web app and the sqlcmd command to co-exist and execute without
> interfering with each other?
> My Setup:
> VS 2005
> XP Professional SP2
> SQL 2005 Express
> web.config connection string looks like this:
> <add name="ASPNETDBConnectionString" connectionString="Data Source=.
> \SQLEXPRESS;AttachDbFilename=|DataDirect
ory|\ASPNETDB.MDF;Integrated
> Security=SSPI;User Instance=True" providerName="System.Data.SqlClient"/
> I have been going around in circles on this issue, any help would be
> greatly appreciated!
> Sincerely,
> -ralph
>
>
>
Is running SQL on VMWare supported by MS ?
I know virtualization helps when ones cutting costs so that multiple
dev/test environments can be hosted on one single server
But is it supported when used in production ? Will MS support it ?I would think that poor performance would be enough to deter anyone
from using VMWare or VirtualPC for anything but demos or dev
environments. From what I remember, MS will support the individual
products, but not the system as a whole - not much different from their
regular support IMO.
To really run well made virtual environment, you'll spend as much as
you would on separete servers and get about 1/3 of the performance.
Hassan wrote:
> I know virtualization helps when ones cutting costs so that multiple
> dev/test environments can be hosted on one single server
> But is it supported when used in production ? Will MS support it ?|||Hassan wrote:
> I know virtualization helps when ones cutting costs so that multiple
> dev/test environments can be hosted on one single server
> But is it supported when used in production ? Will MS support it ?
Yes. Your virtual servers must be properly licensed of course. See:
http://www.microsoft.com/sql/howtob...ualization.mspx
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Hi
Fully supported by Microsoft
:
VMWare, No.
Microsoft Virtual PC and Virtual Server, Yes.
http://www.support.microsoft.com/kb/897615/
http://www.support.microsoft.com/kb/897613
http://www.support.microsoft.com/kb/897614
Mike
This posting is provided "AS IS" with no warranties, and confers no rights.
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1149512310.263776.52780@.f6g2000cwb.googlegroups.com...
> Hassan wrote:
> Yes. Your virtual servers must be properly licensed of course. See:
> http://www.microsoft.com/sql/howtob...ualization.mspx
> --
> David Portas, SQL Server MVP
> Whenever possible please post enough code to reproduce your problem.
> Including CREATE TABLE and INSERT statements usually helps.
> State what version of SQL Server you are using and specify the content
> of any error messages.
> SQL Server Books Online:
> http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
> --
>|||Michael Epprecht [MSFT] wrote:
> Hi
> Fully supported by Microsoft
> :
> VMWare, No.
> Microsoft Virtual PC and Virtual Server, Yes.
> http://www.support.microsoft.com/kb/897615/
> http://www.support.microsoft.com/kb/897613
> http://www.support.microsoft.com/kb/897614
> --
> Mike
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>
Thanks for the clarification. I hadn't seen that before.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
dev/test environments can be hosted on one single server
But is it supported when used in production ? Will MS support it ?I would think that poor performance would be enough to deter anyone
from using VMWare or VirtualPC for anything but demos or dev
environments. From what I remember, MS will support the individual
products, but not the system as a whole - not much different from their
regular support IMO.
To really run well made virtual environment, you'll spend as much as
you would on separete servers and get about 1/3 of the performance.
Hassan wrote:
> I know virtualization helps when ones cutting costs so that multiple
> dev/test environments can be hosted on one single server
> But is it supported when used in production ? Will MS support it ?|||Hassan wrote:
> I know virtualization helps when ones cutting costs so that multiple
> dev/test environments can be hosted on one single server
> But is it supported when used in production ? Will MS support it ?
Yes. Your virtual servers must be properly licensed of course. See:
http://www.microsoft.com/sql/howtob...ualization.mspx
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Hi
Fully supported by Microsoft
:
VMWare, No.
Microsoft Virtual PC and Virtual Server, Yes.
http://www.support.microsoft.com/kb/897615/
http://www.support.microsoft.com/kb/897613
http://www.support.microsoft.com/kb/897614
Mike
This posting is provided "AS IS" with no warranties, and confers no rights.
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1149512310.263776.52780@.f6g2000cwb.googlegroups.com...
> Hassan wrote:
> Yes. Your virtual servers must be properly licensed of course. See:
> http://www.microsoft.com/sql/howtob...ualization.mspx
> --
> David Portas, SQL Server MVP
> Whenever possible please post enough code to reproduce your problem.
> Including CREATE TABLE and INSERT statements usually helps.
> State what version of SQL Server you are using and specify the content
> of any error messages.
> SQL Server Books Online:
> http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
> --
>|||Michael Epprecht [MSFT] wrote:
> Hi
> Fully supported by Microsoft
> :
> VMWare, No.
> Microsoft Virtual PC and Virtual Server, Yes.
> http://www.support.microsoft.com/kb/897615/
> http://www.support.microsoft.com/kb/897613
> http://www.support.microsoft.com/kb/897614
> --
> Mike
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>
Thanks for the clarification. I hadn't seen that before.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
Is running SQL on VMWare supported by MS ?
I know virtualization helps when ones cutting costs so that multiple
dev/test environments can be hosted on one single server
But is it supported when used in production ? Will MS support it ?I would think that poor performance would be enough to deter anyone
from using VMWare or VirtualPC for anything but demos or dev
environments. From what I remember, MS will support the individual
products, but not the system as a whole - not much different from their
regular support IMO.
To really run well made virtual environment, you'll spend as much as
you would on separete servers and get about 1/3 of the performance.
Hassan wrote:
> I know virtualization helps when ones cutting costs so that multiple
> dev/test environments can be hosted on one single server
> But is it supported when used in production ? Will MS support it ?|||Hassan wrote:
> I know virtualization helps when ones cutting costs so that multiple
> dev/test environments can be hosted on one single server
> But is it supported when used in production ? Will MS support it ?
Yes. Your virtual servers must be properly licensed of course. See:
http://www.microsoft.com/sql/howtobuy/virtualization.mspx
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Hi
Fully supported by Microsoft
:
VMWare, No.
Microsoft Virtual PC and Virtual Server, Yes.
http://www.support.microsoft.com/kb/897615/
http://www.support.microsoft.com/kb/897613
http://www.support.microsoft.com/kb/897614
--
Mike
This posting is provided "AS IS" with no warranties, and confers no rights.
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1149512310.263776.52780@.f6g2000cwb.googlegroups.com...
> Hassan wrote:
>> I know virtualization helps when ones cutting costs so that multiple
>> dev/test environments can be hosted on one single server
>> But is it supported when used in production ? Will MS support it ?
> Yes. Your virtual servers must be properly licensed of course. See:
> http://www.microsoft.com/sql/howtobuy/virtualization.mspx
> --
> David Portas, SQL Server MVP
> Whenever possible please post enough code to reproduce your problem.
> Including CREATE TABLE and INSERT statements usually helps.
> State what version of SQL Server you are using and specify the content
> of any error messages.
> SQL Server Books Online:
> http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
> --
>|||Michael Epprecht [MSFT] wrote:
> Hi
> Fully supported by Microsoft
> :
> VMWare, No.
> Microsoft Virtual PC and Virtual Server, Yes.
> http://www.support.microsoft.com/kb/897615/
> http://www.support.microsoft.com/kb/897613
> http://www.support.microsoft.com/kb/897614
> --
> Mike
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
Thanks for the clarification. I hadn't seen that before.
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
dev/test environments can be hosted on one single server
But is it supported when used in production ? Will MS support it ?I would think that poor performance would be enough to deter anyone
from using VMWare or VirtualPC for anything but demos or dev
environments. From what I remember, MS will support the individual
products, but not the system as a whole - not much different from their
regular support IMO.
To really run well made virtual environment, you'll spend as much as
you would on separete servers and get about 1/3 of the performance.
Hassan wrote:
> I know virtualization helps when ones cutting costs so that multiple
> dev/test environments can be hosted on one single server
> But is it supported when used in production ? Will MS support it ?|||Hassan wrote:
> I know virtualization helps when ones cutting costs so that multiple
> dev/test environments can be hosted on one single server
> But is it supported when used in production ? Will MS support it ?
Yes. Your virtual servers must be properly licensed of course. See:
http://www.microsoft.com/sql/howtobuy/virtualization.mspx
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Hi
Fully supported by Microsoft
:
VMWare, No.
Microsoft Virtual PC and Virtual Server, Yes.
http://www.support.microsoft.com/kb/897615/
http://www.support.microsoft.com/kb/897613
http://www.support.microsoft.com/kb/897614
--
Mike
This posting is provided "AS IS" with no warranties, and confers no rights.
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1149512310.263776.52780@.f6g2000cwb.googlegroups.com...
> Hassan wrote:
>> I know virtualization helps when ones cutting costs so that multiple
>> dev/test environments can be hosted on one single server
>> But is it supported when used in production ? Will MS support it ?
> Yes. Your virtual servers must be properly licensed of course. See:
> http://www.microsoft.com/sql/howtobuy/virtualization.mspx
> --
> David Portas, SQL Server MVP
> Whenever possible please post enough code to reproduce your problem.
> Including CREATE TABLE and INSERT statements usually helps.
> State what version of SQL Server you are using and specify the content
> of any error messages.
> SQL Server Books Online:
> http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
> --
>|||Michael Epprecht [MSFT] wrote:
> Hi
> Fully supported by Microsoft
> :
> VMWare, No.
> Microsoft Virtual PC and Virtual Server, Yes.
> http://www.support.microsoft.com/kb/897615/
> http://www.support.microsoft.com/kb/897613
> http://www.support.microsoft.com/kb/897614
> --
> Mike
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
Thanks for the clarification. I hadn't seen that before.
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
Friday, February 24, 2012
Is possible of using one single statement for inserting two tables?
Hi,
I need to know whether it is possible of using one single SQL statemnet to implement inserting and updating operations on two tables.
The back ground information is that the two tables are related with the following structure:
user_group_A table
id int -- PK,
field1 varchar(20),
field2 varchar(20)
user_group_B table
id int -- PK reference user_group_B,
field3 varchar(20),
field4 varchar(20)
that is the group A has field1 and field2, while the B has field1, field2, field3, and field3.
Thanks for you input.
v.Originally posted by Vernon
Hi,
I need to know whether it is possible of using one single SQL statemnet to implement inserting and updating operations on two tables.
The back ground information is that the two tables are related with the following structure:
user_group_A table
id int -- PK,
field1 varchar(20),
field2 varchar(20)
user_group_B table
id int -- PK reference user_group_B,
field3 varchar(20),
field4 varchar(20)
that is the group A has field1 and field2, while the B has field1, field2, field3, and field3.
Thanks for you input.
v.
You don't say what DBMS. For Oracle, the short answer is "no".
However, there is a way in which this could be accomplished:
1) Create a view based on the join between A and B
2) Create an INSTEAD OF INSERT trigger on the view, and in the trigger code perform inserts into both A and B.|||Thanks Tony for your advice.
I prefer a genertc solution over the DB special one. I currently use PostgreSQL for this project.
I have a look at the View. As the name indicated, it is for view only. Only a selection query can be operated on it. I also find another mechanism called rule, which can be used to insertion and update queries. I don't know whether it is a standard or not.
Can you elaborate the second point you stated?
Thank again.
Vernon|||Originally posted by Vernon
Thanks Tony for your advice.
I prefer a genertc solution over the DB special one. I currently use PostgreSQL for this project.
I have a look at the View. As the name indicated, it is for view only. Only a selection query can be operated on it. I also find another mechanism called rule, which can be used to insertion and update queries. I don't know whether it is a standard or not.
Can you elaborate the second point you stated?
Thank again.
Vernon
My second point refers to an Oracle feature, the INSTEAD OF [INSERT/UPDATE/DELETE] trigger. It allows you to override the default action for an insert etc. on a view. For example, for a view V based on tables A and B you might define a trigger:
CREATE OR REPLACE TRIGGER v_trg1
INSTEAD OF INSERT ON V
FOR EACH ROW
BEGIN
INSERT INTO A( id, ... ) VALUES (:NEW.id, ... );
INSERT INTO B( id, ... ) VALUES (:NEW.id, ...);
END;
I need to know whether it is possible of using one single SQL statemnet to implement inserting and updating operations on two tables.
The back ground information is that the two tables are related with the following structure:
user_group_A table
id int -- PK,
field1 varchar(20),
field2 varchar(20)
user_group_B table
id int -- PK reference user_group_B,
field3 varchar(20),
field4 varchar(20)
that is the group A has field1 and field2, while the B has field1, field2, field3, and field3.
Thanks for you input.
v.Originally posted by Vernon
Hi,
I need to know whether it is possible of using one single SQL statemnet to implement inserting and updating operations on two tables.
The back ground information is that the two tables are related with the following structure:
user_group_A table
id int -- PK,
field1 varchar(20),
field2 varchar(20)
user_group_B table
id int -- PK reference user_group_B,
field3 varchar(20),
field4 varchar(20)
that is the group A has field1 and field2, while the B has field1, field2, field3, and field3.
Thanks for you input.
v.
You don't say what DBMS. For Oracle, the short answer is "no".
However, there is a way in which this could be accomplished:
1) Create a view based on the join between A and B
2) Create an INSTEAD OF INSERT trigger on the view, and in the trigger code perform inserts into both A and B.|||Thanks Tony for your advice.
I prefer a genertc solution over the DB special one. I currently use PostgreSQL for this project.
I have a look at the View. As the name indicated, it is for view only. Only a selection query can be operated on it. I also find another mechanism called rule, which can be used to insertion and update queries. I don't know whether it is a standard or not.
Can you elaborate the second point you stated?
Thank again.
Vernon|||Originally posted by Vernon
Thanks Tony for your advice.
I prefer a genertc solution over the DB special one. I currently use PostgreSQL for this project.
I have a look at the View. As the name indicated, it is for view only. Only a selection query can be operated on it. I also find another mechanism called rule, which can be used to insertion and update queries. I don't know whether it is a standard or not.
Can you elaborate the second point you stated?
Thank again.
Vernon
My second point refers to an Oracle feature, the INSTEAD OF [INSERT/UPDATE/DELETE] trigger. It allows you to override the default action for an insert etc. on a view. For example, for a view V based on tables A and B you might define a trigger:
CREATE OR REPLACE TRIGGER v_trg1
INSTEAD OF INSERT ON V
FOR EACH ROW
BEGIN
INSERT INTO A( id, ... ) VALUES (:NEW.id, ... );
INSERT INTO B( id, ... ) VALUES (:NEW.id, ...);
END;
Is ONE Processor License + SQL Server Software (Enterprise) enoug
I have a customer who has purchased a single Processor License for SQL Server
2000 and has also purchased the Enterprise SQL Server Software(separately).
He claims that covers him for a dual processor machine, but I disagree. Is
he correct in his assumption that the software is treated as a single
processor license?
John
If the Enterprise Server purchase was also a Processor Licence then yes, you
can legitimately use your software on a dual processor machine since you
have purchased two processor licences.
If the Enterprise Server is a Server/CAL licence then you can use the
software on up to 32 processors (depending on the OS) but you would need to
purchase CALs for each client device/user. Your processor licence would then
be spare.
That's my opinion. As always with licensing issues, for the definitive
answer contact a Microsoft representative.
David Portas
SQL Server MVP
2000 and has also purchased the Enterprise SQL Server Software(separately).
He claims that covers him for a dual processor machine, but I disagree. Is
he correct in his assumption that the software is treated as a single
processor license?
John
If the Enterprise Server purchase was also a Processor Licence then yes, you
can legitimately use your software on a dual processor machine since you
have purchased two processor licences.
If the Enterprise Server is a Server/CAL licence then you can use the
software on up to 32 processors (depending on the OS) but you would need to
purchase CALs for each client device/user. Your processor licence would then
be spare.
That's my opinion. As always with licensing issues, for the definitive
answer contact a Microsoft representative.
David Portas
SQL Server MVP
Is ONE Processor License + SQL Server Software (Enterprise) enoug
I have a customer who has purchased a single Processor License for SQL Serve
r
2000 and has also purchased the Enterprise SQL Server Software(separately).
He claims that covers him for a dual processor machine, but I disagree. Is
he correct in his assumption that the software is treated as a single
processor license?
JohnIf the Enterprise Server purchase was also a Processor Licence then yes, you
can legitimately use your software on a dual processor machine since you
have purchased two processor licences.
If the Enterprise Server is a Server/CAL licence then you can use the
software on up to 32 processors (depending on the OS) but you would need to
purchase CALs for each client device/user. Your processor licence would then
be spare.
That's my opinion. As always with licensing issues, for the definitive
answer contact a Microsoft representative.
David Portas
SQL Server MVP
--
r
2000 and has also purchased the Enterprise SQL Server Software(separately).
He claims that covers him for a dual processor machine, but I disagree. Is
he correct in his assumption that the software is treated as a single
processor license?
JohnIf the Enterprise Server purchase was also a Processor Licence then yes, you
can legitimately use your software on a dual processor machine since you
have purchased two processor licences.
If the Enterprise Server is a Server/CAL licence then you can use the
software on up to 32 processors (depending on the OS) but you would need to
purchase CALs for each client device/user. Your processor licence would then
be spare.
That's my opinion. As always with licensing issues, for the definitive
answer contact a Microsoft representative.
David Portas
SQL Server MVP
--
Subscribe to:
Posts (Atom)