How To Find Sql Server Properties Programatically
Aug 24, 2005
I am writing a program in .Net to retrieve properties of Sql Server.
How can I find the following properties without querying the database:
1. Replication enabled
2. Default language
3. Processors and threads running.
Thanks,
verve
View 3 Replies
ADVERTISEMENT
Mar 16, 2015
I have an ODBC connection string that is working fine with the following properties:
Database="XXXXXXX",Network="YYYYYY"; strangely no server is specified in the string, but it is specified in the ODBC Connection file.
I am trying to do a new server registration in SSMS for this database.However, I don't understand where the network spec is placed.
Under Registered server name I've tried:
YYYYYYXXXXX
When I browse the server for the database instance list, I receive "network path was not found".
I even tried:"XXXXXXX",Network="YYYYYY" for the registered server name.Same error message.
What am I doing wrong ?
View 1 Replies
View Related
Aug 16, 2007
What is the official supported way to determine the version of SQL server and installed Service Pack programatically.
Different components such as Analysis Services or SSIS can have service pack applied at different times. So what is the right officially supported way to determine the version of those components.
Thank you in advance.
View 7 Replies
View Related
Aug 9, 2006
Does anyone know how to programatically add a group/user to Report Server and assign it a role.
View 3 Replies
View Related
Nov 26, 2007
Hello,
I need to execute a stored procedure from the data layer, that uses a transaction. And I have to override the default transaction timeout for this traansaction
I know how to change the transaction timeout form Management Studio, but I need to be able to change it only for that specific transaction (from the stored procedure's code or from the data layer)
Thanks in advance
View 2 Replies
View Related
Jun 22, 2006
Hi,
How can i store the record insert/update timestamp in a SQL server 2000 db programacally. ? what are the date/time functions in ASP.NET 2.0 ? I know that this can be done by setting the default valut to getdate() function in SQL, but any other way on ASP page or code-behind page ???
Thanks,
Alex
View 3 Replies
View Related
Aug 16, 2006
Dear all,
For example, executing a DTSX stored in a server, execution is fine and successfully but the log file attached to that DTSX is not created at all after the execution. Otherwise if I'm going to execute from the server everything is fine: log file is created and gathering the usual information.
Let me know if exists any option for to enable this from the own DTSX.
If I run local packages log files are created without problems.
Thanks in advance,
View 15 Replies
View Related
Apr 16, 2007
Hi all,
I have to create a DSN for SQL-Server. Therefor I use the function "SQLConfigDataSource" from "ODBCCP32.DLL". But the problem is that the SQL-Server does not use the Standard-Portnumber 1433. I've tried to make the DSN with "SERVERNAME xxxx" where xxxx is the Portnumber, sometimes it works, but often it does not. When it does not work, then the Checkbox in the ODBC-Configuration-Tool is checked, so the connection is searching for the standard-port. How can I tell the system that it shall NOT use dynamic configuration?
Thanks for help,
Franz
View 6 Replies
View Related
Oct 11, 2002
Hello!
We are having problems with a single SQL Server where the Server properties will not save, and always revert to the default.
It occurs only on those tabs with "configured" and "running" options at the bottom. Other tabs will keep the settings we custom.
The big problem is with the memory and processor tabs which even when we've made only a single change and stopped and started the service, reverts back to a default.
Any clues - we are logged in as "sa" and have not removed the SA priviledges.
Thanks for any help,
Simon
View 1 Replies
View Related
Dec 7, 2006
Help;Im New with a company and the sql server ismaxing out the cpu'sWe have 3 web servers load balanced....large volume of datathe current PropertiesComputer:4 amd 2.88 processors4 g MememoryRecomendations of good sql setupmemory, cpu etcThank youmike
View 6 Replies
View Related
Mar 22, 2000
Is there no longer a graphic interface for the parameters that are output with sp_configure?
There are many options that are settable that are not in the Sql Server Propreties, but
these items were in the 6.5 graphic interface through EM ex. number of open objects.
Is there a script to save these settings so the installation can be recreated?
View 1 Replies
View Related
Jun 19, 2008
DECLARE@Stage TABLE
(
RowID INT IDENTITY(0, 1) PRIMARY KEY CLUSTERED,
Data VARCHAR(90),
Section INT
)
INSERT@Stage
(
Data
)
EXECxp_cmdshell 'ipconfig /all'
DECLARE@Section INT
SET@Section = 0
UPDATE@Stage
SET@Section = Section =CASE
WHEN ASCII(LEFT(Data, 1)) > 32 THEN @Section + 1
ELSE @Section
END
SELECTMAX(CASE WHEN x.minRowID IS NULL THEN NULL ELSE s.Data END) AS Header,
MAX(CASE WHEN s.Data LIKE '%Host Name%' THEN RTRIM(SUBSTRING(s.Data, 45, 90)) END) AS HostName,
MAX(CASE WHEN s.Data LIKE '%Media State%' THEN RTRIM(SUBSTRING(s.Data, 45, 90)) END) AS MediaState,
MAX(CASE WHEN s.Data LIKE '%Description%' THEN RTRIM(SUBSTRING(s.Data, 45, 90)) END) AS [Description],
MAX(CASE WHEN s.Data LIKE '%IP Address%' THEN RTRIM(SUBSTRING(s.Data, 45, 90)) END) AS IPaddress,
MAX(CASE WHEN s.Data LIKE '%Physical Address%' THEN RTRIM(SUBSTRING(s.Data, 45, 90)) END) AS PhysicalAddress
FROM@Stage AS s
LEFT JOIN(
SELECTMIN(RowID) AS minRowID
FROM@Stage
GROUP BYSection
) AS x ON x.minRowID = s.RowID
WHEREs.Section > 0
GROUP BYs.Section
E 12°55'05.25"
N 56°04'39.16"
View 2 Replies
View Related
Apr 3, 2007
I'm logged in as 'sa' and I'm using Microsoft Sql Server Mgmt Studio. I've established a Linked Server using Provider MSDASQL, and I'm able to retrieve data from the linked server. However, when I attempt to set the properties for my linked server, I get the following error message.
Adhoc updates to system catalogs are not allowed. (Microsoft SQL Server, Error: 259)
I'm not directly accessing the system catalogs (as far as I can tell), I'm actually using the Linked Server Properties user dialog to change the Server Options. Any help is appreciated.
View 3 Replies
View Related
Jan 9, 2005
Does anyone know how to display the properties of a column / data field in ASP? Thanks!
View 6 Replies
View Related
Jul 28, 2004
This problem concerns files FTP'd (using True64) from an AIX app, to an WIN server
These files can't be loaded into the SQL Server DB using BCP (String data, right truncation) nor into an ACCESS DB ("Overflow"), (but can be loaded into Excel).
If the file is opened and saved in a Windows/DOS environment it loads fine, or contents copied to an empty win/dos file.
If the same file is sent from to the Win server using DOS FTP then it loads fine.
It seems to be that these DBMS's don't like something about the operating system level file properties (hdr or EOF?).
Can any one help?
View 1 Replies
View Related
Apr 27, 2006
Hi
I'm running SQL Server 2005 Express SP1 on a Danish PC, and I need to have the server language set to Danish.
However, when I want to change the language in server properties (the current language is English (US) using Management Studio Express, I can't - all of the properties on the General page are greyed out.
I know that the SQL Server Express SP1 download is available in several languages (Danish not being one of them) - does that mean that I can't get my SQL Server Express SP1 installation to "speak" Danish at all?
Please help - it's driving me up the wall.
View 4 Replies
View Related
Oct 20, 2006
Hello to everyone, I've a question about UDTs and the way I can use them to access tables and columns where they are applied in a SQL Server 2005 DB.
I've already spent 2 days googling and MSDN reading but nothing helped me to solve my problem, thats why I'm posting it here (this is the second post, maybe the last one was in the wrong Forum).
The scenario follows:
I've created a UDT called MyUDT that exposes 2 properties MyTable, MyColumn, here its the code:
[Serializable]
[SqlUserDefinedType(Format.UserDefined, IsByteOrdered = true, MaxByteSize = 8000, Name = "MyUDT")]
public class MyUDT : INullable, IBinarySerialize
{
private string _myTable;
private string _myColumn;
....
/// <summary>
/// Set or Get the Table Name where the UDT is applied.
/// </summary>
public string MyTable {
get { return this._myTable; }
set { this._myTable = value; }
}
/// <summary>
/// Set or Get the Table's Column Name where the UDT is applied.
/// </summary>
public string MyColumn
{
get { return this._myColumn; }
set { this._myColumn = value; }
}
....
}
And here it's my question/s:
How can I expose the defined Properties (MyTable, MyColumn) in order to be directly used from
SQL Server Management Studio within the Column Properties Panel?
Pls take a look to the print screen placed below:
[img=http://img81.imageshack.us/img81/7193/untitledip1.th.jpg]
If it is not possible, is there a way for any UDT to get back from the sql server execution context
the table and the column where it is applied/used?
I need to solve that in order to later retrieve via SQL the Extended Table Properties where the UDT is used
and make some work on presented MetaData. Thanks in advance, every answer/help will be very much appreciated.
View 10 Replies
View Related
Jun 10, 2007
In SSMSE, if I open Server Properties and then Permissions, I can highlight a user or user group and click the 'Effective Permissions' button.
For entries like 'BUILTINUsers' or 'BUILTINAdminsitrators' I get the following error message. I don't understand what it's telling me - can anyone explain?
TITLE: Microsoft SQL Server Management Studio Express
------------------------------
Cannot show requested dialog.
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
------------------------------
Cannot execute as the server principal because the principal "BUILTINUsers" does not exist, this type of principal cannot be impersonated, or you do not have permission. (Microsoft SQL Server, Error: 15406)
Notes: as fara as I know, BUILTINUsers does exist, and I do have permission.
View 1 Replies
View Related
Jan 9, 2007
Hi everyone,
Primary platform is 2005 under 64-bit.
I'm trying to figure out what does 'Processor Affinity' and 'I/O Affinity' means when you're viewing server properties. We've got eight processors.
Thanks for your comments,
View 4 Replies
View Related
Jul 13, 2005
Hi,
I have a MS SQL Server Express database wich I upsized once from MS
Access. I can connect to it and get/insert data but I can't update the
field properties.
I've used Access 2003, Visual Studio .Net and SQL Server Web Data
Administrator, but I can't change the properties of existing tables. I
cán add new tables and add their properties afterwards. Since I have a
lot of tables it would be too much work too recreate them all. So how
can I edit my existing tables?
View 1 Replies
View Related
Mar 30, 2001
Hi
We have two servers each running SQL7. I cannot run a trace on one server from the other. Whatever server name I enter in the drop down box, the trace only records activity on the server that profiler is running on. Even if I put a non-existent server name in the box (!), the trace accepts the name but still only runs on the host server.
Any explanations please.
Keith
View 2 Replies
View Related
Nov 29, 2004
I have looked on google and haven't found a query (as of yet) to perform this function.
Essentially I am using VB.NET with Excel and have a mapping between a worksheet and a table in my database. I wrote an import function to pull the data out of excel and put it into SQL Server but I want to try catching errors before i do that.
What is the SQL query to get column sizes from a table. Meaning in a table I have column1 that is allowed a size of int(5). How do i retrieve that information from a query opposed to just looking at it in SQL Server EM??
any help would be appreciated
thanks
View 5 Replies
View Related
May 21, 2008
Hi Folks,
In SQL 2005, the linked servers are not automatically enabled for RPC / RPC OUT like they were in SQL 2000. I have set the properties for my linked server by using SQL Management Studio.
I right click on the Linked Server --> Properties --> Server Options
There are options like: Collation Compatible, Data Access, RPC, RPC OUT, Use Remote Collation
There is a drop down box to set each value to TRUE or FALSE. Setting them through management studio works great, however for the production environment I need to set these properties programmatically. Is there a stored procedure or registry setting that would allow my program to set these values for a given linked server?
Thank you.
View 3 Replies
View Related
Jul 25, 2007
I am running SQL Server 2005 Workgroup Edition with Reporting Services and would like to assign a user on the system to be a System User in Reporting Services through SQL Server Management Studio so that they can run Report Builder but the window for the Reporting Services Server Properties Permissions Page has been grayed out so I cannot add new users to make this role assignment. I can add users and perform normal role (non system roles) assignments by right clicking on the folders underneath the Reporting Services Server with no problem.
Is it due to the edition of SQL Server that I am unable to do this?
Is there another way for a user to gain access to the Report Builder application using some other authentication process?
View 1 Replies
View Related
May 4, 2015
How to change the Security Properties of a Linked Server.
In tsql, I need to setup a linked server and want to set the Properties -> Security -> For a login not defined in the list above, connections will: -> Not be made But I cannot figure out how to set it to Not be made. I manually set it in the GUI, and the scripted the linked server and when I ran the script to create it was set to Be made using the login's current security context. The create script did not even set it correctly.
I have looked around and all that I have found is a column in sys.linked_logins, uses_self_credential that looks promising. But I cannot change the system catalog.
how i can set the "For a login not defined in the list above" security property in tsql?
View 4 Replies
View Related
Mar 24, 2004
Hi!
Sudenly I stoped being able to view sql server object properties in the visual studio properties window . When I selected an sql server object in the server explorer i could see its properties in the prop. window . Now I can't see them anymore, the properties window apears blank.
Can anyone tell what do I need to do to be able to view them again.
Thanks & Best Regards
Pedro Costa
View 3 Replies
View Related
Jul 23, 2005
It's a Windows 2000 Server box with SQL 2000 on it. MSSQLSERVER &SQLSERVERAGENT services are logged in as valid domain user. I set up amail profile for that user, and can send email via Outlook 2003.However, when I go to the SQL Agent Properties in Enterprise Manager,Mail Profile is disabled.I've restarted the services & even tried rebooting the server. Thisworks on my other servers, but they're Windows 2003. Not sure ifthat's the problem though.Anybody have any clues?
View 1 Replies
View Related
Dec 19, 2005
Hi,When I click on the properties of a linked server, all the Generalproperties are read - only, which means that if I want to edit anygeneral properties I have to delete the linked server and recreate it.Needless to say this is a pain. Is this by design or some kind of bug?Is there a workaround?Thanks
View 8 Replies
View Related
Dec 4, 2013
I have a table with one of the column of xml type. the column contains xml like given below. I want to read this xml from the table and show as below with T-sql query
"EmployeeID" "IndustryDome" "description "
Where Description value comes from the value of AllDome/ITEM/Dome /Description whose Dome equals to IndustryDome value
EX:
1166586 3951LX01 Description10
<GetEmployeeDetails xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<return xmlns="http://applications.apch1.com/webservice/schema/">
<EmployeeID>1166586</EmployeeID>
<BankAccounts>
[Code] ....
View 2 Replies
View Related
Apr 18, 2007
I have connected to the SQL Server 2005 instance usign the SQL Server Management Studio; I have changed the default locations for the database and log files. I have also rebooted the machine. When I look in the SQL Server Configuration Manager in the properties for the SQL Server (MSSQLSERVER) I see that the data path is still set to the old value and this field is read-only. How can this can changed without going through the registry?
View 10 Replies
View Related
Mar 27, 2006
I have just upgraded to SQL Server 2005 from SQL Server 2000.In Microsoft SQL Server Management Studio, when I click on databaseproperties, I receive the following error:-Cannot resolve the collation conflict between"Latin1_General_CI_AS"and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.(Microsoft SQL Server, Error: 468)Some reference suggest that I can change the database collation byclicking database properties!What can I do?
View 21 Replies
View Related
Jul 13, 2007
I installed SQL Server 2005 Developer Edition. When i create a new database (using the "New Database" dialog) i cannot set the new database's compatibility level to "SQL Server 2005(90)" because this option is not in the "dropdown list". the only items shown are: "SQL Server 7.0(70)" and "SQL Server 2000(80)". I set the owner to "sa". How do i get "SQL Server 2005(90)" in my "compatibility level" drop down list? Is this an installation option that i missed? Thanks in advance for any assistance!
-chris
View 12 Replies
View Related
Oct 6, 2015
I have documentation in the form of extended properties for tables which are subscribers in a replication scheme. The documentation describes the tables in reference to their replication scheme. I don't want to apply them to the source and have them published.I can't apply the extended properties receiving the error, 'don't have permission' yet I am DB creator on all systems. The theory is that I can't modify the subscription. Which makes sense.Can I turn off the replication, apply the extended properties, then turn on replication without causing harm?
View 0 Replies
View Related