Showing posts with label write. Show all posts
Showing posts with label write. Show all posts

Friday, March 30, 2012

How can I control the user to SQL Server?

Hi,
I want to control on SQL Server 2000 users. I use C# language. My scenario
that have SQL Server 2000 on my user "CIMBOM". How can i write code there
user for control username and password. May be prepared sql function?
i hope explain my problem :)
too thanks...Hi
If you check out the topic "How to allow access by granting permissions" in
Books online it may help you to understand the how different logins can have
different access level.
Also you may want to look at the IS_MEMBER function or the other "Security
Functions" available if you need to control access to specific data within a
given table.
John
"Gürol Ayanlar" wrote:

> Hi,
> I want to control on SQL Server 2000 users. I use C# language. My scenario
> that have SQL Server 2000 on my user "CIMBOM". How can i write code there
> user for control username and password. May be prepared sql function?
> i hope explain my problem :)
> too thanks...

How can I connect to a remote sql server using windows authentication?

It is simple

1- I open the Sql Server 2005 Management Studio

2- I select Windows Authentication from the drop down.

3- I cannot write the user name and password, it chooses the default once, the one I am logged in with!

But I am in a virtual machine outside the domain controller, I can access shares on machines that are on the domain controller, thanks to the file sharing of windows, but I cannot login to sql server, thanks to a meaningless restriction on that dialog :-)

Now, how can I still use the Windows Authentication and login, how can I avoid the sql server authentication?

If you are outside domain, then you should use SQL Authentication.|||

Ok, then why the text boxes for the user name and password are still there if I choose the Windows authentication, and the text boxes have the user name already filled in, and all are disabled.

What is the point of having those there? In my case, I was trying to find a way to enable them from the settings; I guess just a false hope.

And why cannot I use the windows authentication? NTFS does allow me to do it and access the file system from outside the domain using windows authentication against the domain, what does make sql server more special?

|||

The reason for the textbox is just to let you know which Windows account is being used to connect to SQL Server using Windows authentication. To access SQL Server using SQL authentication, click the Authentication drop-down to see the SQL Server Authentication option. You'll see the User name and Password textboxes enabled.

If you want to use Windows authentication, the easiest way is to join your SQL Server to your domain.

|||

Thank you for the help, but I know how to use the SQL Server authentication, and the SQL Server is the development server and it is on the domain.

My virtual machine is the development machine, it is a virtual machine and it cannot join the domain, it must stay as it is, the real machine is on the domain, but the virtual machine that I am trying to use is not.

From the virtual machine I can do lots of things, including accessing the file system and the intranet sites on the domain, using the domain authentication box, or cached credentials, but I cannot do that with the SQL Server.

|||

if you want an nt authentication

then you must promote your virtual machine to a domain controller

Wednesday, March 21, 2012

How can I alter the parameters pane design?

Hi all,
I was wondering if it's possible to somehow change the parameters pane
design. My problem is that some of the reports we write are in right-
to-left languages (hebrew, arabic). We can change the whole report so
it's right-to-left, but the parameters stick to the left.
Is there any way I can change this?
Thanks in advance,
R. GreenI don't believe there is a good way to do it.
you can write your own parameter controls and just interface RS with
SOAP calls.
people who need to use asp 1.1(no report viewer control) have had to
do this for instance.|||Hi Tom,
Thanks for your prompt answer.
I didn't think there's a way to do it too, until I saw Reporting
Services 2000 and the parameters *were* right-to-left when viewing a
hebrew report.
Perhaps I can somehow use CSS to change the parameters pane design?
On Jul 3, 10:16 pm, tomk...@.gmail.com wrote:
> I don't believe there is a good way to do it.
> you can write your own parameter controls and just interface RS with
> SOAP calls.
> people who need to use asp 1.1(no report viewer control) have had to
> do this for instance.sql

Monday, March 12, 2012

How can a client application get serial number of SQL server installation

I want to write an application, which will be validated by serial number.
This serial number has to be dependent on serial number, which
is used during SQL Server installation.
In other words - licence key for my client application has to be dependent
on server.
How can my client application get server validation key or another server
specific information (such harddisk serial number of the server, network
adapter card serial number etc)?
Message posted via http://www.sqlmonster.com
You can get the serial number of the SQL Server installation from the
registry key:
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\80\Registration\CD_KEY.
Jacco Schalkwijk
SQL Server MVP
"Jaroslav Sedlak via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:ead3ca55b3b1403b9d1d532fad4eb192@.SQLMonster.c om...
>I want to write an application, which will be validated by serial number.
> This serial number has to be dependent on serial number, which
> is used during SQL Server installation.
> In other words - licence key for my client application has to be dependent
> on server.
> How can my client application get server validation key or another server
> specific information (such harddisk serial number of the server, network
> adapter card serial number etc)?
> --
> Message posted via http://www.sqlmonster.com
|||Yes, you are right. But this doesn't solve my problem. This registry key
can be read only by an application, which runs on the server.
I want to get licence key of SQL server in application which runs not on
the machine server but on the client machine.
Message posted via http://www.sqlmonster.com
|||You can access the registry from within SQL Server with the undocumented
extended procedure xp_regread. See
http://www.databasejournal.com/featu...le.php/1441251
for more details.
Jacco Schalkwijk
SQL Server MVP
"Jaroslav Sedlak via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:a921286e80de46b891c501f50382388a@.SQLMonster.c om...
> Yes, you are right. But this doesn't solve my problem. This registry key
> can be read only by an application, which runs on the server.
> I want to get licence key of SQL server in application which runs not on
> the machine server but on the client machine.
> --
> Message posted via http://www.sqlmonster.com

How can a client application get serial number of SQL server installation

I want to write an application, which will be validated by serial number.
This serial number has to be dependent on serial number, which
is used during SQL Server installation.
In other words - licence key for my client application has to be dependent
on server.
How can my client application get server validation key or another server
specific information (such harddisk serial number of the server, network
adapter card serial number etc)?
Message posted via http://www.droptable.comYou can get the serial number of the SQL Server installation from the
registry key:
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\80\Registration\CD_KEY.
Jacco Schalkwijk
SQL Server MVP
"Jaroslav Sedlak via droptable.com" <forum@.droptable.com> wrote in message
news:ead3ca55b3b1403b9d1d532fad4eb192@.SQ
droptable.com...
>I want to write an application, which will be validated by serial number.
> This serial number has to be dependent on serial number, which
> is used during SQL Server installation.
> In other words - licence key for my client application has to be dependent
> on server.
> How can my client application get server validation key or another server
> specific information (such harddisk serial number of the server, network
> adapter card serial number etc)?
> --
> Message posted via http://www.droptable.com|||Yes, you are right. But this doesn't solve my problem. This registry key
can be read only by an application, which runs on the server.
I want to get licence key of SQL server in application which runs not on
the machine server but on the client machine.
Message posted via http://www.droptable.com|||You can access the registry from within SQL Server with the undocumented
extended procedure xp_regread. See
http://www.databasejournal.com/feat...cle.php/1441251
for more details.
Jacco Schalkwijk
SQL Server MVP
"Jaroslav Sedlak via droptable.com" <forum@.droptable.com> wrote in message
news:a921286e80de46b891c501f50382388a@.SQ
droptable.com...
> Yes, you are right. But this doesn't solve my problem. This registry key
> can be read only by an application, which runs on the server.
> I want to get licence key of SQL server in application which runs not on
> the machine server but on the client machine.
> --
> Message posted via http://www.droptable.com

How can a client application get serial number of SQL server installation

I want to write an application, which will be validated by serial number.
This serial number has to be dependent on serial number, which
is used during SQL Server installation.
In other words - licence key for my client application has to be dependent
on server.
How can my client application get server validation key or another server
specific information (such harddisk serial number of the server, network
adapter card serial number etc)?
--
Message posted via http://www.sqlmonster.comYou can get the serial number of the SQL Server installation from the
registry key:
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\80\Registration\CD_KEY.
--
Jacco Schalkwijk
SQL Server MVP
"Jaroslav Sedlak via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:ead3ca55b3b1403b9d1d532fad4eb192@.SQLMonster.com...
>I want to write an application, which will be validated by serial number.
> This serial number has to be dependent on serial number, which
> is used during SQL Server installation.
> In other words - licence key for my client application has to be dependent
> on server.
> How can my client application get server validation key or another server
> specific information (such harddisk serial number of the server, network
> adapter card serial number etc)?
> --
> Message posted via http://www.sqlmonster.com|||Yes, you are right. But this doesn't solve my problem. This registry key
can be read only by an application, which runs on the server.
I want to get licence key of SQL server in application which runs not on
the machine server but on the client machine.
--
Message posted via http://www.sqlmonster.com|||You can access the registry from within SQL Server with the undocumented
extended procedure xp_regread. See
http://www.databasejournal.com/features/mssql/article.php/1441251
for more details.
--
Jacco Schalkwijk
SQL Server MVP
"Jaroslav Sedlak via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:a921286e80de46b891c501f50382388a@.SQLMonster.com...
> Yes, you are right. But this doesn't solve my problem. This registry key
> can be read only by an application, which runs on the server.
> I want to get licence key of SQL server in application which runs not on
> the machine server but on the client machine.
> --
> Message posted via http://www.sqlmonster.com

Friday, March 9, 2012

How ASP into ASP.NET with SQL server 2000

Dear All,
I'm new on ASP.NET, now trying convert ASP with SQL 2000 into ASP.NET SQL 2000 server.
I facing a problem while read, write, update the SQL command.
like,
rs.open("Select * from tableA"),ocoon, permission,permission
If rs.eof then
rs.addnew()
rs.column1 = "1"
else
rs.column2 = "2"
rs.column3 = "3"
rs.update()
end if
rs.close()
set rs = nothing
this is how to change into ASP.NET with SQL selection and updating command??
Regards,
I would recommend reading up some articles on Data Access in ASP.NET. There are some Tutorials on this site.

Friday, February 24, 2012

hotbackup on ,2000 sql server

have to do hotbackup on ,2000 sql server
so that anytime i have 2 sql server; we just write to one server and other as live backup
whats the best strategy ??
20 gb/ 20 user
will distributer/subscirber do the needfule ?
does it need a DTS/SNAp shot versionIt all depends how much you can efford to loose !

There could be

Replication setup
or
Log shipping

Third solution is clustering.

Everything hs its own Plus and Minuses|||can u give me more details
pls|||Clustering is not a hot-standby solution.|||I agree it is not a DB level backup but it provides backup for SQL Server Server itself. For databfiles , there could be SAn with some sort of Raid, Lshipping or whatever. Like I said all depends on wht he is looking for|||Clustering is not a hot-standby solution.Huh? Exactly how much "hotter" can you get than a cluster? When one box in a cluster fails, another takes over without the client even being aware of anything happening.

-PatP|||That's exactly why it's not considered as hot stand-by solution, but rather a fail-over solution.|||If he is referring to a "Hot Backup" as it is in Oracle, he wants to do an online database backup, which is how it is on SQL Server and Sybase. In Oracle, the equivalent requires either:

1. A full export of the database.
2. A hot backup of the database (requires Archive Log Mode to be set on) and tablespaces placed in "begin backup" "copy Datafile" "end backup"

If this is what you want, the "backup database" command is performed while SQL Server and databases are online, there is not need to stop the SQL Server in order to get a database backup.|||Horacle? Who said anything about horacle?|||There is no such thing called "Horacle", but only Oracle - watch your fingers mister :-) JK
Seriously, hot backup in Oracle means it takes one User's tablespace off-line at a time and used the O/S to copy data file(s). For SQL Server 7.0 and 2000, there is no "hot backup" but only a "fuzzy" backup while the database is still online, which some un-commited transactions were not included after the checkpoint.
Clustering is not a pure "Hot backup" either, because if the SAN is went down, there goes your cluster's nodes. Log-Shipping to a standby server is also not a "hot backup" in term of timing, because it take time & manually to switch to the standby server. On other hand, the standby has almost exactly the copy of the production server (except for the very last transaction(s) that hasn't record/backup because of the crash, so in term of the full DB backup & transaction logs backup, the log shipping might be considered a "hot backup" only in this context. The same true is for replication method.|||I think you're confused between "hot/warm standby" and what you came up on-the-fly as "hot backup", which I don't even know where you came up with...

Sunday, February 19, 2012

Hosting SQL Server 2005 As a Runtime Host

I am trying to use the new Common Language Runtime (CLR) hosting feature to write stored procedures in C#
i have added
Microsfot.sqlserevr.server name space
and ia m trying to use sqlContext Object as below

using (SqlConnection connection = new SqlConnection(dbConn))
{
connection.Open();
SqlCommand sqlcmd = new SqlCommand("select @.@. version", connection);
SqlContext.Pipe.ExecuteAndSend(sqlcmd);
}


i get the below error when i execute (SqlContext.Pipe.ExecuteAndSend(sqlcmd);)

System.InvalidOperationException was unhandled by user code
Message="The requested operation requires a SqlClr context, which is only available when running in the Sql Server process."
Source="System.Data"

i checked if (SqlContext.IsAvailable) and it returnsfalse as well.

Please le me know how to make it work.

Thanks

THNQDigital

Try to use context connection in this way:

using (SqlConnection connection = new SqlConnection("context connection=true"))

You can find an example here:

http://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.server.sqlpipe(d=ide).aspx

And here is an article about context connection:

http://msdn2.microsoft.com/en-us/library/ms254981(d=ide).aspx

|||

Thank you Jay.

But "context connecion = true", means we are not providing any user credential to login to sql server. The managed code has to run in the same process as SQL server right?.

sqlContext.IsAvailable has to reurn true in order to confirm that managed code is running in the same process as sql server ( in process). For me 'sqlContext.IsAvailable' is returning false.

How do we acheive in process communication bewteen managed code ( c#) and sql server. In other words how do we make sqlContext.IsAvailable return true.

Please le me know Thanks for your help

THNQDigital

|||

THNQdigital:

But "context connecion = true", means we are not providing any user credential to login to sql server. The managed code has to run in the same process as SQL server right?.

Yes, I agree with you.

As I understand the sqlContext.IsAvailable should return true when the code is running inside SQL Server using common language runtime integration--that means in SQL you can create an assmebly pointing to the dll file compiled from your code, then create UDF or stored procedure to reference the code. You may take a look at this article:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_con_03_6e9e.asp

|||

Hi Jay,

The Link you provided above is not taking me to the related topic. Could you please verify and re send me the correct link. I greatly appreciate your help. Thanks.

THNQDigital

|||

Sorry it's my fault, please try this oneSmile

http://msdn.microsoft.com/library/en-us/dnsql90/html/sqlclrguidance.asp?frame=true