Showing posts with label management. Show all posts
Showing posts with label management. Show all posts

Friday, March 23, 2012

Failed to create user login

This is the error message i keep getting when following the SQL Server tutorial on how to make a new user;

TITLE: Microsoft SQL Server Management Studio Express

Create failed for Login 'employee'. (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Login&LinkId=20476


ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

The MUST_CHANGE option is not supported by this version of Microsoft Windows. (Microsoft SQL Server, Error: 15195)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.2047&EvtSrc=MSSQLServer&EvtID=15195&LinkId=20476


BUTTONS:

OK

Why is that? Im running XP, do i need to be on 2000 Server or something?

This enhanced option is only available when SQL Server is installed on a Windows 2003 Server system.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||i dont understand|||

OK, let me explain it to you. Prior SQL Server 2005, there have been no ways to control the password complexity or behaviour in SQL Server, which means that you could use a password like "aaa" or 123" or just a blank one. The options that are known from the Windows Domain like "Enforce password complexity" which only lets you create a password which is complex enough (containing enough characters / numbers / special characters) didn′t exists. Also the option "User must change password upon first connection" didn′t exists. With SQL Server 2005 these options have become available also for SQL Server passwords / users, but... you need to have Windows 2003 to enforce those rules as they are controlled by a group policy of Windows 2003. Any machine prior to WIndows 2003 won′t know the rules, therefore SQL Server thros an error, stating that these options are not available on the current platform SQL Server is installed on.

HTH, Jens SUessmeyer.


http://www.sqlserver2005.de

|||

If you really need to create this user of just a matter of study, what you could do is to select the SQL Server authentication and uncheck the "Enforce password policy". This way you will not get the error message, but remember that this is not a correct way to go.

Igor Pacheco

Failed to create user login

This is the error message i keep getting when following the SQL Server tutorial on how to make a new user;

TITLE: Microsoft SQL Server Management Studio Express

Create failed for Login 'employee'. (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Login&LinkId=20476


ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

The MUST_CHANGE option is not supported by this version of Microsoft Windows. (Microsoft SQL Server, Error: 15195)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.2047&EvtSrc=MSSQLServer&EvtID=15195&LinkId=20476


BUTTONS:

OK

Why is that? Im running XP, do i need to be on 2000 Server or something?

This enhanced option is only available when SQL Server is installed on a Windows 2003 Server system.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de|||i dont understand|||

OK, let me explain it to you. Prior SQL Server 2005, there have been no ways to control the password complexity or behaviour in SQL Server, which means that you could use a password like "aaa" or 123" or just a blank one. The options that are known from the Windows Domain like "Enforce password complexity" which only lets you create a password which is complex enough (containing enough characters / numbers / special characters) didn′t exists. Also the option "User must change password upon first connection" didn′t exists. With SQL Server 2005 these options have become available also for SQL Server passwords / users, but... you need to have Windows 2003 to enforce those rules as they are controlled by a group policy of Windows 2003. Any machine prior to WIndows 2003 won′t know the rules, therefore SQL Server thros an error, stating that these options are not available on the current platform SQL Server is installed on.

HTH, Jens SUessmeyer.


http://www.sqlserver2005.de

|||

If you really need to create this user of just a matter of study, what you could do is to select the SQL Server authentication and uncheck the "Enforce password policy". This way you will not get the error message, but remember that this is not a correct way to go.

Igor Pacheco

sql

Wednesday, March 21, 2012

Failed to access IIS metabase?

Please help!

All of sudden, I cannot connect to the reporting services through MS SQL Server management studio. error message is "Failed to access IIS metabase".

As I checked the system:

1. reporting services is working properly (status is "started")

2. cannot access http://localhost/ReportServer$SQL2005 , the same error

3. Run:"C:\>cscript metaacl.vbs IIS://localhost/w3svc", it shows:
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

XP\ASPNET
Access: R E
BUILTIN\Administrators
Access: RWSUED
Everyone
Access: E
XP\VS Developers
Access: RWSUE
XP\ASPNET
Access: R
XP\ASPNET
Access: R

I reinstall IIS and it doesn't work. Please help, thank you so much!

Are you able to access http://localhost/reportserver from IE? Are you able to access any web pages from IE?|||

Thank you for your reply.

The first answer is no, I cannot access http://localhost/reportserver from IE(The instance of SQL server 2005 is "SQL2005".)

The second answer is yes, I can access IIS' default web page and the other web pages.

|||Anybody can help, please?|||

I think you need to figure out what are the required ACLs. Maybe you can start by giving everybody full access. If that works start reducing the permissions.

BTW, I thought the error message would give you more details about what ACLs are missing, but I could be wrong.

|||One more thing, if you uninstalled IIS, you may run into some problem when you try to uninstall RS later on: http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=735b5260-f6bf-4ea5-94b2-6c41ae387a9a

Friday, February 17, 2012

extracting data

I have the following informaton in a field called: full_path
/Capital Improvements Program/Management/Facilities/Lower South Platte/New
Util Admin Bldg/Ops Ctr/Planning
How can I pull out the information independently from the 2nd and 3rd level
or the 2nd and 3rd level combined. re: /Management
or /Facilities or combined /Management/facilities ?For such problems, if you have to do this at the server, use a table of
Numbers. That will make the solution more generic and flexible.
CREATE TABLE Nbrs ( n INT NOT NULL PRIMARY KEY );
And populate the table with numbers from 1 to 8000. Search the archives of
this newsgroup for several shortcuts to generate such sequential numbers.
And the query assuming the string always start with a '/':
DECLARE @.s VARCHAR(200), @.level INT
SET @.s = '/Capital Improvements Program/Management/Facilities/Lower South
Platte/New Util Admin Bldg/Ops Ctr/Planning'
SET @.level = 3
SELECT SUBSTRING( @.s, n, CHARINDEX('/', @.s + '/', n ) - n )
FROM Nbrs
WHERE n BETWEEN 2 AND LEN( @.s ) + 1
AND SUBSTRING('/' + @.s, n, 1) = '/'
AND n - LEN(REPLACE( LEFT( @.s, n ), '/', '' ) ) = @.level ;
For reuse and ease of maintanence, you can make it a procedure or scalar
UDF, depending on your requirements.
Anith

Extracting Binary data from SQL DB to a location on the web server

Hey all,

WE have a document management system where by Adminstrators can upload documents, once the document is uploaded the binary data is stored on in a folder on the web server. We used to stored the documents in the actaul db table, but we found that there were to many documents and it was using alot of space on db server.

So my boss has decided we are now going to upload the binary data onto the web server. Currently we are donig this with new documents which have been added or documents which are gettinguploaded when reloading, but there are many documents in the db table which have not been updated and are still embedded in the db table. So i need to figure out how to go about copying the data storewd in the db table and storing it in web servers folder location.

I've tried various things for a enitre day but im going round in circiles.

MemoryStream mStream = new MemoryStream((Byte[])dtrResults["file"]);
BinaryReader bReader = new BinaryReader(mStream);
int intFileSize = (int)mStream.Length;
Byte[] byteFile = (Byte[])dtrResults["file"];

i can get to this state but then how do i create a folder on the BinaryREader to then store the binary data of the file to the location.

BinaryReader bReader2 = new BinaryReader(File.Open(strDocFolder + strSavedFileName, FileMode.Create));
int count2 = bReader2.Read(byteFile, 0, intFileSize);

bReader2.Close();

i've also tried this but when the file gets created in the folder there is no content.

i do know that the file does contain content as ive tried this and downlaoding the file from that page acctually works

string strContentTpe = WValue.WStr(dtrResults["contenttype"]);
int intFileSize = VValue.VInt(dtrResults["filesize"]);
/ Byte[] byteFile = ((Byte[])dtrResults["file"]);
//Downloads the data correctly
Response.ClearContent();
Response.ClearHeaders();
Response.AddHeader("Content-Disposition", "attachment; filename=\"" + WValue.WStr(dtrResults["docfilename"]) + "\"");
Response.AddHeader("Content-Length", WValue.WStr(intFileSize));
Response.ContentType = strContentTpe;
Response.BinaryWrite(byteFile);

I hope ive made some snese andthat someone can hlep me.

Have a nice day

Zal


i dont think u should extract all the data by a response object .....how many files will u sit & click save .......bt just retrive the byte information from the database & send it across the network using socket programming.(dont get scared..it could be a command line utility)

while using socket programing u will need to make client which would extract the data & send it ...while at the new location could use a server which would recv data & and make files out of it.

this would only be advisable if the files are more than 50000.....

if less just write a command line utility to remove the data & store as .dat files with filenames......then physically transfer the data to new location

|||

Thanks for the advice, but it seems all a bit ot scary for me.

Ive actaully found a way of doing it by reading and writing to the reader, it might not be perfect but this code will only be used once.

Zal