Monday, March 26, 2012
Error during Copy Database Wizard operation
Thanks!Probably something to do with security permissions between the two servers. If so, pick an administrative account which is the same on both. Run the wizard as that account. Test access by logging into one server and map a drive to the other.
--jfp|||Thanks for the suggestion! I tried using a domain admin to copy the database over and it works! I was using a local admin account before to establish the connection.
Thanks again.
--Speedster.|||hi
I have the same problem but i'm in workstation ...
i used Administrator account in the source server and the destination server, but it doesn't work :eek:
What can i do ?|||- quoting "hi I have the same problem but i'm in workstation ...
i used Administrator account in the source server and the destination server, but it doesn't work What can i do ?"
asanhaji, are you accessing it from a windows workstation via Enterprise Manger? Is it possible to be at one of the servers locally and try to copy it over? Unless you are a logged into the workstation with a domain admin account OR connect to the server in Enterprise manager with a domain admin account you may not have any luck in copying the stuff over. You may need to connect to both servers using a DBO account (typically sa is the user name for it).
slashman
Wednesday, March 21, 2012
Error Creating User on Database
Hi there,
I am setting up a database for the first time using SQL Server Express.
I have managed to create a database and create a table with data etc, all straight forward.
The problem I am having is when I come to creating a user for the database. I have the following users in there already, which I am guessing are put in by default:
dbo
guest
INFORMATION_SCHEMA
sys
When I try creating a new user via this screen I get the following error:
TITLE: Microsoft SQL Server Management Studio Express
Create failed for User 'growstudiouser'. (Microsoft.SqlServer.Express.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+User&LinkId=20476
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
'growstudio' is not a valid login or you do not have permission. (Microsoft SQL Server, Error: 15007)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=15007&LinkId=20476
I was wondering if anybody could advise me as to what I'm doing wrong. I am typing in the name as "growstudiouser" and the login name as "growstudio".
Or am I just using the wrong section to do what I want. I'm trying to create a user so that when the database is built I can connect to it using a username and password that I have created. I'm not sure I'm taking to the correct route as there is no password option anywhere when creating a new user.
Thanks in advance,
Kevin
hi Kevin,
usually a database user is associated with a server's login, if you do not define a user as
USE tempdb; GO CREATE USER testUser WITHOUT LOGIN WITH DEFAULT_SCHEMA = dbo; GO DROP USER testUser;where the database user is not associated with a server level principal, but this is another story..
so you should first create the server login as
USE master; CREATE LOGIN testLogin WITH PASSWORD = 'his strong password'; GO USE tempdb; GO CREATE USER testUser FOR LOGIN testLogin WITH DEFAULT_SCHEMA = dbo; GO DROP USER testUser; GO USE master; GO DROP LOGIN testLogin;regards
|||SQL Server follows two level security architecture. Login and User . Login is to access to the server. If you have login it does not mean that you have access to all the databases in that server. NO. To access database, the Login has to be mapped/added to the database as user. So , in your case what your are probably doing is you are not maping the user with a login . You should select a login while creating user
Madhu
Error Creating Role on Cube
click on the Test Role button, I get the following
error.
"Unable to process one or more commands. User-generated
error - the dimension "All Regions" has no valid member.
For more information, see your administrator."
Below is the mdx that I have entered on the All Regions
dimension of my role.
FILTER(
{[All Regions].[Region Name].Members},
(((STRTOTUPLE(MID(USERNAME,INSTR(1,USERNAME,"\")+1 ,128)),
[SFAccessre])=1)
AND ((STRTOTUPLE(MID(USERNAME,INSTR(1,USERNAME,"\")
+1,128)),[Cube Typere])=1)
AND ((STRTOTUPLE(MID(USERNAME,INSTR(1,USERNAME,"\")
+1,128)),[Dimension Typere])=1)))
I am able to browse the data of the All Regions
dimension. The dimensions SFAccessre, Cube Typere and
Dimension Typere are all in a Users Region dimension.
I use a similar MDX statement for security on another
dimension in my cube.
TIA
Hi,
When you execute the Test Role button, it takes in the Logged in User and
tries to apply the Security MDX on this. (Bascially the UserName function
would return the Logged in User's Information.)
Please check if the Logged in user has got corresponding records in the All
Regions Dimension.
Thanks,
Sanka
"Craig" wrote:
> I am trying to create a role on a dimension and when I
> click on the Test Role button, I get the following
> error.
> "Unable to process one or more commands. User-generated
> error - the dimension "All Regions" has no valid member.
> For more information, see your administrator."
> Below is the mdx that I have entered on the All Regions
> dimension of my role.
> FILTER(
> {[All Regions].[Region Name].Members},
> (((STRTOTUPLE(MID(USERNAME,INSTR(1,USERNAME,"\")+1 ,128)),
> [SFAccessre])=1)
> AND ((STRTOTUPLE(MID(USERNAME,INSTR(1,USERNAME,"\")
> +1,128)),[Cube Typere])=1)
> AND ((STRTOTUPLE(MID(USERNAME,INSTR(1,USERNAME,"\")
> +1,128)),[Dimension Typere])=1)))
> I am able to browse the data of the All Regions
> dimension. The dimensions SFAccessre, Cube Typere and
> Dimension Typere are all in a Users Region dimension.
> I use a similar MDX statement for security on another
> dimension in my cube.
> TIA
>
Error Creating Role on Cube
click on the Test Role button, I get the following
error.
"Unable to process one or more commands. User-generated
error - the dimension "All Regions" has no valid member.
For more information, see your administrator."
Below is the mdx that I have entered on the All Regions
dimension of my role.
FILTER(
{[All Regions].[Region Name].Members},
(((STRTOTUPLE(MID(USERNAME,INSTR(1,USERN
AME,"\")+1,128)),
[SFAccessre])=1)
AND ((STRTOTUPLE(MID(USERNAME,INSTR(1,USERNA
ME,"\")
+1,128)),[Cube Typere])=1)
AND ((STRTOTUPLE(MID(USERNAME,INSTR(1,USERNA
ME,"\")
+1,128)),[Dimension Typere])=1)))
I am able to browse the data of the All Regions
dimension. The dimensions SFAccessre, Cube Typere and
Dimension Typere are all in a Users Region dimension.
I use a similar MDX statement for security on another
dimension in my cube.
TIAHi,
When you execute the Test Role button, it takes in the Logged in User and
tries to apply the Security MDX on this. (Bascially the UserName function
would return the Logged in User's Information.)
Please check if the Logged in user has got corresponding records in the All
Regions Dimension.
Thanks,
Sanka
"Craig" wrote:
> I am trying to create a role on a dimension and when I
> click on the Test Role button, I get the following
> error.
> "Unable to process one or more commands. User-generated
> error - the dimension "All Regions" has no valid member.
> For more information, see your administrator."
> Below is the mdx that I have entered on the All Regions
> dimension of my role.
> FILTER(
> {[All Regions].[Region Name].Members},
> (((STRTOTUPLE(MID(USERNAME,INSTR(1,USERN
AME,"\")+1,128)),
> [SFAccessre])=1)
> AND ((STRTOTUPLE(MID(USERNAME,INSTR(1,USERNA
ME,"\")
> +1,128)),[Cube Typere])=1)
> AND ((STRTOTUPLE(MID(USERNAME,INSTR(1,USERNA
ME,"\")
> +1,128)),[Dimension Typere])=1)))
> I am able to browse the data of the All Regions
> dimension. The dimensions SFAccessre, Cube Typere and
> Dimension Typere are all in a Users Region dimension.
> I use a similar MDX statement for security on another
> dimension in my cube.
> TIA
>
Error creating Push subscription
I've had this problem for about 4 weeks, and I cna't seem
to find a solution! I'm trying to create a puch
subscription but get the following error when EM tries to
create the records:
FHQRY: Error 515: Cannot insert the value NULL into
column 'step_name', table 'msdb.dbo.sysjobsteps'; column
does not allow nulls. INSERT fails.
I'm running SQL 2000 sp3a on Win 2k sp4. Also I've updated
to MDAC 2.8. I've tried using the stored procs but still
get the same error.
Any suggestions as to why this is happening?
I was told from a nother forum that this kind of problem
occurred with a SP update SQL 7.0 and MS isued a patch.
Should this patch be applied to my server if available? as
it the replication was working prior to a major rebuild.
thanks for any help
Davej
There are probably some missing messages in the sysmessages table in the
master database. Some of the messages are used for dexcriptiosn of the
various replication jobs. You can run a profiler trace while the push
subscription is being created and probably captiure which message is
missing.
Rand
This posting is provided "as is" with no warranties and confers no rights.
error creating offline cubes
i want to create offline cubes in excel 2003 and receive
following error message:
Microsoft OLE DB Provider for Analysis Services:
Data source provider error.
The olap-database was created with SSABI 1.2, for example
with one dimension, one measure and one cube.
environment:
Win2000 Server
SQL Server 2000, SP3a, Analysis S. 2000 SP3a
Excel 2003
thanks for help,
markusI get the same error using MS Analysis Server on one of my data cubes.
(Others work). No other explanation. Very frustrating.
Jim
"markus krenn" <markus.krenn@.kis.co.at> wrote in message
news:8074337.0401140004.2a43461d@.posting.google.com...
> Hi,
> i want to create offline cubes in excel 2003 and receive
> following error message:
> Microsoft OLE DB Provider for Analysis Services:
> Data source provider error.
> The olap-database was created with SSABI 1.2, for example
> with one dimension, one measure and one cube.
> environment:
> Win2000 Server
> SQL Server 2000, SP3a, Analysis S. 2000 SP3a
> Excel 2003
> thanks for help,
> markus|||Hi Jim/ Markus,
I have the same error as you guys are having! Have you found a solution
to this error yet?
Thanks,
Natalie
Jim Fox wrote:[vbcol=seagreen]
> *I get the same error using MS Analysis Server on one of my data
> cubes.
> (Others work). No other explanation. Very frustrating.
> Jim
>
> "markus krenn" <markus.krenn@.kis.co.at> wrote in message
> news:8074337.0401140004.2a43461d@.posting.google.com...
Natalie
---
Posted via http://www.mcse.ms
---
View this thread: http://www.mcse.ms/message281094.html
Error creating maintenance plan
I'm getting the following error whenever trying to create a new maintenance plan in the Management Studio:
TITLE: Microsoft SQL Server Management Studio
Exception has been thrown by the target of an invocation. (mscorlib)
ADDITIONAL INFORMATION:
Cannot find folder "\Maintenance Plans".
Cannot find folder "\Maintenance Plans".
BUTTONS:
OK
I'm running SQL 2005 SP2 Enterprise Edition, and I have database mirroring configured for all of my non-system databases (3 total). My primary database server is a 2-node cluster. I've tried this from both a remote machine and directly on the SQL server itself, with the same results. Could this have anything to do with the data mirroring? I didn't have this problem previous to setting that up, although I haven't tried creating a maintenance plan in quite a while either.
Here are the error message details:
===================================
Exception has been thrown by the target of an invocation. (mscorlib)
Program Location:
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.GetExistingPackageNames(String serverName, String userName, SqlSecureString securePassword)
at Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.Invoke()
===================================
Cannot find folder "\Maintenance Plans".
Program Location:
at Microsoft.SqlServer.Dts.Runtime.Application.GetPackageInfos(String strFolder, String serverName, String serverUserName, String serverPassword)
===================================
Cannot find folder "\Maintenance Plans".
Program Location:
at Microsoft.SqlServer.Dts.Runtime.Wrapper.ApplicationClass.GetPackageInfos(String bstrPackageFolder, String bstrServerName, String bstrServerUserName, String bstrServerPassword)
at Microsoft.SqlServer.Dts.Runtime.Application.GetPackageInfos(String strFolder, String serverName, String serverUserName, String serverPassword)
Try this:
Code Snippet
-- Verify that the folder is missing:
Use msdb;
go
exec sp_executesql N'exec [msdb].[dbo].[sp_dts_getfolder] @.P1, @.P2',N'@.P1 nvarchar(17),@.P2 uniqueidentifier',N'Maintenance Plans','00000000-0000-0000-0000-000000000000'
-- If there is no Folder, then
-- Add the folder if missing:
exec sp_dts_addfolder '00000000-0000-0000-0000-000000000000','Maintenance Plans','08AA12D5-8F98-4DAB-A4FC-980B150A5DC8'
Regards,
Willfried
sql
Error creating maintenance plan
I'm getting the following error whenever trying to create a new maintenance plan in the Management Studio:
TITLE: Microsoft SQL Server Management Studio
Exception has been thrown by the target of an invocation. (mscorlib)
ADDITIONAL INFORMATION:
Cannot find folder "\Maintenance Plans".
Cannot find folder "\Maintenance Plans".
BUTTONS:
OK
I'm running SQL 2005 SP2 Enterprise Edition, and I have database mirroring configured for all of my non-system databases (3 total). My primary database server is a 2-node cluster. I've tried this from both a remote machine and directly on the SQL server itself, with the same results. Could this have anything to do with the data mirroring? I didn't have this problem previous to setting that up, although I haven't tried creating a maintenance plan in quite a while either.
Here are the error message details:
===================================
Exception has been thrown by the target of an invocation. (mscorlib)
Program Location:
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.GetExistingPackageNames(String serverName, String userName, SqlSecureString securePassword)
at Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.Invoke()
===================================
Cannot find folder "\Maintenance Plans".
Program Location:
at Microsoft.SqlServer.Dts.Runtime.Application.GetPackageInfos(String strFolder, String serverName, String serverUserName, String serverPassword)
===================================
Cannot find folder "\Maintenance Plans".
Program Location:
at Microsoft.SqlServer.Dts.Runtime.Wrapper.ApplicationClass.GetPackageInfos(String bstrPackageFolder, String bstrServerName, String bstrServerUserName, String bstrServerPassword)
at Microsoft.SqlServer.Dts.Runtime.Application.GetPackageInfos(String strFolder, String serverName, String serverUserName, String serverPassword)
Try this:
Code Snippet
-- Verify that the folder is missing:
Use msdb;
go
exec sp_executesql N'exec [msdb].[dbo].[sp_dts_getfolder] @.P1, @.P2',N'@.P1 nvarchar(17),@.P2 uniqueidentifier',N'Maintenance Plans','00000000-0000-0000-0000-000000000000'
-- If there is no Folder, then
-- Add the folder if missing:
exec sp_dts_addfolder '00000000-0000-0000-0000-000000000000','Maintenance Plans','08AA12D5-8F98-4DAB-A4FC-980B150A5DC8'
Regards,
Willfried
Monday, March 19, 2012
Error creating login - Incorrect syntax near 'LOGIN'.
I am using Sql server 2005 and when I try to create a new login from
the sql server mgmnt studio, I get this error.
Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'LOGIN'.
I have logged in as "sa" and the login statement that I am using is:
CREATE LOGIN test WITH PASSWORD = 'beta'
The product version is 8.00.2039.
Anybody knows whats wrong'
Thanks for helping out.
EshaWorks for me. The two most likely cause I can think of is there's a
non-printable character somewhere that didn't get copied to the post or you
have a Beta version of SQL Server 2005 (or SQL Server 2000) that had a
different CREATE LOGIN syntax.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Esha" <eshhyasi@.gmail.com> wrote in message
news:1151465435.377462.192620@.p79g2000cwp.googlegroups.com...
> Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
>
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
>
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
>|||Esha,
CREATE LOGIN is a new T-SQL statement in SQL Server 2005.
Since you are using SQL Server 2000, you need to use sp_addlogin
or sp_grantlogin. Management Studio should use the version-appropriate
T-SQL depending on whether you are adding a login to a 2000 instance
or a 2005 instance. If this is not working for you, can you tell us what
steps you are taking in Management Studio in your attempt to create
the new login?
Steve Kass
Drew University
Esha wrote:
>Hi,
>I am using Sql server 2005 and when I try to create a new login from
>the sql server mgmnt studio, I get this error.
>
>Msg 170, Level 15, State 1, Line 1
>Line 1: Incorrect syntax near 'LOGIN'.
>
>I have logged in as "sa" and the login statement that I am using is:
>CREATE LOGIN test WITH PASSWORD = 'beta'
>The product version is 8.00.2039.
>Anybody knows whats wrong'
>Thanks for helping out.
>Esha
>
>|||Hi Steve,
Thanks for the quick response.
I just verified and you are right. My database engine is SQL server
2000 but my management studio is 2005. I used sp_addlogin and it
worked.
I created a new user for the new login from the management studio and I
assigned the roles of db_datareader and db_datawriter. If I need to
allow the user, read and write access only, but not "execute" access
for scripts, do I need to assign any other roles apart from the above
two?
Thanks a lot
Esha
Steve Kass wrote:
> Esha,
> CREATE LOGIN is a new T-SQL statement in SQL Server 2005.
> Since you are using SQL Server 2000, you need to use sp_addlogin
> or sp_grantlogin. Management Studio should use the version-appropriate
> T-SQL depending on whether you are adding a login to a 2000 instance
> or a 2005 instance. If this is not working for you, can you tell us what
> steps you are taking in Management Studio in your attempt to create
> the new login?
> Steve Kass
> Drew University
> Esha wrote:
>|||Thanks Roger,
I was using management studio 2005 to connect to SQL server 2000 and
hence it was not working. I used sp_addlogin as suggested by Steve and
it worked.
Thanks a lot,
Esha
Roger Wolter[MSFT] wrote:
> Works for me. The two most likely cause I can think of is there's a
> non-printable character somewhere that didn't get copied to the post or yo
u
> have a Beta version of SQL Server 2005 (or SQL Server 2000) that had a
> different CREATE LOGIN syntax.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Esha" <eshhyasi@.gmail.com> wrote in message
> news:1151465435.377462.192620@.p79g2000cwp.googlegroups.com...|||Esha,
Whether the user can "execute" a script (a T-SQL statement?) depends on
what the script does. A data reader can execute a SELECT statement,
and a data writer can execute DELETE, UPDATE, or INSERT statements.
You can grant or deny permissions on individual stored procedures, tables,
and other objects more specifically with GRANT and DENY. The security
models for 2000 and 2005 are somewhat different, and I suggest you refer to
Books Online for the appropriate version of your database instance for more
details.
SK
Esha wrote:
>Hi Steve,
>Thanks for the quick response.
>I just verified and you are right. My database engine is SQL server
>2000 but my management studio is 2005. I used sp_addlogin and it
>worked.
>I created a new user for the new login from the management studio and I
>assigned the roles of db_datareader and db_datawriter. If I need to
>allow the user, read and write access only, but not "execute" access
>for scripts, do I need to assign any other roles apart from the above
>two?
>Thanks a lot
>Esha
>Steve Kass wrote:
>
>
>
Error creating login - Incorrect syntax near 'LOGIN'.
I am using Sql server 2005 and when I try to create a new login from
the sql server mgmnt studio, I get this error.
Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'LOGIN'.
I have logged in as "sa" and the login statement that I am using is:
CREATE LOGIN test WITH PASSWORD = 'beta'
The product version is 8.00.2039.
Anybody knows whats wrong'
Thanks for helping out.
EshaThis is a multi-part message in MIME format.
--060001040307010407040902
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
instance by the sounds of it. What's the version of the SQL instance
(run "SELECT SERVERPROPERTY('ProductVersion')")?
CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
to a SQL 2000 instance, regardless of which SQL client tool you use, you
need to use sp_addlogin or sp_grantlogin (depending on whether it's a
standard SQL login or a trusted login we're talking about). I think the
GUI in Management Studio ought to take care of this automatically (ie.
use different commands depending on the server version) but if you want
to use T-SQL yourself then you need to write the correct statements for
the SQL version the server is running.
--
*mike hodgson*
http://sqlnerd.blogspot.com
eshhyasi@.gmail.com wrote:
>Hi,
>I am using Sql server 2005 and when I try to create a new login from
>the sql server mgmnt studio, I get this error.
>Msg 170, Level 15, State 1, Line 1
>Line 1: Incorrect syntax near 'LOGIN'.
>I have logged in as "sa" and the login statement that I am using is:
>CREATE LOGIN test WITH PASSWORD = 'beta'
>The product version is 8.00.2039.
>Anybody knows whats wrong'
>Thanks for helping out.
>Esha
>
>
--060001040307010407040902
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
instance by the sounds of it. What's the version of the SQL instance
(run "SELECT SERVERPROPERTY('ProductVersion')")?<br>
<br>
CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new
logins to a SQL 2000 instance, regardless of which SQL client tool you
use, you need to use sp_addlogin or sp_grantlogin (depending on whether
it's a standard SQL login or a trusted login we're talking about). I
think the GUI in Management Studio ought to take care of this
automatically (ie. use different commands depending on the server
version) but if you want to use T-SQL yourself then you need to write
the correct statements for the SQL version the server is running.<br>
</tt>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"><br>
<font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
</p>
</div>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:eshhyasi@.gmail.com">eshhyasi@.gmail.com</a> wrote:
<blockquote
cite="mid1151465632.155321.236760@.m73g2000cwd.googlegroups.com"
type="cite">
<pre wrap="">Hi,
I am using Sql server 2005 and when I try to create a new login from
the sql server mgmnt studio, I get this error.
Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'LOGIN'.
I have logged in as "sa" and the login statement that I am using is:
CREATE LOGIN test WITH PASSWORD = 'beta'
The product version is 8.00.2039.
Anybody knows whats wrong'
Thanks for helping out.
Esha
</pre>
</blockquote>
</body>
</html>
--060001040307010407040902--|||Thanks Mike,
I used sp_addlogin and it worked.
Thanks a lot,
Esha
Mike Hodgson wrote:
> Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL instance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
> to a SQL 2000 instance, regardless of which SQL client tool you use, you
> need to use sp_addlogin or sp_grantlogin (depending on whether it's a
> standard SQL login or a trusted login we're talking about). I think the
> GUI in Management Studio ought to take care of this automatically (ie.
> use different commands depending on the server version) but if you want
> to use T-SQL yourself then you need to write the correct statements for
> the SQL version the server is running.
> --
> *mike hodgson*
> http://sqlnerd.blogspot.com
>
> eshhyasi@.gmail.com wrote:
> >Hi,
> >
> >I am using Sql server 2005 and when I try to create a new login from
> >the sql server mgmnt studio, I get this error.
> >
> >Msg 170, Level 15, State 1, Line 1
> >Line 1: Incorrect syntax near 'LOGIN'.
> >
> >I have logged in as "sa" and the login statement that I am using is:
> >
> >CREATE LOGIN test WITH PASSWORD = 'beta'
> >
> >The product version is 8.00.2039.
> >
> >Anybody knows whats wrong'
> >
> >Thanks for helping out.
> >
> >Esha
> >
> >
> >
> --060001040307010407040902
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 2029
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
> </head>
> <body bgcolor="#ffffff" text="#000000">
> <tt>Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL instance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?<br>
> <br>
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new
> logins to a SQL 2000 instance, regardless of which SQL client tool you
> use, you need to use sp_addlogin or sp_grantlogin (depending on whether
> it's a standard SQL login or a trusted login we're talking about). I
> think the GUI in Management Studio ought to take care of this
> automatically (ie. use different commands depending on the server
> version) but if you want to use T-SQL yourself then you need to write
> the correct statements for the SQL version the server is running.<br>
> </tt>
> <div class="moz-signature">
> <title></title>
> <meta http-equiv="Content-Type" content="text/html; ">
> <p><span lang="en-au"><font face="Tahoma" size="2">--<br>
> </font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
> hodgson</font></span></b><span lang="en-au"><br>
> <font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
> </p>
> </div>
> <br>
> <br>
> <a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:eshhyasi@.gmail.com">eshhyasi@.gmail.com</a> wrote:
> <blockquote
> cite="mid1151465632.155321.236760@.m73g2000cwd.googlegroups.com"
> type="cite">
> <pre wrap="">Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
> </pre>
> </blockquote>
> </body>
> </html>
> --060001040307010407040902--|||Thanks Mike,
I used sp_addlogin and it worked.
Thanks a lot,
Esha
Mike Hodgson wrote:
> Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL instance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
> to a SQL 2000 instance, regardless of which SQL client tool you use, you
> need to use sp_addlogin or sp_grantlogin (depending on whether it's a
> standard SQL login or a trusted login we're talking about). I think the
> GUI in Management Studio ought to take care of this automatically (ie.
> use different commands depending on the server version) but if you want
> to use T-SQL yourself then you need to write the correct statements for
> the SQL version the server is running.
> --
> *mike hodgson*
> http://sqlnerd.blogspot.com
>
> eshhyasi@.gmail.com wrote:
> >Hi,
> >
> >I am using Sql server 2005 and when I try to create a new login from
> >the sql server mgmnt studio, I get this error.
> >
> >Msg 170, Level 15, State 1, Line 1
> >Line 1: Incorrect syntax near 'LOGIN'.
> >
> >I have logged in as "sa" and the login statement that I am using is:
> >
> >CREATE LOGIN test WITH PASSWORD = 'beta'
> >
> >The product version is 8.00.2039.
> >
> >Anybody knows whats wrong'
> >
> >Thanks for helping out.
> >
> >Esha
> >
> >
> >
> --060001040307010407040902
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 2029
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
> </head>
> <body bgcolor="#ffffff" text="#000000">
> <tt>Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL instance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?<br>
> <br>
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new
> logins to a SQL 2000 instance, regardless of which SQL client tool you
> use, you need to use sp_addlogin or sp_grantlogin (depending on whether
> it's a standard SQL login or a trusted login we're talking about). I
> think the GUI in Management Studio ought to take care of this
> automatically (ie. use different commands depending on the server
> version) but if you want to use T-SQL yourself then you need to write
> the correct statements for the SQL version the server is running.<br>
> </tt>
> <div class="moz-signature">
> <title></title>
> <meta http-equiv="Content-Type" content="text/html; ">
> <p><span lang="en-au"><font face="Tahoma" size="2">--<br>
> </font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
> hodgson</font></span></b><span lang="en-au"><br>
> <font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
> </p>
> </div>
> <br>
> <br>
> <a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:eshhyasi@.gmail.com">eshhyasi@.gmail.com</a> wrote:
> <blockquote
> cite="mid1151465632.155321.236760@.m73g2000cwd.googlegroups.com"
> type="cite">
> <pre wrap="">Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
> </pre>
> </blockquote>
> </body>
> </html>
> --060001040307010407040902--|||Even you are using Management Studio, you are connected to a SQL Server 2000
instance (according to your product version). You should connect to a SQL
Server 2005 instance to use create login.
Ben Nevarez, MCDBA, OCP
Database Administrator
"eshhyasi@.gmail.com" wrote:
> Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
>
Error creating login - Incorrect syntax near 'LOGIN'.
instance by the sounds of it. What's the version of the SQL instance
(run "SELECT SERVERPROPERTY('ProductVersion')")?
CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
to a SQL 2000 instance, regardless of which SQL client tool you use, you
need to use sp_addlogin or sp_grantlogin (depending on whether it's a
standard SQL login or a trusted login we're talking about). I think the
GUI in Management Studio ought to take care of this automatically (ie.
use different commands depending on the server version) but if you want
to use T-SQL yourself then you need to write the correct statements for
the SQL version the server is running.
*mike hodgson*
http://sqlnerd.blogspot.com
eshhyasi@.gmail.com wrote:
>Hi,
>I am using Sql server 2005 and when I try to create a new login from
>the sql server mgmnt studio, I get this error.
>Msg 170, Level 15, State 1, Line 1
>Line 1: Incorrect syntax near 'LOGIN'.
>I have logged in as "sa" and the login statement that I am using is:
>CREATE LOGIN test WITH PASSWORD = 'beta'
>The product version is 8.00.2039.
>Anybody knows whats wrong'
>Thanks for helping out.
>Esha
>
>Even you are using Management Studio, you are connected to a SQL Server 2000
instance (according to your product version). You should connect to a SQL
Server 2005 instance to use create login.
Ben Nevarez, MCDBA, OCP
Database Administrator
"eshhyasi@.gmail.com" wrote:
> Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
>|||Thanks Mike,
I used sp_addlogin and it worked.
Thanks a lot,
Esha
Mike Hodgson wrote:
> Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL instance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
> to a SQL 2000 instance, regardless of which SQL client tool you use, you
> need to use sp_addlogin or sp_grantlogin (depending on whether it's a
> standard SQL login or a trusted login we're talking about). I think the
> GUI in Management Studio ought to take care of this automatically (ie.
> use different commands depending on the server version) but if you want
> to use T-SQL yourself then you need to write the correct statements for
> the SQL version the server is running.
> --
> *mike hodgson*
> http://sqlnerd.blogspot.com
>
> eshhyasi@.gmail.com wrote:
>
> --060001040307010407040902
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 2029
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
> </head>
> <body bgcolor="#ffffff" text="#000000">
> <tt>Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL inst
ance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?<br>
> <br>
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new
> logins to a SQL 2000 instance, regardless of which SQL client tool you
> use, you need to use sp_addlogin or sp_grantlogin (depending on whether
> it's a standard SQL login or a trusted login we're talking about).&nbs
p; I
> think the GUI in Management Studio ought to take care of this
> automatically (ie. use different commands depending on the server
> version) but if you want to use T-SQL yourself then you need to write
> the correct statements for the SQL version the server is running.<br>
> </tt>
> <div class="moz-signature">
> <title></title>
> <meta http-equiv="Content-Type" content="text/html; ">
> <p><span lang="en-au"><font face="Tahoma" size="2">--<br>
> </font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
> hodgson</font></span></b><span lang="en-au"><br>
> <font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com">http://sqlner
d.blogspot.com</a></font></span>
> </p>
> </div>
> <br>
> <br>
> <a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:eshhyasi@.gmail.com">eshhy
asi@.gmail.com</a> wrote:
> <blockquote
> cite="mid1151465632.155321.236760@.m73g2000cwd.googlegroups.com"
> type="cite">
> <pre wrap="">Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
> </pre>
> </blockquote>
> </body>
> </html>
> --060001040307010407040902--|||Thanks Mike,
I used sp_addlogin and it worked.
Thanks a lot,
Esha
Mike Hodgson wrote:
> Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL instance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
> to a SQL 2000 instance, regardless of which SQL client tool you use, you
> need to use sp_addlogin or sp_grantlogin (depending on whether it's a
> standard SQL login or a trusted login we're talking about). I think the
> GUI in Management Studio ought to take care of this automatically (ie.
> use different commands depending on the server version) but if you want
> to use T-SQL yourself then you need to write the correct statements for
> the SQL version the server is running.
> --
> *mike hodgson*
> http://sqlnerd.blogspot.com
>
> eshhyasi@.gmail.com wrote:
>
> --060001040307010407040902
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 2029
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
> </head>
> <body bgcolor="#ffffff" text="#000000">
> <tt>Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL inst
ance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?<br>
> <br>
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new
> logins to a SQL 2000 instance, regardless of which SQL client tool you
> use, you need to use sp_addlogin or sp_grantlogin (depending on whether
> it's a standard SQL login or a trusted login we're talking about).&nbs
p; I
> think the GUI in Management Studio ought to take care of this
> automatically (ie. use different commands depending on the server
> version) but if you want to use T-SQL yourself then you need to write
> the correct statements for the SQL version the server is running.<br>
> </tt>
> <div class="moz-signature">
> <title></title>
> <meta http-equiv="Content-Type" content="text/html; ">
> <p><span lang="en-au"><font face="Tahoma" size="2">--<br>
> </font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
> hodgson</font></span></b><span lang="en-au"><br>
> <font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com">http://sqlner
d.blogspot.com</a></font></span>
> </p>
> </div>
> <br>
> <br>
> <a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:eshhyasi@.gmail.com">eshhy
asi@.gmail.com</a> wrote:
> <blockquote
> cite="mid1151465632.155321.236760@.m73g2000cwd.googlegroups.com"
> type="cite">
> <pre wrap="">Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
> </pre>
> </blockquote>
> </body>
> </html>
> --060001040307010407040902--|||Hi,
I am using Sql server 2005 and when I try to create a new login from
the sql server mgmnt studio, I get this error.
Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'LOGIN'.
I have logged in as "sa" and the login statement that I am using is:
CREATE LOGIN test WITH PASSWORD = 'beta'
The product version is 8.00.2039.
Anybody knows whats wrong'
Thanks for helping out.
Esha|||Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
instance by the sounds of it. What's the version of the SQL instance
(run "SELECT SERVERPROPERTY('ProductVersion')")?
CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
to a SQL 2000 instance, regardless of which SQL client tool you use, you
need to use sp_addlogin or sp_grantlogin (depending on whether it's a
standard SQL login or a trusted login we're talking about). I think the
GUI in Management Studio ought to take care of this automatically (ie.
use different commands depending on the server version) but if you want
to use T-SQL yourself then you need to write the correct statements for
the SQL version the server is running.
*mike hodgson*
http://sqlnerd.blogspot.com
eshhyasi@.gmail.com wrote:
>Hi,
>I am using Sql server 2005 and when I try to create a new login from
>the sql server mgmnt studio, I get this error.
>Msg 170, Level 15, State 1, Line 1
>Line 1: Incorrect syntax near 'LOGIN'.
>I have logged in as "sa" and the login statement that I am using is:
>CREATE LOGIN test WITH PASSWORD = 'beta'
>The product version is 8.00.2039.
>Anybody knows whats wrong'
>Thanks for helping out.
>Esha
>
>|||Even you are using Management Studio, you are connected to a SQL Server 2000
instance (according to your product version). You should connect to a SQL
Server 2005 instance to use create login.
Ben Nevarez, MCDBA, OCP
Database Administrator
"eshhyasi@.gmail.com" wrote:
> Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
>|||Thanks Mike,
I used sp_addlogin and it worked.
Thanks a lot,
Esha
Mike Hodgson wrote:
> Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL instance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
> to a SQL 2000 instance, regardless of which SQL client tool you use, you
> need to use sp_addlogin or sp_grantlogin (depending on whether it's a
> standard SQL login or a trusted login we're talking about). I think the
> GUI in Management Studio ought to take care of this automatically (ie.
> use different commands depending on the server version) but if you want
> to use T-SQL yourself then you need to write the correct statements for
> the SQL version the server is running.
> --
> *mike hodgson*
> http://sqlnerd.blogspot.com
>
> eshhyasi@.gmail.com wrote:
>
> --060001040307010407040902
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 2029
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
> </head>
> <body bgcolor="#ffffff" text="#000000">
> <tt>Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL inst
ance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?<br>
> <br>
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new
> logins to a SQL 2000 instance, regardless of which SQL client tool you
> use, you need to use sp_addlogin or sp_grantlogin (depending on whether
> it's a standard SQL login or a trusted login we're talking about).&nbs
p; I
> think the GUI in Management Studio ought to take care of this
> automatically (ie. use different commands depending on the server
> version) but if you want to use T-SQL yourself then you need to write
> the correct statements for the SQL version the server is running.<br>
> </tt>
> <div class="moz-signature">
> <title></title>
> <meta http-equiv="Content-Type" content="text/html; ">
> <p><span lang="en-au"><font face="Tahoma" size="2">--<br>
> </font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
> hodgson</font></span></b><span lang="en-au"><br>
> <font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com">http://sqlner
d.blogspot.com</a></font></span>
> </p>
> </div>
> <br>
> <br>
> <a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:eshhyasi@.gmail.com">eshhy
asi@.gmail.com</a> wrote:
> <blockquote
> cite="mid1151465632.155321.236760@.m73g2000cwd.googlegroups.com"
> type="cite">
> <pre wrap="">Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
> </pre>
> </blockquote>
> </body>
> </html>
> --060001040307010407040902--|||Thanks Mike,
I used sp_addlogin and it worked.
Thanks a lot,
Esha
Mike Hodgson wrote:
> Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL instance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
> to a SQL 2000 instance, regardless of which SQL client tool you use, you
> need to use sp_addlogin or sp_grantlogin (depending on whether it's a
> standard SQL login or a trusted login we're talking about). I think the
> GUI in Management Studio ought to take care of this automatically (ie.
> use different commands depending on the server version) but if you want
> to use T-SQL yourself then you need to write the correct statements for
> the SQL version the server is running.
> --
> *mike hodgson*
> http://sqlnerd.blogspot.com
>
> eshhyasi@.gmail.com wrote:
>
> --060001040307010407040902
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 2029
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
> </head>
> <body bgcolor="#ffffff" text="#000000">
> <tt>Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL inst
ance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?<br>
> <br>
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new
> logins to a SQL 2000 instance, regardless of which SQL client tool you
> use, you need to use sp_addlogin or sp_grantlogin (depending on whether
> it's a standard SQL login or a trusted login we're talking about).&nbs
p; I
> think the GUI in Management Studio ought to take care of this
> automatically (ie. use different commands depending on the server
> version) but if you want to use T-SQL yourself then you need to write
> the correct statements for the SQL version the server is running.<br>
> </tt>
> <div class="moz-signature">
> <title></title>
> <meta http-equiv="Content-Type" content="text/html; ">
> <p><span lang="en-au"><font face="Tahoma" size="2">--<br>
> </font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
> hodgson</font></span></b><span lang="en-au"><br>
> <font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com">http://sqlner
d.blogspot.com</a></font></span>
> </p>
> </div>
> <br>
> <br>
> <a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:eshhyasi@.gmail.com">eshhy
asi@.gmail.com</a> wrote:
> <blockquote
> cite="mid1151465632.155321.236760@.m73g2000cwd.googlegroups.com"
> type="cite">
> <pre wrap="">Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
> </pre>
> </blockquote>
> </body>
> </html>
> --060001040307010407040902--
Error Creating DSN using odbcconf.exe for SQL Server
hi there
i want to create a DSN using command line arguments,with Trusted connection=no, Login name= sa password=*******
i try creating like this
C:\>odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=no |Database=dm"}
this work fine, but when i specify the login id & password as
C:\>odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=no|loginid=sa|password=sysadm|Database=dm"}
this throws an error as
CONFIGSYSDSN: Unable to create a data source for the 'SQL Server' Driver: Invalid keyword-value pair with error code :2147467259
I too try the
loginID, login id, login , user, userid, uid
Password, pwd
and many more...
all these throws same error.
Please help me.
Regards,
Thnaks.
Gurpreet S. Gill
Persistence of login credentials in a DSN is not supported (it's insecure). Using trusted connection would be the best way to achieve connecting without specifying credentials since the logged on user credentials is used for authenticating to the server. The command below should create the DSN for you.
odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=Yes|Database=dm"}
Hope this helps
Uwa.
|||Thanks Uwa Agbonile
this is right, that it is insecure, is there any way to do that, i mean the registry (regedit), or else?
Regards,
Thanks.
Gurpreet S. Gill
|||Like I suggested already, one secure way to do this is to use integrated security. If you must use SQL Server authentication your options depend on the circumstances of your application. You could code the application to request the credentials from the user or retrieve them from a location you know to be secure.
You could also embed the credentials as part of the connection string directly in your application but again this is insecure and not recommended.
Regards,
Uwa.
|||Uwa--
I understand, what you want to say.
Thanks for your help.
Regards
Gurpreet S. Gill
Error Creating DSN using odbcconf.exe for SQL Server
hi there
i want to create a DSN using command line arguments,with Trusted connection=no, Login name= sa password=*******
i try creating like this
C:\>odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=no |Database=dm"}
this work fine, but when i specify the login id & password as
C:\>odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=no|loginid=sa|password=sysadm|Database=dm"}
this throws an error as
CONFIGSYSDSN: Unable to create a data source for the 'SQL Server' Driver: Invalid keyword-value pair with error code :2147467259
I too try the
loginID, login id, login , user, userid, uid
Password, pwd
and many more...
all these throws same error.
Please help me.
Regards,
Thnaks.
Gurpreet S. Gill
Persistence of login credentials in a DSN is not supported (it's insecure). Using trusted connection would be the best way to achieve connecting without specifying credentials since the logged on user credentials is used for authenticating to the server. The command below should create the DSN for you.
odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=Yes|Database=dm"}
Hope this helps
Uwa.
|||Thanks Uwa Agbonile
this is right, that it is insecure, is there any way to do that, i mean the registry (regedit), or else?
Regards,
Thanks.
Gurpreet S. Gill
|||Like I suggested already, one secure way to do this is to use integrated security. If you must use SQL Server authentication your options depend on the circumstances of your application. You could code the application to request the credentials from the user or retrieve them from a location you know to be secure.
You could also embed the credentials as part of the connection string directly in your application but again this is insecure and not recommended.
Regards,
Uwa.
|||Uwa--
I understand, what you want to say.
Thanks for your help.
Regards
Gurpreet S. Gill
Error creating DB with numerical name?
latest patches.
When I try to create a database with a numerical name (such as "12345"), I'm
getting an Incorrect Syntax error in code code (script) and in the Query
Analyzer. However, EntMgr will create it perfectly...
I just know this is going to be something simple, but derned if I can see
it... any ideas' :)
Thanks,
JackHi Jack
Put square brackets around any identifiers that don't follow the normal
rules for identifiers. (The normal rule for the identifies says they must
start with a letter, or one of a very few special chars, but not numbers.)
CREATE DATABASE [12345]
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Jack Black" <jackblackisback@.hotmail.com> wrote in message
news:OKH7EKusDHA.2932@.TK2MSFTNGP11.phx.gbl...
> Hi, all!! Using SQL 2000, latest patches and such; running under Win2k,
> latest patches.
> When I try to create a database with a numerical name (such as "12345"),
I'm
> getting an Incorrect Syntax error in code code (script) and in the Query
> Analyzer. However, EntMgr will create it perfectly...
> I just know this is going to be something simple, but derned if I can see
> it... any ideas' :)
> Thanks,
> Jack
>|||To add to Kalen's comments:
You might want to re-think this. Most developers stay away from names that doesn't confirms to the
rules for standard identifiers, as you have to always mess about with delimiters for the name when
you work against the data (and sooner or later you come across this great tools which doesn't
support delimited identifiers).
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Jack Black" <jackblackisback@.hotmail.com> wrote in message
news:OKH7EKusDHA.2932@.TK2MSFTNGP11.phx.gbl...
> Hi, all!! Using SQL 2000, latest patches and such; running under Win2k,
> latest patches.
> When I try to create a database with a numerical name (such as "12345"), I'm
> getting an Incorrect Syntax error in code code (script) and in the Query
> Analyzer. However, EntMgr will create it perfectly...
> I just know this is going to be something simple, but derned if I can see
> it... any ideas' :)
> Thanks,
> Jack
>
Error Creating CLR UDF
Hi:
I am trying to create a CLR UDF in SQL 2005 and cosnistently run into the following error. What am I doing wrong?. Please correct me and show me the right way of doing this.
Msg 6551, Level 16, State 2, Procedure EmailSplitter, Line 3
CREATE FUNCTION for "EmailSplitter" failed because T-SQL and CLR types for return value do not match.
Here is what I am trying to achieve. Split a Email field in the database. For that I am trying to return an array using C# and then trying to call the UDF for the C#.
--1).CLR Code. (EmailSpitter.cs)
using System;
using System.Collections.Generic;
using System.Text;
namespace SQLTools
{
public class EmailSplitter
{
public static string[] Parse(string data)
{
string[] columnData;
string[] separators = new string[1];
separators[0] = " ";
if (data != null)
{
columnData = data.Split(separators, StringSplitOptions.None);
return columnData;
}
return null;
}
}
}
--2). Assembly code.
CREATE Assembly SQLArrayBuilder
FROM 'E:\CLR\EmailSplitter\bin\Debug\EmailSplitter.dll'
WITH PERMISSION_SET=SAFE
Select * from sys.assemblies.
--3). Create the function.
CREATE Function dbo.EmailSplitter
(@.EmailString NVARCHAR(4000))
RETURNS VARCHAR(4000)
AS
EXTERNAL NAME SQLArrayBuilder.[SQLTools.EmailSplitter].Parse
Run into the error:
Msg 6551, Level 16, State 2, Procedure EmailSplitter, Line 3
CREATE FUNCTION for "EmailSplitter" failed because T-SQL and CLR types for return value do not match.
Please help me.
Thank you very much.
AK
Your CREATE FUNCTION returns a string, but your CLR function returns an array of strings, that is why you are getting an error. If you want to return an array of strings you will have to create a CLR function that returns an IEnumerable object and define a table valued function in T-SQL. Look up CLR table valued functions in the BOL for the details.
Dan
Error Creating an Indexed View.
I have trouble creating an indexed view, sample scripts attached. Any help/workaround much appreciated. Thx.
Create Sample Table
Create Table dbo.Test_IndexTable
(NumericSchoolDBN int NOT NULL,
SchoolYear smallint NOT NULL,
TermId tinyint NOT NULL,
CourseCode Varchar(10) NOT NULL,
SectionID smallint NOT NULL,
PeriodID smallint NOT NULL,
CycleDay smallint NOT NULL,
PRIMARY KEY
(
NumericSchoolDBN, SchoolYear,TermId,CourseCode,SectionID,PeriodID, CycleDay
)
)
Populate Sample Table
Insert Into Test_IndexTable
Values (1010448, 2005, 1, 'AC3', 1, 3, 0)
Insert Into Test_IndexTable
Values (1010448, 2005, 1, 'AC3', 1, 3, 1)
Insert Into Test_IndexTable
Values (1010448, 2005, 1, 'AC3', 1, 3, 2)
Insert Into Test_IndexTable
Values (1010448, 2005, 1, 'AC3', 1, 3, 3)
Insert Into Test_IndexTable
Values (1010448, 2005, 1, 'AC3', 1, 3, 4)
Insert Into Test_IndexTable
Values (1010448, 2005, 1, 'AC3', 2, 7, 0)
Insert Into Test_IndexTable
Values (1010448, 2005, 1, 'AC3', 2, 7, 1)
Insert Into Test_IndexTable
Values (1010448, 2005, 1, 'AC3', 2, 7, 2)
Insert Into Test_IndexTable
Values (1010448, 2005, 1, 'AC3', 2, 7, 3)
Insert Into Test_IndexTable
Values (1010448, 2005, 1, 'AC3', 2, 7, 4)
Insert Into Test_IndexTable
Values (1010448, 2005, 1, 'AC3', 3, 8, 0)
Insert Into Test_IndexTable
Values (1010448, 2005, 1, 'AC3', 3, 8, 1)
Insert Into Test_IndexTable
Values (1010448, 2005, 1, 'AC3', 3, 8, 2)
Insert Into Test_IndexTable
Values (1010448, 2005, 1, 'AC3', 3, 8, 3)
Insert Into Test_IndexTable
Values (1010448, 2005, 1, 'AC3', 3, 8, 4)
Create View
--Set the options to support indexed views.
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING,ANSI_WARNINGS,CONCAT_NULL_YIELDS_NULL,ARITHABORT,QUOTED_IDENTIFIER,ANSI_NULLS ON
GO
-- Drop View dbo.Test_IndexTable_InxVw
-- Create view.
CREATE VIEW dbo.Test_IndexTable_InxVw
WITH SCHEMABINDING
AS
select NumericSchoolDBN, SchoolYear, TermId, CourseCode, SectionID, PeriodID,
sum(power(2, cycleday)) As AsIS_CycleDayBinaryString,
COUNT_BIG(*) As NumofRows
From dbo.Test_IndexTable
Group By NumericSchoolDBN, SchoolYear, TermId, CourseCode, SectionID, PeriodID
GO
if ObjectProperty(object_id('Test_IndexTable_InxVw'),'IsIndexable') = 1
Print 'Test_IndexTable_InxVw Is Indexable'
Else
Print 'Test_IndexTable_InxVw Is NOT Indexable'
--Create index on the view.
CREATE UNIQUE CLUSTERED INDEX UCX_Test_IndexTable_InxVw ON dbo.Test_IndexTable_InxVw (NumericSchoolDBN, SchoolYear, TermId, CourseCode, SectionID, PeriodID)
GO
Error…
Server: Msg 8662, Level 16, State 1, Line 1
An index cannot be created on the view 'Test_IndexTable_InxVw' because the view definition includes an unknown value (the sum of a nullable expression).
Is a potential option here to leave out the SUM column and create the indexed view without this quantity and iff this quantity is needed it can then be computed as needed?|||It beats the purpose i.e. the only reason I would like to create an indexed view it to be able to represent it in a binary/string value based on the sum function.|||I am not a big fan of "encoding" values like this, not for the least reason that if you have duplicates it means you get spurious results, but you could do this like:
case cycleday
when 0 then 1
when 1 then 2
when 2 then 4
when 3 then 8
when 4 then 16
when 5 then 32 else -999 end
The else -999 just ensures Non-nullability, and a way out of whack answer to enact some error handling.
|||Are you running this on SQL Server 2000? You have hit a limitation there in terms of expression evaluation. You can workaround by creating a computed column on the table like:
alter table dbo.Test_IndexTable add CycleDay_p as isnull(power(2, CycleDay), 0)
And using it in the indexed view definition like:
CREATE VIEW dbo.Test_IndexTable_InxVw
WITH SCHEMABINDING
AS
select NumericSchoolDBN, SchoolYear, TermId, CourseCode, SectionID, PeriodID,
sum(CycleDay_p) As AsIS_CycleDayBinaryString,
COUNT_BIG(*) As NumofRows
From dbo.Test_IndexTable
Group By NumericSchoolDBN, SchoolYear, TermId, CourseCode, SectionID, PeriodID
GO
Btw, you should be able to use the ISNULL expression directly in the indexed view in SQL Server 2005. I tried it there and it works fine.
error creating a new pull subscription
Using RMO, VB.net 2005 and SQL 2005
Trying to create a new pull subscription programatically - merge HTTPS ovfr the internet
Works fine when within out internal network - but when externally there is a problem....
I'm using the code from BOL - using their values - but pretty much cut and pasted.
' Define the Publisher, publication, and databases.
Dim publicationName As String = "AdvWorksSalesOrdersMerge"
Dim publisherName As String = instanceName
Dim subscriberName As String = instanceName
Dim subscriptionDbName As String = "AdventureWorksReplica"
Dim publicationDbName As String = "AdventureWorks"
Dim hostname As String = "adventure-works\garrett1"
'Create connections to the Publisher and Subscriber.
Dim subscriberConn As ServerConnection = New ServerConnection(subscriberName)
Dim publisherConn As ServerConnection = New ServerConnection(publisherName)
' Create the objects that we need.
Dim publication As MergePublication
Dim subscription As MergePullSubscription
Try
' Connect to the Subscriber.
subscriberConn.Connect()
' Ensure that the publication exists and that
' it supports pull subscriptions.
publication = New MergePublication()
publication.Name = publicationName
publication.DatabaseName = publicationDbName
publication.ConnectionContext = publisherConnThis last line gives me an error:
+ InnerException {"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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"} System.Exception
The server/instance is obviously the name of the internal server / sql instance
What next - yikes - I've got to deliver this tomorrow
thanks as always.
BruceDoes the publisher allow remote connections as per the error message?
If that is the case, use SAC (Surface Area COnfiguration) to enable the remote connections, recycle the SQL server and try connecting again.
To access it Click on Start-->All Programs-->Microsoft SQL Server-->Configuration Tools-->SQL Server Surface Area Configuration-->Surface Area Configuration for Services and Connections-->DataBase Engine-->Remote Connections-->Local and Remote conenctions-->Using both TCP/IP and named pipes.
Then recycle the server|||
Hi
It was already marked as allowing remote connections, but named pipes was not enabled. I enabled named pipes and restarted but not difference. Looking at the code, I can't really see how it could work !
The sample code seems to assume that the server/instance is reachable from the client (unless I'm missing something) - in order to validate the publication.
Given that we are trying to synch via HTTPS and at this point no mention has been made of the URL, isn't the sample code a little bit wrong - again I'm not having the cleverest of weeks so I may be talking rubbish..
Look forward to your feedback
Bruce
|||When you are trying to create a subscription, it does not go through HTTPS. You need a connection to the publisher to first create the subscription. Only the sync uses HTTPS and the IIS machine. Alternatively you could create subscription by any other means and use HTTPS just for synching.You could try something else, like creating a publication on the publisher using similar code and see if your connections to the publisher are going through from the machine you are using.|||Hi
So are you saying that if the machine is not on the network / a trusted connection, in order create a subscription then port 1433/1434 will have to be open ?
I hope not.
thanks
Bruce|||
try to set the subscription as anonymous, otherwise, when the sub.create() was called, it will try to connect to the publisher and setup the subscription entry there, hence the error.
sub.SubscriptionType = SubscriptionOption.Anonymous
Hope this helps.
Thanks
Yunwen
So can I take it when I create the subscription I can set the subscription.syncType to indicate whether I have the initial data ?
Also, one thing I noticed is that after I create the subscription this way (subscriberType being anonymous), that the subscription no longer shows up in the enumeration of the subscriberSubscriptions - is this a bug or is there another way of finding out whether the subscription has been created.....
Dim serverConnection As New ServerConnection(m_subscriberName)serverConnection.Connect()
Dim replicationServer As New ReplicationServer(serverConnection)availableSubscriptions = replicationServer.EnumSubscriberSubscriptions("", Convert.ToInt32(2))
For Each subscriber In availableSubscriptions
... nothing gets returned in the enumeration.....
Next
Thanks again.
Bruce|||
the syncType is actually used to determine if the initial data needed to be downloaded to the subscriber ( please refer to sp_addmergepullsubscription for details ).
regarding with the EnumSubscriberSubscriptions() method, it is equivalent to the sp_MSenumallsubscriptions ( you can give it a try ). if your call this method with the publisher, in this case, you will not get the anonymous subscriptions. you can call this method on a subscriber server to get the info you need. Please let us know if the RMO method returns anything different from what you get from the SP call. Thanks
Hope this helps.
Yunwen
I ransp_MSenumallsubscriptions on the subscriber and it returned no entries. As did EnumSubscriberSubscriptions()
However, when I was creating the subscription on the internal network and was able to connect to the publisher prior to creating the subscription, then EnumSubscriberSubscriptions() did return the subscription details.....
I am executing this method against the subscriber (as per the code in my previous post)
thanks
Bruce|||
Thanks Bruce for reminding me to take a careful look at your code. This actually turn out to be a bug in replication( at least it is a document bug). For now, you can try to pass in 3 for the subscriptionType in EnumSubscriberSubscriptions() to get the subscription info returned. Similarly, you need to specify @.subscription_type='both' for the SP call.
Sorry for the inconvenience. Please let us know if there is any other issues you encountered in your application.
Thanks again for helping us to make it better.
Yunwen
error creating a new pull subscription
Using RMO, VB.net 2005 and SQL 2005
Trying to create a new pull subscription programatically - merge HTTPS ovfr the internet
Works fine when within out internal network - but when externally there is a problem....
I'm using the code from BOL - using their values - but pretty much cut and pasted.
' Define the Publisher, publication, and databases.
Dim publicationName As String = "AdvWorksSalesOrdersMerge"
Dim publisherName As String = instanceName
Dim subscriberName As String = instanceName
Dim subscriptionDbName As String = "AdventureWorksReplica"
Dim publicationDbName As String = "AdventureWorks"
Dim hostname As String = "adventure-works\garrett1"
'Create connections to the Publisher and Subscriber.
Dim subscriberConn As ServerConnection = New ServerConnection(subscriberName)
Dim publisherConn As ServerConnection = New ServerConnection(publisherName)
' Create the objects that we need.
Dim publication As MergePublication
Dim subscription As MergePullSubscription
Try
' Connect to the Subscriber.
subscriberConn.Connect()
' Ensure that the publication exists and that
' it supports pull subscriptions.
publication = New MergePublication()
publication.Name = publicationName
publication.DatabaseName = publicationDbName
publication.ConnectionContext = publisherConnThis last line gives me an error:
+ InnerException {"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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"} System.Exception
The server/instance is obviously the name of the internal server / sql instance
What next - yikes - I've got to deliver this tomorrow
thanks as always.
BruceDoes the publisher allow remote connections as per the error message?
If that is the case, use SAC (Surface Area COnfiguration) to enable the remote connections, recycle the SQL server and try connecting again.
To access it Click on Start-->All Programs-->Microsoft SQL Server-->Configuration Tools-->SQL Server Surface Area Configuration-->Surface Area Configuration for Services and Connections-->DataBase Engine-->Remote Connections-->Local and Remote conenctions-->Using both TCP/IP and named pipes.
Then recycle the server|||
Hi
It was already marked as allowing remote connections, but named pipes was not enabled. I enabled named pipes and restarted but not difference. Looking at the code, I can't really see how it could work !
The sample code seems to assume that the server/instance is reachable from the client (unless I'm missing something) - in order to validate the publication.
Given that we are trying to synch via HTTPS and at this point no mention has been made of the URL, isn't the sample code a little bit wrong - again I'm not having the cleverest of weeks so I may be talking rubbish..
Look forward to your feedback
Bruce
|||When you are trying to create a subscription, it does not go through HTTPS. You need a connection to the publisher to first create the subscription. Only the sync uses HTTPS and the IIS machine. Alternatively you could create subscription by any other means and use HTTPS just for synching.You could try something else, like creating a publication on the publisher using similar code and see if your connections to the publisher are going through from the machine you are using.|||Hi
So are you saying that if the machine is not on the network / a trusted connection, in order create a subscription then port 1433/1434 will have to be open ?
I hope not.
thanks
Bruce|||
try to set the subscription as anonymous, otherwise, when the sub.create() was called, it will try to connect to the publisher and setup the subscription entry there, hence the error.
sub.SubscriptionType = SubscriptionOption.Anonymous
Hope this helps.
Thanks
Yunwen
So can I take it when I create the subscription I can set the subscription.syncType to indicate whether I have the initial data ?
Also, one thing I noticed is that after I create the subscription this way (subscriberType being anonymous), that the subscription no longer shows up in the enumeration of the subscriberSubscriptions - is this a bug or is there another way of finding out whether the subscription has been created.....
Dim serverConnection As New ServerConnection(m_subscriberName)serverConnection.Connect()
Dim replicationServer As New ReplicationServer(serverConnection)availableSubscriptions = replicationServer.EnumSubscriberSubscriptions("", Convert.ToInt32(2))
For Each subscriber In availableSubscriptions
... nothing gets returned in the enumeration.....
Next
Thanks again.
Bruce|||
the syncType is actually used to determine if the initial data needed to be downloaded to the subscriber ( please refer to sp_addmergepullsubscription for details ).
regarding with the EnumSubscriberSubscriptions() method, it is equivalent to the sp_MSenumallsubscriptions ( you can give it a try ). if your call this method with the publisher, in this case, you will not get the anonymous subscriptions. you can call this method on a subscriber server to get the info you need. Please let us know if the RMO method returns anything different from what you get from the SP call. Thanks
Hope this helps.
Yunwen
I ran sp_MSenumallsubscriptions on the subscriber and it returned no entries. As did EnumSubscriberSubscriptions()
However, when I was creating the subscription on the internal network and was able to connect to the publisher prior to creating the subscription, then EnumSubscriberSubscriptions() did return the subscription details.....
I am executing this method against the subscriber (as per the code in my previous post)
thanks
Bruce|||
Thanks Bruce for reminding me to take a careful look at your code. This actually turn out to be a bug in replication( at least it is a document bug). For now, you can try to pass in 3 for the subscriptionType in EnumSubscriberSubscriptions() to get the subscription info returned. Similarly, you need to specify @.subscription_type='both' for the SP call.
Sorry for the inconvenience. Please let us know if there is any other issues you encountered in your application.
Thanks again for helping us to make it better.
Yunwen
Error Creating a new cluster on windows 2003 Server EE SP1
I'm trying to install cluster service on a Windows 2003 Server Enterprise
Edition SP1.
I've configured Network and Disk.
When I try to create a new a new cluster for the first node, I receive this
error:
Found an existing cluster or node with the name "pippo.mydomain.com". Choose
another name.
A cluster cannot be created with the specified cluster name because that
cluster name is already in use. Specify a different name for the cluster.
I try to change netbios name but it does nothing.(NETBIOS name pippo does
not exsist in mydomain.....i try to use net view \\pippo)
Can You help Me ?
Tank you.
Have you tried to create this cluster before? Chances are that you still
have a DNS entry that needs to be flushed. All Address and Pointer records
for this host/IP address combination need to be flushed before you try and
reinstall.
Sincerely,
Anthony Thomas
"AS" <AS@.discussions.microsoft.com> wrote in message
news:7E9BC8F9-AA47-4D21-B7CF-71E876B9E6F1@.microsoft.com...
Hi,
I'm trying to install cluster service on a Windows 2003 Server Enterprise
Edition SP1.
I've configured Network and Disk.
When I try to create a new a new cluster for the first node, I receive this
error:
Found an existing cluster or node with the name "pippo.mydomain.com". Choose
another name.
A cluster cannot be created with the specified cluster name because that
cluster name is already in use. Specify a different name for the cluster.
I try to change netbios name but it does nothing.(NETBIOS name pippo does
not exsist in mydomain.....i try to use net view \\pippo)
Can You help Me ?
Tank you.
Error create a second independent transaction inside a CLR stored procedure?
But I need to commit some data in every case. So I need to create a second transaction which is independent from the calling transaction.
What is the best way to do this inside a CLR procedure?
Thanx a lot
Hi!
Create another connection to the server and create a transaction on this second connection. Please note that since your main connection is inproc (“context connection=true” in the connection string), the second connection should be non-inproc (network. Of cause, you can connect to the same server.).
|||Thank you,I tried this already. But I got an error when I call BeginTransaction on the second connection. When I remember correctly it as "Transcation already in use by another session". I call the procedure from t-sql inside a begin tran block
Any idea about that?
I will try to build a small example an post it here.|||
Hello,
I made a small example to reproduce the error.
CLR procedure
<Microsoft.SqlServer.Server.SqlProcedure()> _
Public Shared Sub Test(ByVal sConnectString As String)
Dim t As SqlClient.SqlTransaction = Nothing
Dim c As SqlClient.SqlConnection = Nothing
c = New SqlClient.SqlConnection(sConnectString)
c.Open()
t = c.BeginTransaction()
t.Commit()
c.Close()
End Sub
T-SQL caller:
begin tran
execute Test 'Server=(local);database=cpwerx;user Id=sa;password=xyz'
commit tran
Error:
A .NET Framework error occurred during execution of user defined routine or aggregate 'Cas':
System.Data.SqlClient.SqlException: Transaction context in use by another session.
System.Data.SqlClient.SqlException:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte[] buffer, TransactionManagerRequestType request, String transactionName, TransactionManagerIsolationLevel isoLevel, Int32 timeout, SqlInternalTransaction transaction, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.PropagateTransactionCookie(Byte[] cookie)
at System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx)
at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
at System.Data.SqlClient.SqlInternalConnectionTds.Activate(Transaction transaction)
at System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
Hi!
Modify your connection string so that it has "Enlist=false" in it. Otherwise the connection inherits current transaction.
More on "Enlist" option is in doc on SqlConnection.ConnectionString property
|||Than you!
We've been stuck for a week. We had a .Net CLR stored procedure that worked locally but, failed when invoked remotely. That connection string setting is exactly what we needed.
-Joe